I noticed this today:
root 58697 0.0 0.0 10680 2180 - IJ 12May20 0:00.00 /usr/local/bin/readproctitle service errors: .../site_perl/FreshPorts/vuxml_parsing.pm line 232, <> chunk 1.\nWide character in print at /usr/local/lib/perl5/site_perl/FreshPorts/vuxml_parsing.pm line 232, <> chunk 1.\nWide character in print at /usr/local/lib/perl5/site_perl/FreshPorts/vuxml_parsing.pm line 232, <> chunk 1.\nUndefined subroutine &FreshPorts::CommitterOptIn::RecordErrorDetails called at ./process_vuxml.pl line 124, <> chunk 1.\n
I should monitor that process better.
But first, let’s find the vuxml entry which causes this. We know it’s after 12 May because that’s the date on the process.
Testing
To test the processing of a single vuxml entry, I delete it from the database.
freshports.dev=# begin; BEGIN freshports.dev=# delete from vuxml where vid = '0bfcae0b-947f-11ea-92ab-00163e433440'; DELETE 1 freshports.dev=# commit; COMMIT freshports.dev=#
To initiate the processing of the vuxml file, I enter this command:
echo touch ~freshports/signals/vuxml ~freshports/signals/job_waiting | sudo su -fm freshports
This will invoke the vuml processing during the normal course of events. If a commit is being processed when the command is entered, the vuxml will not be processed until after that commit.
I could run the commands manually from the command line, but that would not properly exercise the code.
Found it!
I found 59fabdf2-9549-11ea-9448-08002728f74c produces the issue:
[dan@dev-ingress01:/var/service/freshports] $ ps auwwx | grep proc root 92487 0.0 0.0 10680 2180 - IJ 13:07 0:00.00 /usr/local/bin/readproctitle service errors: ........Wide character in print at /usr/local/lib/perl5/site_perl/FreshPorts/vuxml_parsing.pm line 234, <> chunk 1.\n
Reproducing the issue is always a good first goal.
This is line 234:
print "description:", $self->description(), "\n";
perldoc.perl.org says:
To avoid this warning and to avoid having different output encodings in a single stream, always specify an encoding explicitly, for example with a PerlIO layer:
binmode STDOUT, ":encoding(UTF-8)";
That code goes into process_vuxml.pl which uses the vuxml_parsing.pm module.
Let’s try that. The steps are:
-
freshports.dev=# begin; delete from vuxml where vid = '59fabdf2-9549-11ea-9448-08002728f74c'; commit; BEGIN DELETE 1 COMMIT freshports.dev=#
-
$ echo touch ~freshports/signals/vuxml ~freshports/signals/job_waiting | sudo su -fm freshports
-
$ ps auwwx | grep proc root 34401 0.0 0.0 10680 2180 - IJ 13:25 0:00.00 /usr/local/bin/readproctitle service errors: ........................................................................................................ dan 35363 0.0 0.0 11324 2648 4 S+J 13:26 0:00.00 grep proc
No errors!