You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2010/02/10 16:55:16 UTC
[Bug 6329] New: POSIX::strftime in call under Win32 ActivePerl
causes Perl to hang up
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6329
Summary: POSIX::strftime in call under Win32 ActivePerl causes
Perl to hang up
Product: Spamassassin
Version: 3.3.0
Platform: Other
OS/Version: Windows XP
Status: NEW
Severity: blocker
Priority: P5
Component: spamc/spamd
AssignedTo: dev@spamassassin.apache.org
ReportedBy: lemke@jam-software.com
If you try execute spamd under Win32 (tested with ActivePerl 5.8.8) the
POSIX::strftime call in \lib\Mail\SpamAssassin\Logger\Stderr.pm causes perl to
hang up while using 50% of the cpu load. After some debugging it seems as if
the use of %e (numeric day of the month) in the date format is the reason of
this. Using another format does solve it.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6329] POSIX::strftime in call under Win32 ActivePerl causes
Perl to hang up
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6329
Mark Martinec <Ma...@ijs.si> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #8 from Mark Martinec <Ma...@ijs.si> 2010-02-16 16:21:42 UTC ---
3.3:
Sending lib/Mail/SpamAssassin/Logger/Stderr.pm
Committed revision 910577.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6329] POSIX::strftime in call under Win32 ActivePerl causes
Perl to hang up
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6329
--- Comment #6 from Karsten Bräckelmann <gu...@rudersport.de> 2010-02-16 15:57:56 UTC ---
+1 for inclusion in 3.3.1
FWIW, I looked at the code, I did not run it on Windows. ;)
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6329] POSIX::strftime in call under Win32 ActivePerl causes
Perl to hang up
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6329
--- Comment #3 from Daniel <le...@jam-software.com> 2010-02-11 10:54:10 UTC ---
I tried the %e under ActivePerl 5.10.1.1007 and got a curious error:
Use of uninitialized value in printf at C:/Users/lemke/workspace/SA/test.pl
line 9.
Use of uninitialized value in printf at C:/Users/lemke/workspace/SA/test.pl
line 9.
Invalid conversion in printf: "%H" at C:/Users/lemke/workspace/SA/test.pl line
9.
Invalid conversion in printf: "%M" at C:/Users/lemke/workspace/SA/test.pl line
9.
0 0.000000e+000 %H:%M
However, seems to be a bug in ActivePerl. I wrote a message in the official SA
forum, maybe they got a solution. If not, it may still be a good idea to change
the date time format of Stderr.pm in something else.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6329] POSIX::strftime in call under Win32 ActivePerl causes
Perl to hang up
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6329
Mark Martinec <Ma...@ijs.si> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P5 |P2
Target Milestone|Undefined |3.3.1
Severity|blocker |major
--- Comment #5 from Mark Martinec <Ma...@ijs.si> 2010-02-16 15:18:45 UTC ---
trunk:
Bug 6329 - POSIX::strftime in call under Win32 ActivePerl causes Perl to hang
up;
formatting option %e is not in a POSIX standard, use %d instead and edit
Sending lib/Mail/SpamAssassin/Logger/Stderr.pm
Committed revision 910554.
Please try it out and review: svn diff -c 910554
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6329] POSIX::strftime in call under Win32 ActivePerl causes
Perl to hang up
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6329
Kevin A. McGrail <km...@pccc.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kmcgrail@pccc.com
--- Comment #2 from Kevin A. McGrail <km...@pccc.com> 2010-02-10 08:06:42 UTC ---
This little stub program shows the differences:
use POSIX;
print POSIX::strftime("%b %e %H:%M",localtime($now));
print "\n";
print POSIX::strftime("%c",localtime($now));
Dec 31 19:00
Wed 31 Dec 1969 07:00:00 PM EST
However, this sounds more like a bug in perl than something SA should
workaround. Documenting the issue for users to update themselves is fine but
these are not odd time calls.
Perhaps we need a make test for this issue?
KAM
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6329] POSIX::strftime in call under Win32 ActivePerl causes
Perl to hang up
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6329
--- Comment #4 from Daniel <le...@jam-software.com> 2010-02-16 14:42:22 UTC ---
According to the ANSI C standard the %e is not officially specified. To ensure
cross platform usability another format (cf aAbBcdHIjmMpSUwWxXyYZ%) would be
preferable.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6329] POSIX::strftime in call under Win32 ActivePerl causes
Perl to hang up
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6329
--- Comment #7 from Kevin A. McGrail <km...@pccc.com> 2010-02-16 16:04:01 UTC ---
(In reply to comment #6)
> +1 for inclusion in 3.3.1
>
> FWIW, I looked at the code, I did not run it on Windows. ;)
+1 on KAM under same conditions
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6329] POSIX::strftime in call under Win32 ActivePerl causes
Perl to hang up
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6329
Daniel <le...@jam-software.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lemke@jam-software.com
--- Comment #1 from Daniel <le...@jam-software.com> 2010-02-10 07:56:38 UTC ---
Can be solved like this....
diff -u -r Mail-SpamAssassin-3.3.0-orig\lib\Mail\SpamAssassin\Logger\Stderr.pm
Mail-SpamAssassin-3.3.0\lib\Mail\SpamAssassin\Logger\Stderr.pm
--- Mail-SpamAssassin-3.3.0-orig\lib\Mail\SpamAssassin\Logger\Stderr.pm Thu
Jan 21 12:14:52 2010
+++ Mail-SpamAssassin-3.3.0\lib\Mail\SpamAssassin\Logger\Stderr.pm Tue Feb
09 11:52:02 2010
@@ -54,8 +54,9 @@
my ($self, $level, $msg) = @_;
my $now = Time::HiRes::time;
+
printf STDERR ("%s:%06.3f [%d] %s: %s\n",
- POSIX::strftime("%b %e %H:%M",localtime($now)), $now-int($now/60)*60,
+ POSIX::strftime("%c",localtime($now)), $now-int($now/60)*60,
$$, $level, $msg) or warn "Error writing to log file: $!";
# print STDERR "[$$] $level: $msg\n"
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.