From owner-freebsd-stable Tue Dec 5 5:33:25 2000 From owner-freebsd-stable@FreeBSD.ORG Tue Dec 5 05:33:22 2000 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from moon.harmonic.co.il (moon.harmonic.co.il [192.116.140.65]) by hub.freebsd.org (Postfix) with ESMTP id 3919637B400 for ; Tue, 5 Dec 2000 05:33:21 -0800 (PST) Received: (from nobody@localhost) by moon.harmonic.co.il (8.9.3/8.9.3) id PAA19949; Tue, 5 Dec 2000 15:18:49 +0200 To: Max Khon Subject: Re: Mysql segfaults; is the culprit libstdc++, pthread, regex ...? Message-ID: <976022329.3a2ceb3942080@webmail.harmonic.co.il> Date: Tue, 05 Dec 2000 15:18:49 +0200 (IST) From: Roman Shterenzon Cc: stable@FreeBSD.ORG, mreimer@vpop.net References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.2 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Quoting Max Khon : > hi, there! > > > We've been having problems with mysql segfaulting. It seems to occur > > when it tries to return from a function, so maybe the stack is getting > > stomped. > > I have noticed similar problems with ACE wrappers yesterday > (segfaults on "return"s) > > > This problem occurs with mysql 3.23.2[678] (we haven't tested other > > versions), and with FreeBSD 4.2 from Nov 21, 24, 28 (and presumably > > newer) but it does not occur under FreeBSD 4.0 or Linux. > > That's bad. Now I'm trying to build 4.2-RELEASE world (with libc_r > recursive mutex fix) to see if it would fix my problems > (4.2-RELEASE has unaltered g++ and no file descriptor race patchset) Maybe it's due to binutils update rather than the libc_r changes? > > Strangely, what seems to fix the problem for FreeBSD 4.2 is to compile > > mysql with gcc and g++ (instead of cc and c++), by setting CC=gcc and > > CXX=g++. I'm not sure what happens differently, other than that the > > binary compiled with gcc/g++ does not depend on libstdc++, whereas the > > binary compiled with cc/c++ does: > > > /usr/local/mysql/libexec/mysqld: > > libc_r.so.4 => /usr/lib/libc_r.so.4 (0x28176000) > > libm.so.2 => /usr/lib/libm.so.2 (0x28228000) > > libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28243000) > > > > /usr/local/mysql-broken/libexec/mysqld: > > libc_r.so.4 => /usr/lib/libc_r.so.4 (0x281d8000) > > libz.so.2 => /usr/lib/libz.so.2 (0x2828a000) > > libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28297000) > > libstdc++.so.3 => /usr/lib/libstdc++.so.3 (0x282ac000) > > libm.so.2 => /usr/lib/libm.so.2 (0x282f2000) > > > > Why does compiling mysql this way fix the problem? > > can you show me `which g++` and `g++ -v` output? > seems that you have g++ which is actually /usr/ports/lang/egcs -- that > g++ > link programs against libstdc++ statically. it also uses other exception > handling scheme. does mysql use exceptions? > > /fjoe > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-stable" in the body of the message > --Roman Shterenzon, UNIX System Administrator and Consultant [ Xpert UNIX Systems Ltd., Herzlia, Israel. Tel: +972-9-9522361 ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message