http://bugzilla.spamassassin.org/show_bug.cgi?id=3625





------- Additional Comments From [EMAIL PROTECTED]  2004-08-31 12:04 -------
does this fix the bug?

I don't think this is the correct fix, but haven't the time to look into it.
Here's what I think is happening...

  1. syslog() is called in a spamd child

  2. that calls 

1440  send(4, "<22>spamd[1440]: Attempt to free unreferenced scalar at
/usr/bin/spamd line 1645.\n\0", 83, 0) = -1 EPIPE (Broken pipe)
1440  --- SIGPIPE (Broken pipe) @ 0 (0) ---

  3. something in syslog() catches this and forks in order to write
  to /dev/console (which fails, but that's irrelevant.)

1440  fork()                            = 1441
1441  open("/dev/console", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EACCES
(Permission denied)

  4. that exits:

1441  _exit(0)                          = ?

  5. spamd child process catches SIGCHLD from that fork'd proc

1440  --- SIGCHLD (Child exited) @ 0 (0) ---
1440  write(2, "logmsg: logmsg: server hit by SIGCHLD, pid -1\n", 46) = 46
1440  send(4, "<22>spamd[1440]: logmsg: server hit by SIGCHLD, pid -1\n\0", 56,
0) = -1 EPIPE (Broken pipe)
1440  --- SIGPIPE (Broken pipe) @ 0 (0) ---

  6. goto step 1


hence the loop.  possible workarounds to investigate:

    1. figure out why syslog() is forking at all, that's not good

    2. figure out why our SIGPIPE catcher isn't being invoked, or
    the $main::SIGPIPE_RECEIVED var makes no difference: is it
    because the eval { } doesn't fail?

    3. don't catch SIGCHLD in the spamd children.  use SIG_DFL
    and don't lot anything.   or:

    4. catch and ignore SIGCHLD in the logmsg_syslog() function

--j.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to