From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 13 16:47:57 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F3C116A4CE for ; Sun, 13 Feb 2005 16:47:57 +0000 (GMT) Received: from relay.rdsnet.ro (gimli.rdsnet.ro [193.231.236.70]) by mx1.FreeBSD.org (Postfix) with SMTP id 1E11043D1F for ; Sun, 13 Feb 2005 16:47:56 +0000 (GMT) (envelope-from itetcu@people.tecnik93.com) Received: (qmail 26744 invoked from network); 13 Feb 2005 16:43:12 -0000 Received: from unknown (HELO smtp.rdsnet.ro) (62.231.74.130) by smtp1-133.rdsnet.ro with SMTP; 13 Feb 2005 16:43:12 -0000 Received: (qmail 22164 invoked by uid 89); 13 Feb 2005 16:51:37 -0000 Received: from unknown (HELO it.buh.tecnik93.com) (81.196.204.98) by 0 with SMTP; 13 Feb 2005 16:51:37 -0000 Received: from it.buh.tecnik93.com (localhost.buh.tecnik93.com [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with ESMTP id F1A9A114D4; Sun, 13 Feb 2005 18:47:52 +0200 (EET) Date: Sun, 13 Feb 2005 18:47:52 +0200 From: Ion-Mihai Tetcu To: Ion-Mihai Tetcu Message-ID: <20050213184752.611ce46c@it.buh.tecnik93.com> In-Reply-To: <20050213182616.036ba07a@it.buh.tecnik93.com> References: <20050210225558.7a0879ec@it.buh.cameradicommercio.ro> <20050213150330.GI65523@green.homeunix.org> <20050213182616.036ba07a@it.buh.tecnik93.com> X-Mailer: Sylpheed-Claws 1.0.1 (GTK+ 1.2.10; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: SIGBUS help, please X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 16:47:57 -0000 On Sun, 13 Feb 2005 18:26:16 +0200 Ion-Mihai Tetcu wrote: > On Sun, 13 Feb 2005 10:03:30 -0500 > Brian Fundakowski Feldman wrote: > > > On Thu, Feb 10, 2005 at 10:55:58PM +0200, Ion-Mihai Tetcu wrote: > > > Hi, > > > > > > > > > One of my ports - mail/dspam-devel stays at 3.4 because newer versions > > > crash on FreeBSD (they work on Linux and Solaris). > > > Can someone make some sense from the output bellow ? > > > > > > I'm willing to make a port and help with all needed setup information - > > > a 5-10 minutes job if someone has the time for it. > > > > Have you tried valgrind in any of its modes yet? > > I wouldn't have posted here without reaching my level of incompetence > first :-/ > > Beginning with 3.3.2 dspam's author has rewritten a lot of code > involving threads and with his help I've managed to make it work on > FreeBSD and so I can run 3.3.4 in production. After 3.3.4 I haven't been > able to keep up with him and besides this crash, which mask it, there is > at least an other threading bug on FreeBSD. Not that I'm understanding why, but _right now_, run from gdb or not it works, even if I deliver multiple messages in parallel. And this inconsistent behaviour it's not a local problem, I've reproduced it on 2 boxes and got users reports too. I'm really loss :( In valgrind, on the other hand, --trace-pthread=all --trace-signals=yes it dies: --85813-- PTHREAD[1]: pthread_getspecific_ptr --85813-- PTHREAD[1]: pthread_getspecific_ptr --85813-- PTHREAD[1]: pthread_mutex_unlock mx 0x3C1CD474 ... --85813-- sys_wait_results: got PX_SetSigmask for TID 2 85813: [2/13/2005 18:41:39] No QuarantineAgent option found. Using quarantine. 85813: [2/13/2005 18:41:39] using database handle id 1 --85813-- PTHREAD[2]: pthread_mutex_lock mx 0x3C2EB698 ... 85813: [2/13/2005 18:41:40] DSPAM Instance Startup 85813: [2/13/2005 18:41:40] input args: --user itetcu --classify 85813: [2/13/2005 18:41:40] pass-thru args: /usr/libexec/mail.local -d %u 85813: [2/13/2005 18:41:40] processing user itetcu 85813: [2/13/2005 18:41:40] uid = 0, euid = 0, gid = 0, egid = 0 85813: [2/13/2005 18:41:40] Loading preferences for user itetcu 85813: [2/13/2005 18:41:40] Loading preferences from dspam.conf 85813: [2/13/2005 18:41:40] using /var/db/dspam/opt-in/itetcu.dspam as path 85813: [2/13/2005 18:41:40] using /var/db/dspam/opt-out/itetcu.nodspam as path 85813: [2/13/2005 18:41:40] sedation level set to: 4 ==85813== Thread 2: ==85813== Conditional jump or move depends on uninitialised value(s) ==85813== at 0x80622A6: _ds_get_signature (mysql_drv.c:1095) ==85813== by 0x804FAED: process_message (dspam.c:352) ==85813== by 0x8050BD6: process_users (dspam.c:1408) ==85813== by 0x80540DF: process_connection (daemon.c:404) ==85813== ==85813== Thread 2: ==85813== Conditional jump or move depends on uninitialised value(s) ==85813== at 0x80622AC: _ds_get_signature (mysql_drv.c:1095) ==85813== by 0x804FAED: process_message (dspam.c:352) ==85813== by 0x8050BD6: process_users (dspam.c:1408) ==85813== by 0x80540DF: process_connection (daemon.c:404) 85813: [2/13/2005 18:41:40] mysql_fetch_row() failed in _ds_get_signature 85813: [2/13/2005 18:41:40] signature retrieval for '420bca9c781172725874071' failed ==85813== ==85813== Thread 2: ==85813== Conditional jump or move depends on uninitialised value(s) ==85813== at 0x805A404: _ds_operate (libdspam.c:1057) ==85813== by 0x805BB0E: dspam_process (libdspam.c:525) ==85813== by 0x804F587: process_message (dspam.c:396) ==85813== by 0x8050BD6: process_users (dspam.c:1408) ==85813== ==85813== Thread 2: ==85813== Conditional jump or move depends on uninitialised value(s) ==85813== at 0x805A40A: _ds_operate (libdspam.c:1057) ==85813== by 0x805BB0E: dspam_process (libdspam.c:525) ==85813== by 0x804F587: process_message (dspam.c:396) ==85813== by 0x8050BD6: process_users (dspam.c:1408) 85813: [2/13/2005 18:41:45] Loading 537 BNR patterns --85813-- signal 10 arrived ... si_code=30 --85813-- delivering signal 10 (SIGBUS) to thread 2 --85813-- delivering 10 to default handler terminate+core ==85813== ==85813== Process terminating with default action of signal 10 (SIGBUS): dumping core ==85813== at 0x8060878: bnr_finalize (bnr.c:313) ==85813== by 0x805B5A1: _ds_operate (libdspam.c:1213) ==85813== by 0x805BB0E: dspam_process (libdspam.c:525) ==85813== by 0x804F587: process_message (dspam.c:396) ==85813== ==85813== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0) ==85813== malloc/free: in use at exit: 813289 bytes in 25497 blocks. ==85813== malloc/free: 37449 allocs, 11952 frees, 1680394 bytes allocated. ==85813== For counts of detected errors, rerun with: -v ==85813== searching for pointers to 25497 not-freed blocks. ==85813== checked 3951736 bytes. -- IOnut Unregistered ;) FreeBSD "user"