Thread View: news.software.nntp
4 messages
4 total messages
Started by D. Stussy
Thu, 12 Jun 2008 04:03
Problem with perl scripts "bin/controlchan" and "bin/perl-nocem"
Author: D. Stussy
Date: Thu, 12 Jun 2008 04:03
Date: Thu, 12 Jun 2008 04:03
20 lines
1958 bytes
1958 bytes
I'm seeing this in my logs: Jun 11 19:38:51 (none) innd: nocem! exit 2 elapsed 0 pid 5881 Jun 11 19:38:51 (none) innd: control! exit 2 elapsed 0 pid 5883 Jun 11 19:38:52 (none) innd: control! exit 2 elapsed 1 pid 5886 Jun 11 19:38:52 (none) innd: nocem! exit 2 elapsed 1 pid 5885 Jun 11 19:38:52 (none) innd: control! exit 2 elapsed 0 pid 5889 Jun 11 19:38:52 (none) innd: nocem! exit 2 elapsed 0 pid 5890 ... I note that neither script actually has an "exit 2;" statement in them. However, they can exit with an RC of either 0 or 1. I suspect that there is some incompatibility with Perl 5.10.0 and an upgraded module in the past week since I noticed this only this week and I upgrade modules via a cron-job on Sundays. No other perl script (including cleanfeed) seems affected. Is anyone else seeing a problem on their systems?
Re: Problem with perl scripts "bin/controlchan" and "bin/perl-nocem"
Author: Julien ÉLIE
Date: Thu, 12 Jun 2008 06:21
Date: Thu, 12 Jun 2008 06:21
47 lines
2825 bytes
2825 bytes
Hi D. Stussy,
> Jun 11 19:38:51 (none) innd: nocem! exit 2 elapsed 0 pid 5881
> Jun 11 19:38:51 (none) innd: control! exit 2 elapsed 0 pid 5883
> Jun 11 19:38:52 (none) innd: control! exit 2 elapsed 1 pid 5886
> Jun 11 19:38:52 (none) innd: nocem! exit 2 elapsed 1 pid 5885
> Jun 11 19:38:52 (none) innd: control! exit 2 elapsed 0 pid 5889
> Jun 11 19:38:52 (none) innd: nocem! exit 2 elapsed 0 pid 5890
>
> I note that neither script actually has an "exit 2;" statement in them.
pgpverify does:
exit(2) == The control message had an unknown PGP signature.
Did you receive some articles for NoCeM or controlchan at 19:38:xx?
Maybe you can try to change the "2" in pgpverify to check whether
it comes from it?
It would be strange, though.
} elsif (/\[GNUPG:\]\s+NO_PUBKEY/) {
--> $ok = 2;
> However, they can exit with an RC of either 0 or 1.
Or 126 for perl-nocem.
> I suspect that there is
> some incompatibility with Perl 5.10.0 and an upgraded module in the past
> week since I noticed this only this week and I upgrade modules via a
> cron-job on Sundays. No other perl script (including cleanfeed) seems
> affected.
Do you have the list of upgraded modules?
Did the problem start the same day? (Sunday or Monday)
--
Julien ÉLIE
« -- Ils transportent une arme secrète dans un tonneau !
-- La cervoise tiède !!!
-- Non, ça c'est une arme connue. » (Astérix)
Re: Problem with perl scripts "bin/controlchan" and "bin/perl-nocem"
Author: D. Stussy
Date: Thu, 12 Jun 2008 09:15
Date: Thu, 12 Jun 2008 09:15
170 lines
7374 bytes
7374 bytes
Conclusion: Perl module Sys::Syslog 0.25 introduces a problem not present
in 0.24. Please verify.
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:g2qfa9$3dp$1@news.trigofacile.com...
> > Jun 11 19:38:51 (none) innd: nocem! exit 2 elapsed 0 pid 5881
> > Jun 11 19:38:51 (none) innd: control! exit 2 elapsed 0 pid 5883
> > Jun 11 19:38:52 (none) innd: control! exit 2 elapsed 1 pid 5886
> > Jun 11 19:38:52 (none) innd: nocem! exit 2 elapsed 1 pid 5885
> > Jun 11 19:38:52 (none) innd: control! exit 2 elapsed 0 pid 5889
> > Jun 11 19:38:52 (none) innd: nocem! exit 2 elapsed 0 pid 5890
> >
> > I note that neither script actually has an "exit 2;" statement in them.
>
> pgpverify does:
> exit(2) == The control message had an unknown PGP signature.
>
> Did you receive some articles for NoCeM or controlchan at 19:38:xx?
I don't think that's the problem. The log messages are not on account of
receipt of a message (as far as I can tell) but continuous - as if the
scripts are aborting upon initialization - about 3 times per second ALL DAY.
> Maybe you can try to change the "2" in pgpverify to check whether
> it comes from it?
> It would be strange, though.
>
> } elsif (/\[GNUPG:\]\s+NO_PUBKEY/) {
> --> $ok = 2;
>
> > However, they can exit with an RC of either 0 or 1.
>
> Or 126 for perl-nocem.
>
> > I suspect that there is
> > some incompatibility with Perl 5.10.0 and an upgraded module in the past
> > week since I noticed this only this week and I upgrade modules via a
> > cron-job on Sundays. No other perl script (including cleanfeed) seems
> > affected.
>
> Do you have the list of upgraded modules?
> Did the problem start the same day? (Sunday or Monday)
I noted another log entry-set (actually discovered in today's "daily usage
report' email; don't know which log file had it):
syslog: invalid level/facility: notice at /var/lib/news/bin/controlchan line
347
syslog: invalid level/facility: notice at /var/lib/news/bin/perl-nocem line
467
Now, Sys::Syslog was a perl module that was updated recently (and for me, on
Sunday).
Module id = Sys::Syslog
CPAN_VERSION 0.25
CPAN_FILE S/SA/SAPER/Sys-Syslog-0.25.tar.gz
UPLOAD_DATE 2008-06-05
(other info deleted).
This seems more likely the candidate error, especially since I just forced a
re-install of the module and got some obvious errors. Here's one of them:
t/syslog.t.............3/215
# Failed test 'syslog() called with level 'info''
# at t/syslog.t line 107.
# got: 'syslog: invalid level/facility: info at t/syslog.t line 106
# '
# expected: ''
# Failed test 'syslog() should return true: '0''
# at t/syslog.t line 108.
Obviously, there's some problem with the log level names, and that would
cause the aborts I'm seeing. "info", "notice", "local0", and "local1" tests
are failing - and "notice" is the level specified at the line numbers above
for the scripts.
Stepping back to version 0.24 of Sys::Syslog:
- Successful compile and tests PASS.
- INN scripts do RUN and not abort.
Problem fixed - for the moment....
Therefore, it appears (at least on my system) that Sys::Syslog v0.25
introduces an incompatibility, as compared to version 0.24. Can someone
verify this? 7 changes are listed between these versions. I think this is
the change that screws things up:
diff -ur Sys-Syslog-0.24-ZCmEPX/Syslog.pm Sys-Syslog-0.25-SpvqjY/Syslog.pm
--- Sys-Syslog-0.24-ZCmEPX/Syslog.pm 2007-12-31 16:15:28.000000000 +0000
+++ Sys-Syslog-0.25-SpvqjY/Syslog.pm 2008-05-18 19:54:49.000000000 +0000
...
@@ -293,25 +314,29 @@
croak "syslog: expecting argument \$priority" unless defined $priority;
croak "syslog: expecting argument \$format" unless defined $mask;
+ croak "syslog: invalid level/facility: $priority" if $priority =~
/^-\d+$/;
@words = split(/\W+/, $priority, 2); # Allow "level" or
"level|facility".
undef $numpri;
undef $numfac;
- foreach (@words) {
- $num = xlate($_); # Translate word to number.
- if ($num < 0) {
- croak "syslog: invalid level/facility: $_"
- }
- elsif ($num <= &LOG_PRIMASK) {
- croak "syslog: too many levels given: $_" if defined $numpri;
- $numpri = $num;
- return 0 unless LOG_MASK($numpri) & $maskpri;
- }
- else {
- croak "syslog: too many facilities given: $_" if defined
$numfac;
- $facility = $_;
- $numfac = $num;
- }
+ for my $word (@words) {
+ next if length $word == 0;
+
+ $num = xlate($word); # Translate word to number.
+
+ if ($num < 0) {
+ croak "syslog: invalid level/facility: $word"
+ }
+ elsif ($num <= &LOG_PRIMASK) {
+ croak "syslog: too many levels given: $word" if defined
$numpri;
+ $numpri = $num;
+ return 0 unless LOG_MASK($numpri) & $maskpri;
+ }
+ else {
+ croak "syslog: too many facilities given: $word" if defined
$numfac;
+ $facility = $word;
+ $numfac = $num;
+ }
}
croak "syslog: level must be given" unless defined $numpri;
@@ -464,14 +489,14 @@
# private function to translate names to numeric values
#
sub xlate {
- my($name) = @_;
+ my ($name) = @_;
+
return $name+0 if $name =~ /^\s*\d+\s*$/;
$name = uc $name;
$name = "LOG_$name" unless $name =~ /^LOG_/;
- $name = "Sys::Syslog::$name";
- # Can't have just eval { &$name } || -1 because some LOG_XXX may be
zero.
- my $value = eval { no strict 'refs'; &$name };
- $@ = "";
+ my $value = constant($name);
+ $value = -1 if $value =~ /not a valid/;
+
return defined $value ? $value : -1;
}
---------------
Obviously, for the error message to generate, "notice" isn't in @words or
isn't translated properly by xlate() - perhaps "notice" is assigned a value
of zero? However, it looks as if its value should be either 5 or 10.
Re: Problem with perl scripts "bin/controlchan" and "bin/perl-nocem"
Author: D. Stussy
Date: Thu, 12 Jun 2008 09:15
Date: Thu, 12 Jun 2008 09:15
170 lines
7368 bytes
7368 bytes
Conclusion: Perl module Sys::Syslog 0.25 introduces a problem not present
in 0.24. Please verify.
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:g2qfa9$3dp$1@news.trigofacile.com...
> > Jun 11 19:38:51 (none) innd: nocem! exit 2 elapsed 0 pid 5881
> > Jun 11 19:38:51 (none) innd: control! exit 2 elapsed 0 pid 5883
> > Jun 11 19:38:52 (none) innd: control! exit 2 elapsed 1 pid 5886
> > Jun 11 19:38:52 (none) innd: nocem! exit 2 elapsed 1 pid 5885
> > Jun 11 19:38:52 (none) innd: control! exit 2 elapsed 0 pid 5889
> > Jun 11 19:38:52 (none) innd: nocem! exit 2 elapsed 0 pid 5890
> >
> > I note that neither script actually has an "exit 2;" statement in them.
>
> pgpverify does:
> exit(2) == The control message had an unknown PGP signature.
>
> Did you receive some articles for NoCeM or controlchan at 19:38:xx?
I don't think that's the problem. The log messages are not on account of
receipt of a message (as far as I can tell) but continuous - as if the
scripts are aborting upon initialization - about 3 times per second ALL DAY.
> Maybe you can try to change the "2" in pgpverify to check whether
> it comes from it?
> It would be strange, though.
>
> } elsif (/\[GNUPG:\]\s+NO_PUBKEY/) {
> --> $ok = 2;
>
> > However, they can exit with an RC of either 0 or 1.
>
> Or 126 for perl-nocem.
>
> > I suspect that there is
> > some incompatibility with Perl 5.10.0 and an upgraded module in the past
> > week since I noticed this only this week and I upgrade modules via a
> > cron-job on Sundays. No other perl script (including cleanfeed) seems
> > affected.
>
> Do you have the list of upgraded modules?
> Did the problem start the same day? (Sunday or Monday)
I noted another log entry-set (actually discovered in today's "daily usage
report' email; don't know which log file had it):
syslog: invalid level/facility: notice at /var/lib/news/bin/controlchan line
347
syslog: invalid level/facility: notice at /var/lib/news/bin/perl-nocem line
467
Now, Sys::Syslog was a perl module that was updated recently (and for me, on
Sunday).
Module id = Sys::Syslog
CPAN_VERSION 0.25
CPAN_FILE S/SA/SAPER/Sys-Syslog-0.25.tar.gz
UPLOAD_DATE 2008-06-05
(other info deleted).
This seems more likely the candidate error, especially since I just forced a
re-install of the module and got some obvious errors. Here's one of them:
t/syslog.t.............3/215
# Failed test 'syslog() called with level 'info''
# at t/syslog.t line 107.
# got: 'syslog: invalid level/facility: info at t/syslog.t line 106
# '
# expected: ''
# Failed test 'syslog() should return true: '0''
# at t/syslog.t line 108.
Obviously, there's some problem with the log level names, and that would
cause the aborts I'm seeing. "info", "notice", "local0", and "local1" tests
are failing - and "notice" is the level specified at the line numbers above
for the scripts.
Stepping back to version 0.24 of Sys::Syslog:
- Successful compile and tests PASS.
- INN scripts do RUN and not abort.
Problem fixed - for the moment....
Therefore, it appears (at least on my system) that Sys::Syslog v0.25
introduces an incompatibility, as compared to version 0.24. Can someone
verify this? 7 changes are listed between these versions. I think this is
the change that screws things up:
diff -ur Sys-Syslog-0.24-ZCmEPX/Syslog.pm Sys-Syslog-0.25-SpvqjY/Syslog.pm
--- Sys-Syslog-0.24-ZCmEPX/Syslog.pm 2007-12-31 16:15:28.000000000 +0000
+++ Sys-Syslog-0.25-SpvqjY/Syslog.pm 2008-05-18 19:54:49.000000000 +0000
...
@@ -293,25 +314,29 @@
croak "syslog: expecting argument \$priority" unless defined $priority;
croak "syslog: expecting argument \$format" unless defined $mask;
+ croak "syslog: invalid level/facility: $priority" if $priority =~
/^-\d+$/;
@words = split(/\W+/, $priority, 2); # Allow "level" or
"level|facility".
undef $numpri;
undef $numfac;
- foreach (@words) {
- $num = xlate($_); # Translate word to number.
- if ($num < 0) {
- croak "syslog: invalid level/facility: $_"
- }
- elsif ($num <= &LOG_PRIMASK) {
- croak "syslog: too many levels given: $_" if defined $numpri;
- $numpri = $num;
- return 0 unless LOG_MASK($numpri) & $maskpri;
- }
- else {
- croak "syslog: too many facilities given: $_" if defined
$numfac;
- $facility = $_;
- $numfac = $num;
- }
+ for my $word (@words) {
+ next if length $word == 0;
+
+ $num = xlate($word); # Translate word to number.
+
+ if ($num < 0) {
+ croak "syslog: invalid level/facility: $word"
+ }
+ elsif ($num <= &LOG_PRIMASK) {
+ croak "syslog: too many levels given: $word" if defined
$numpri;
+ $numpri = $num;
+ return 0 unless LOG_MASK($numpri) & $maskpri;
+ }
+ else {
+ croak "syslog: too many facilities given: $word" if defined
$numfac;
+ $facility = $word;
+ $numfac = $num;
+ }
}
croak "syslog: level must be given" unless defined $numpri;
@@ -464,14 +489,14 @@
# private function to translate names to numeric values
#
sub xlate {
- my($name) = @_;
+ my ($name) = @_;
+
return $name+0 if $name =~ /^\s*\d+\s*$/;
$name = uc $name;
$name = "LOG_$name" unless $name =~ /^LOG_/;
- $name = "Sys::Syslog::$name";
- # Can't have just eval { &$name } || -1 because some LOG_XXX may be
zero.
- my $value = eval { no strict 'refs'; &$name };
- $@ = "";
+ my $value = constant($name);
+ $value = -1 if $value =~ /not a valid/;
+
return defined $value ? $value : -1;
}
---------------
Obviously, for the error message to generate, "notice" isn't in @words or
isn't translated properly by xlate() - perhaps "notice" is assigned a value
of zero? However, it looks as if its value should be either 5 or 10.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads