On Sat, 6 Dec 2003 22:35:32 -0500 (EST)
Tim Wilde <[EMAIL PROTECTED]> wrote:

> Sorry to reply to myself, but I was just able to capture this in gdb
> (still don't have the offending zip yet):
> 
> Program received signal SIGPIPE, Broken pipe.
> 0x28117dbc in __sys_write () from /usr/lib/libc_r.so.4
> (gdb) backtrace
> #0  0x28117dbc in __sys_write () from /usr/lib/libc_r.so.4
> #1  0x2810e9f4 in _write () from /usr/lib/libc_r.so.4
> #2  0x2810eb16 in write () from /usr/lib/libc_r.so.4
> #3  0x804db38 in mdprintf (desc=7, str=0x8051663 "%s: OK\n") at
> others.c:50
> #4  0x804d66e in scan (
>     filename=0x8d43fbd
> "/var/spool/MIMEDefang/mdefang-hB73UArt004620/Work",
>     scanned=0x0, root=0x807e800, limits=0xbfbffaa0, options=513,
>     copt=0x80543a0, odesc=7, contscan=0) at scanner.c:172
> #5  0x804bf7b in threadscanner (arg=0x8054420) at server-th.c:80
> #6  0x280d80a8 in _thread_start () from /usr/lib/libc_r.so.4
> #7  0x0 in ?? ()

It seems MIMEDefang closes a connection with clamd when first error is
reported. If a socket's reading end is closed the writing thread
(write() in mdprintf(), others.c:50) receives the SIGPIPE signal. But
this signal is IGNORED (server-th.c:67,532) and write() should return
with EPIPE (and this works perfectly under Linux). So the problem is
with signal handling in threads under FreeBSD (all the threads including
the main one should ignore SIGPIPE).

Best regards,
Tomasz Kojm
-- 
      oo    .....       [EMAIL PROTECTED]         www.ClamAV.net
     (\/)\.........     http://www.clamav.net/gpg/tkojm.gpg
        \..........._   0DCA5A08407D5288279DB43454822DC8985A444B
          //\   /\      Sun Dec  7 13:02:00 CET 2003



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Clamav-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-users

Reply via email to