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...@issues.apache.org on 2010/08/11 09:59:39 UTC

[Bug 6482] New: spamd crash when run under Windows x64

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6482

           Summary: spamd crash when run under Windows x64
           Product: Spamassassin
           Version: 3.3.1
          Platform: PC
        OS/Version: Windows 7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: spamc/spamd
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: lemke@jam-software.com


I was just able to work around a bug with a specific dll when SpamAssassin is
executed under a Win x64 system.

I'm aware that it's not a SpamAssassin bug but I guess that users having that
issue will have a look here first (so it should give them some information, at
least).

Steps to reproduce:
- Use a x64 Windows
- Install Perl (x86) (I tested Strawberry 5.10, 5.12 and ActivePerl 5.8.8,
5.8.9, 5.10, 5.12)
- Install SpamAssassin
- Start spamd with a small --max-spare (e.g. 1) and -m 10 or so.
- Let it process several mails at once so spamd will have to start couple of
new children.

When processing is finished, spamd will kill most children. This will cause the
interpreter to unload a dll, called IPHLPAPI.dll. Now, any call to that dll
(dns resolves, etc.) will cause spamd to crash.

I added the following call in spamd spawn() sub to "fix" it:
  $pid = fork();
  die "spamd: fork: $!" unless defined $pid;
  Win32::LoadLibrary("Iphlpapi");

I'm not yet sure where I do have to report this. It may be a problem of Perl or
of Microsoft's concept in 64-bit systems, where they have something like a
layer virtual box for x86 processes that links to the corresponding x64
libraries.


Daniel

-- 
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 6482] spamd crash when run under Windows x64

Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6482

Daniel Lemke <le...@jam-software.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lemke@jam-software.com

--- Comment #1 from Daniel Lemke <le...@jam-software.com> 2010-08-24 04:42:25 UTC ---
This bug may be closely related to Bug 6359: In order to avoid "safe" signals,
posix:sigaction is used in the util script. POSIX::SIGALRM( ) isn't available
for Windows so we explicit forced the script to use $SIG{ALRM} instead. I've
just found this article describing exactly that issue: 

> Note that some networking library functions like gethostbyname() are 
> known to have their own implementations of timeouts which may conflict 
> with your timeouts. If you are having problems with such functions, you 
> can try using the POSIX sigaction() function, which bypasses the Perl 
> safe signals (note that this means subjecting yourself to possible 
> memory corruption, as described above). 
See: http://perldoc.perl.org/perlipc.html#Deferred-Signals-%28Safe-Signals%29

Note that the crash always occured immediately after a call of
gethostbyname()...

May it be possible to use Perl::Unsafe::Signals for the affected parts instead?

Daniel

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.