Can bogofilter run by multiprocess at the same time

陈治璋 john.chen at net263.com
Mon Oct 18 03:59:30 CEST 2004


在2004年10月15日的16:00,Matthias Andree写道:
> .™...’. <john.chen at net263.com> writes:
> 
> > I know. But the emails come from many machines and we don't want to
> > setup a bogofilter in every machine. So we decide to setup a central
> > machine a handle the spam check. And the emails must be sent through
> > socket to this central machine where bogofilter is called. I tried using
> > popen-pclose or system() to call bogofilter in a multi-thread daemon
> > process. But the test always fail sooner or later.
> 
> Can you compile bogofilter with -O -g flags (with gcc) or just -g (when
> using a different compiler than gcc), and try to obtain a stack
> backtrace when it hangs? (For GDB, find the process ID and type "gdb
> bogofilter 12345" (where 12345 is the process ID), then "backtrace",
> then "detach", then "quit".) Then show us the backtrace. In my cases,
> whenever it hung on Linux, it hung while reading input, which makes me
> wonder if the pipe writer in your code is working properly, or if the
> Linux libraries are right.

the bogofiler version is 0.15.7. Following is the backtrace when
bogofilter hangs:
#0  0xff218d4c in _read () from /usr/lib/libc.so.1
#1  0xff209a10 in _filbuf () from /usr/lib/libc.so.1
#2  0x0001c5a0 in xfgetsl (
    buf=0x67b342
"SFQ6IGdyYXkgM3B0IGRvdWJsZTs></o:p></SPAN></SPAN></P></TD> \n   <TD 
\n    style=\"BORDER-RIG", max_size=6804290, in=0x155e68,
    no_nul_terminate=1) at fgetsl.c:39
#3  0x0001a560 in buff_fgetsl (self=0x67d342, in=0x67d342) at buff.c:63

There are about 11 bogofilter processes hang, all at the _read()
function.

There are two test program processes, the parent process hangs at:

#0  0xff299d7c in vfork () from /usr/lib/libc.so.1
#1  0xff28e940 in popen () from /usr/lib/libc.so.1
#2  0x00012854 in bogo_check (p=0x13b90) at testbogo.c:69
#3  0xff1cbc10 in _thread_start () from /usr/lib/libthread.so.1

The child process hangs at:

#0  0xff2998bc in _lwp_sema_wait () from /usr/lib/libc.so.1
#1  0xff1b97fc in _park () from /usr/lib/libthread.so.1
#2  0xff1b94d8 in _swtch () from /usr/lib/libthread.so.1
#3  0xff1bad88 in _mutex_adaptive_lock () from /usr/lib/libthread.so.1









More information about the bogofilter-dev mailing list