Re: sophie deadlock
Chris Stromsoe <[email protected]> Sun, 13 Aug 2006 18:07:10 -0700 (PDT)
| Newsgroups | gmane.comp.security.virus.vtools |
|---|---|
| Message-ID | <[email protected]> |
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1635799168-1079598246-1155517475=:20445 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; FORMAT=flowed Content-ID: <[email protected]> On Thu, 20 Jul 2006, Martin Zuziak wrote: > There seems to be a problem in sophie which leads to a deadlock on > receiving SIGHUP. > > The SIGHUP handler does too much work. It calls sophie_print which does > some syslog stuff and calls functions which aren't safe. I'm seeing this > problem every few months on my mail server (Suse Linux 9.2 with a 2.6.8 > kernel and glibc-2.3.3) and have reproduced it on Suse 10.1 with a > 2.6.16 kernel and glibc-2.4. > > If I change the SIGHUP handler to just raise a flag and test on that > flag in the main for-loop the problem goes away. I can confirm this and am using a similar work-around. The patch I'm using is attached. Can this (or something better) be incorporated upstream? -Chris --1635799168-1079598246-1155517475=:20445 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=sophie.c.diff Content-ID: <[email protected]> Content-Description: Content-Disposition: ATTACHMENT; FILENAME=sophie.c.diff Content-Transfer-Encoding: BASE64 LS0tIHNvcGhpZS5jLm9yaWcJMjAwNS0xMS0xNSAyMjozMzoxNy4wMDAwMDAw MDAgLTA4MDANCisrKyBzb3BoaWUuYwkyMDA2LTA4LTEzIDE4OjAyOjA4LjAw MDAwMDAwMCAtMDcwMA0KQEAgLTQ4LDYgKzQ4LDkgQEANCiAvKiBjaGlsZCBv ciBub3QgKi8NCiBpbnQgaXNfY2hpbGQgPSAwOw0KIA0KKy8qIGdvdCBhIEhV UCwgcmVsb2FkICovDQoraW50IGRvX3JlbG9hZCA9IDA7DQorDQogLyogUHJp bnQgdGhlIHVzYWdlICovDQogc3RhdGljIHZvaWQgdXNhZ2Uodm9pZCkNCiB7 DQpAQCAtMTM3LDYgKzE0MCwxMiBAQA0KIC8vCXN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="us-ascii" MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 7bit _______________________________________________ vtools mailing list [email protected] http://www.vanja.com/list/listinfo.cgi/vtools --1635799168-1079598246-1155517475=:20445--