From owner-freebsd-current@FreeBSD.ORG Thu Dec 6 17:13:36 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5633DC76 for ; Thu, 6 Dec 2012 17:13:36 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id 0FD1D8FC0C for ; Thu, 6 Dec 2012 17:13:34 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Tgf0i-0006Sl-QK for freebsd-current@freebsd.org; Thu, 06 Dec 2012 18:13:20 +0100 Received: from 208.85.208.53 ([208.85.208.53]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Dec 2012 18:13:20 +0100 Received: from atkin901 by 208.85.208.53 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Dec 2012 18:13:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Mark Atkinson Subject: problems with threads/destructors in -current with llvm/clang Date: Thu, 06 Dec 2012 09:12:55 -0800 Lines: 116 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 208.85.208.53 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/17.0 Thunderbird/17.0 X-Enigmail-Version: 1.4.6 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2012 17:13:36 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Short backstory, I had recently upgraded my workstation to the latest current which included clang as default cc now. Compiling chromium failed for want of SSE2, which led me to recompile world with CPUTYPE?=core2. The original flag for world/ports was CPUTYPE?=i686. After recompilation chromium would sigbus on loading any extensions. I made a concerted effort to recompile the whole ports tree and base on clang to make sure the link stages were CPUTYPE clean, but I experienced the same behavior. Probably the best illustration of the type of problems I'm seeing is qdbus from /usr/ports/devel/dbus-qt4. Compiled with clang at r243950: qdbus under kde segfaults in malloc with a huge recursion stack: [...] #44740 0x282f7bd4 in QObject::QObject () from /usr/local/lib/qt4/libQtCore.so.4 #44741 0x281cb649 in QAdoptedThread::QAdoptedThread () from /usr/local/lib/qt4/libQtCore.so.4 #44742 0x281ce146 in QThreadData::current () from /usr/local/lib/qt4/libQtCore.so.4 #44743 0x282f7bd4 in QObject::QObject () from /usr/local/lib/qt4/libQtCore.so.4 #44744 0x281cb649 in QAdoptedThread::QAdoptedThread () from /usr/local/lib/qt4/libQtCore.so.4 #44745 0x281ce146 in QThreadData::current () from /usr/local/lib/qt4/libQtCore.so.4 #44746 0x282f7bd4 in QObject::QObject () from /usr/local/lib/qt4/libQtCore.so.4 #44747 0x281cb649 in QAdoptedThread::QAdoptedThread () from /usr/local/lib/qt4/libQtCore.so.4 #44748 0x281ce146 in QThreadData::current () from /usr/local/lib/qt4/libQtCore.so.4 #44749 0x281cbc05 in QThread::currentThread () from /usr/local/lib/qt4/libQtCore.so.4 #44750 0x28095d21 in QDBusConnectionPrivate::deleteYourself () from /usr/local/lib/qt4/libQtDBus.so.4 #44751 0x28089634 in QDBusConnection::~QDBusConnection () from /usr/local/lib/qt4/libQtDBus.so.4 #44752 0x0804b800 in __dtor__ZL10connection () #44753 0x28660417 in __cxa_finalize () from /lib/libc.so.7 #44754 0x2860747a in exit () from /lib/libc.so.7 #44755 0x0804c125 in main () (gdb) Compiled with gcc46, no segfault, and seems to follow a normal chain to exiting. [Switching to Thread 29003080 (LWP 100603/qdbus)] Breakpoint 2, 0x285f8462 in exit () from /lib/libc.so.7 (gdb) n Single stepping until exit from function exit, which has no line number information. 0x28677fc0 in f_prealloc () from /lib/libc.so.7 (gdb) n Single stepping until exit from function f_prealloc, which has no line number information. 0x2861bd30 in register_printf_render_std () from /lib/libc.so.7 (gdb) n Single stepping until exit from function register_printf_render_std, which has no line number information. 0x28678190 in fflush () from /lib/libc.so.7 (gdb) n Single stepping until exit from function fflush, which has no line number information. 0x2861bd7e in register_printf_render_std () from /lib/libc.so.7 (gdb) n Single stepping until exit from function register_printf_render_std, which has no line number information. 0x28678190 in fflush () from /lib/libc.so.7 (gdb) n Single stepping until exit from function fflush, which has no line number information. 0x2861bd7e in register_printf_render_std () from /lib/libc.so.7 (gdb) n Single stepping until exit from function register_printf_render_std, which has no line number information. 0x28678190 in fflush () from /lib/libc.so.7 (gdb) n Single stepping until exit from function fflush, which has no line number information. 0x2861bd7e in register_printf_render_std () from /lib/libc.so.7 (gdb) n Single stepping until exit from function register_printf_render_std, which has no line number information. 0x28677fdf in f_prealloc () from /lib/libc.so.7 (gdb) n Single stepping until exit from function f_prealloc, which has no line number information. 0x285f848b in exit () from /lib/libc.so.7 (gdb) n Single stepping until exit from function exit, which has no line number information. Program exited normally. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlDA0hcACgkQrDN5kXnx8yb/UACfbpACSvjZGIl7d7H30mb6dptX C2MAn2Jxfr/9MVKG4HzC1KOBl+N8EiLe =9pw6 -----END PGP SIGNATURE-----