From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dale Mellor Newsgroups: gmane.lisp.guile.bugs Subject: bug#15411: libguile initialization inside a pthread segfaults Date: Wed, 18 Sep 2013 20:36:39 +0100 Message-ID: <1379532999.4818.5.camel@l2> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-NVvvTZgdq98ZH14lMet6" X-Trace: ger.gmane.org 1379537838 3713 80.91.229.3 (18 Sep 2013 20:57:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Sep 2013 20:57:18 +0000 (UTC) To: 15411@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Sep 18 22:57:21 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VMOoK-0004Cp-Qv for guile-bugs@m.gmane.org; Wed, 18 Sep 2013 22:57:21 +0200 Original-Received: from localhost ([::1]:48737 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMOoK-00064T-IA for guile-bugs@m.gmane.org; Wed, 18 Sep 2013 16:57:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMNiJ-0002PZ-Lg for bug-guile@gnu.org; Wed, 18 Sep 2013 15:47:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMNiI-0006J6-Cm for bug-guile@gnu.org; Wed, 18 Sep 2013 15:47:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMNiI-0006Ii-9d for bug-guile@gnu.org; Wed, 18 Sep 2013 15:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VMNiH-0006W4-T9 for bug-guile@gnu.org; Wed, 18 Sep 2013 15:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dale Mellor Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 18 Sep 2013 19:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15411 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137953359825004 (code B ref -1); Wed, 18 Sep 2013 19:47:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Sep 2013 19:46:38 +0000 Original-Received: from localhost ([127.0.0.1]:47305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMNht-0006VE-Cz for submit@debbugs.gnu.org; Wed, 18 Sep 2013 15:46:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58822) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMNYv-0006AC-Co for submit@debbugs.gnu.org; Wed, 18 Sep 2013 15:37:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMNYj-0003Wq-FD for submit@debbugs.gnu.org; Wed, 18 Sep 2013 15:37:15 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMNYj-0003WW-Bh for submit@debbugs.gnu.org; Wed, 18 Sep 2013 15:37:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMNYd-0000ez-S9 for bug-guile@gnu.org; Wed, 18 Sep 2013 15:37:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMNYY-0003EM-C4 for bug-guile@gnu.org; Wed, 18 Sep 2013 15:37:03 -0400 Original-Received: from rdmp.org ([46.137.114.159]:39909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMNYY-0003DF-31 for bug-guile@gnu.org; Wed, 18 Sep 2013 15:36:58 -0400 Original-Received: from [127.0.0.1] (helo=[IPv6:::1]) by rdmp.org with esmtp (Exim 4.77) (envelope-from ) id 1VMNYP-0002qp-Kl for bug-guile@gnu.org; Wed, 18 Sep 2013 20:36:51 +0100 X-Mailer: Evolution 3.4.4-3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Wed, 18 Sep 2013 15:46:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Wed, 18 Sep 2013 16:57:17 -0400 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7285 Archived-At: --=-NVvvTZgdq98ZH14lMet6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The following program fails; it produces the session shown below. Any help greatly appreciated. Dale =3DPROGRAM=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D #include static void *do_guile (void *) { for (;;) ; return nullptr; } static void *run_thread (void *) { return scm_with_guile (&do_guile, nullptr); } int main (int, char **) { pthread_t thread; pthread_create (&thread, nullptr, run_thread, nullptr); pthread_join (thread, nullptr); return 0; } =3D/PROGRAM=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3DSESSION=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D $ cat /etc/debian_version=20 7.1 $ g++-4.6 --version g++-4.6 (Debian 4.6.3-14) 4.6.3 $ guile --version guile (GNU Guile) 2.0.5-deb+1-3 $ g++-4.6 --std=3Dc++0x test.cc `pkg-config --libs --cflags guile-2.0` -g $ gdb a.out GNU gdb (GDB) 7.4.1-debian This GDB was configured as "i486-linux-gnu". Reading symbols from a.out...done. (gdb) r Starting program: a.out=20 warning: Could not load shared library symbols for linux-gate.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1". [New Thread 0xb7916b40 (LWP 4792)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7916b40 (LWP 4792)] 0xb7e2854f in GC_push_all_eager () from /usr/lib/libgc.so.1 (gdb) info stack #0 0xb7e2854f in GC_push_all_eager () from /usr/lib/libgc.so.1 #1 0xb7e285a3 in GC_push_all_stack () from /usr/lib/libgc.so.1 #2 0xb7e30b9b in GC_push_all_stacks () from /usr/lib/libgc.so.1 #3 0xb7e2b6e4 in GC_default_push_other_roots () from /usr/lib/libgc.so.1 #4 0xb7e29c45 in GC_push_roots () from /usr/lib/libgc.so.1 #5 0xb7e290b6 in GC_mark_some () from /usr/lib/libgc.so.1 #6 0xb7e1ffb5 in GC_stopped_mark () from /usr/lib/libgc.so.1 #7 0xb7e206ba in GC_try_to_collect_inner () from /usr/lib/libgc.so.1 #8 0xb7e2ae50 in GC_init_inner () from /usr/lib/libgc.so.1 #9 0xb7e2afa4 in GC_init () from /usr/lib/libgc.so.1 #10 0xb7eba7d0 in ?? () from /usr/lib/libguile-2.0.so.22 #11 0xb7ecbebd in ?? () from /usr/lib/libguile-2.0.so.22 #12 0xb7f29750 in ?? () from /usr/lib/libguile-2.0.so.22 #13 0xb7f29790 in ?? () from /usr/lib/libguile-2.0.so.22 #14 0xb7e2aa2e in GC_call_with_stack_base () from /usr/lib/libgc.so.1 #15 0xb7f2998f in scm_with_guile () from /usr/lib/libguile-2.0.so.22 #16 0x08048663 in run_thread () at test.cc:16 #17 0xb7cb2cf1 in start_thread () from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 #18 0xb7bebfee in clone () from /lib/i386-linux-gnu/i686/cmov/libc.so.6 (gdb) thr 1 [Switching to thread 1 (Thread 0xb7918700 (LWP 4789))] #0 0xb7fde424 in __kernel_vsyscall () (gdb) info stack #0 0xb7fde424 in __kernel_vsyscall () #1 0xb7cb3d8c in pthread_join () from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 #2 0x080486a6 in main () at test.cc:26 (gdb) quit =3D/SESSION=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=-NVvvTZgdq98ZH14lMet6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEABECAAYFAlI6AMcACgkQykcf1QFhiklBhACaAxMVTa2Ov9RjSwHiefG5MK5N g6YAn3swRnii1sOthH4bqXnDafCjMVBW =PQCW -----END PGP SIGNATURE----- --=-NVvvTZgdq98ZH14lMet6--