From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marijn Newsgroups: gmane.lisp.guile.bugs Subject: Re: guile-2.0.0 fails to build without threads Date: Thu, 05 May 2011 10:04:30 +0200 Message-ID: <4DC25A0E.8060107@gentoo.org> References: <4D9DCE98.5080808@gentoo.org> <4DA3FEA2.7060205@gentoo.org> <4DA5A8DA.6030707@gentoo.org> <4DA5B2C7.8010009@gentoo.org> <4DA6F5D9.8080905@gentoo.org> <87pqo68qw8.fsf@gnu.org> <87k4ee8lad.fsf@gnu.org> <4DC01809.1090704@gentoo.org> <87ei4er73u.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1304582538 20996 80.91.229.12 (5 May 2011 08:02:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 May 2011 08:02:18 +0000 (UTC) Cc: bug-guile@gnu.org To: =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu May 05 10:02:14 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QHtVl-00030X-D3 for guile-bugs@m.gmane.org; Thu, 05 May 2011 10:02:13 +0200 Original-Received: from localhost ([::1]:59731 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHtVk-0005pQ-RS for guile-bugs@m.gmane.org; Thu, 05 May 2011 04:02:12 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHtVh-0005p8-EZ for bug-guile@gnu.org; Thu, 05 May 2011 04:02:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHtVc-0007j5-TV for bug-guile@gnu.org; Thu, 05 May 2011 04:02:09 -0400 Original-Received: from smtp.gentoo.org ([140.211.166.183]:38673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHtVc-0007ix-E3; Thu, 05 May 2011 04:02:04 -0400 Original-Received: from [10.128.6.185] (unknown [79.170.210.174]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hkbst) by smtp.gentoo.org (Postfix) with ESMTPSA id A1B6E1B4066; Thu, 5 May 2011 08:02:00 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110308 Lightning/1.0b3pre Thunderbird/3.1.9 In-Reply-To: <87ei4er73u.fsf@gnu.org> X-Enigmail-Version: 1.1.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.211.166.183 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.14 Precedence: list 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:5557 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Ludo, On 05/04/11 14:19, Ludovic Court=C3=A8s wrote: >>> Actually, Marijn: can you try =E2=80=9CGC_DUMP_REGULARLY=3D1 ./meta/g= uile -c 0=E2=80=9D, >>> and check what=E2=80=99s under =E2=80=9CStatic roots=E2=80=9D? >=20 > More precisely: >=20 > --8<---------------cut here---------------start------------->8--- > $ ./meta/gdb-uninstalled-guile > GNU gdb (GDB) 7.2 > Copyright (C) 2010 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copyi= ng" > and "show warranty" for details. > This GDB was configured as "x86_64-unknown-linux-gnu". > For bug reporting instructions, please see: > ... > Reading symbols from /home/ludo/src/guile/libguile/.libs/guile...done. > (gdb) set environment GC_DUMP_REGULARLY "1" > (gdb) b main > Breakpoint 1 at 0x400ab0: file guile.c, line 69. > (gdb) r -c 0 > The program being debugged has been started already. > Start it from the beginning? (y or n) y >=20 > Starting program: /home/ludo/src/guile/libguile/.libs/guile -c 0 > [Thread debugging using libthread_db enabled] >=20 > Breakpoint 1, main (argc=3D3, argv=3D0x7fffffffce88) at guile.c:69 > 69 { > (gdb) p &scm_protects > $2 =3D (SCM *) 0x7ffff7dd7788 > (gdb) c > Continuing. > ***Static roots: > Total size: 0 >=20 > ***Heap sections: > Total heap size: 65536 > Section 0 from 0x663000 to 0x673000 0/16 blacklisted >=20 > ***Free blocks: > Free list 16 (total size 65536): > 0x663000 size 65536 not black listed > Total of 65536 bytes on free list >=20 > ***Blocks in use: > (kind(0=3Dptrfree,1=3Dnormal,2=3Dunc.):size_in_bytes, #_marks_set) >=20 > blocks =3D 0, bytes =3D 0 > ***Static roots: > From 0x601000 to 0x601360 (temporary) > From 0x7ffff7db0000 to 0x7ffff7ddde00 (temporary) ;; =E2=86=90 here! > From 0x7ffff7a1b000 to 0x7ffff7a5e6e0 (temporary) > From 0x7ffff77ee000 to 0x7ffff77f23b0 (temporary) > From 0x7ffff75d5000 to 0x7ffff75d5108 (temporary) > From 0x7ffff73d1000 to 0x7ffff73d18e0 (temporary) > From 0x7ffff71c5d58 to 0x7ffff71c9f08 (temporary) > From 0x7ffff6eb2a08 to 0x7ffff6eb3f60 (temporary) > From 0x7ffff6c5f450 to 0x7ffff6c5f988 (temporary) > From 0x7ffff6a28000 to 0x7ffff6a561c0 (temporary) > From 0x7ffff681f000 to 0x7ffff681f0e8 (temporary) > From 0x7ffff6598000 to 0x7ffff659dbe8 (temporary) > From 0x7ffff7ffd000 to 0x7ffff7ffe188 (temporary) > Total size: 725552 > --8<---------------cut here---------------end--------------->8--- >=20 > Above =E2=80=98scm_protects=E2=80=99 clearly appears as a root. Can yo= u check this? IIUC then also for me it appears as a root: ./meta/gdb-uninstalled-guile GNU gdb (Gentoo 7.2 p1) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying= " and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /var/tmp/portage/dev-scheme/guile-999/work/guile-999/libguile/.libs/guile= ...done. (gdb) set environment GC_DUMP_REGULARLY "1" (gdb) b main Breakpoint 1 at 0x400ae0: file guile.c, line 69. (gdb) r -c 0 Starting program: /var/tmp/portage/dev-scheme/guile-999/work/guile-999/libguile/.libs/guile= -c 0 Breakpoint 1, main (argc=3D3, argv=3D0x7fffffffd518) at guile.c:69 69 { (gdb) p &scm_protects $1 =3D (SCM *) 0x7ffff7bc45a8 (gdb) c Continuing. ***Static roots: Total size: 0 ***Heap sections: Total heap size: 65536 Section 0 from 0x642000 to 0x652000 0/16 blacklisted ***Free blocks: Free list 16 (Total size 65536): 0x642000 size 65536 not black listed Total of 65536 bytes on free list ***Blocks in use: (kind(0=3Dptrfree,1=3Dnormal,2=3Dunc.):size_in_bytes, #_marks_set) blocks =3D 0, bytes =3D 0 ***Static roots: - From 0x601000 to 0x6010c0 (temporary) - From 0x7ffff7ddb000 to 0x7ffff7ddd5c8 (temporary) - From 0x7ffff7b9e000 to 0x7ffff7bcabb8 (temporary) ;; <- here - From 0x7ffff7849000 to 0x7ffff784e8a8 (temporary) - From 0x7ffff74c7000 to 0x7ffff74c7100 (temporary) - From 0x7ffff7282000 to 0x7ffff72c3fe0 (temporary) - From 0x7ffff705f000 to 0x7ffff705f5f0 (temporary) - From 0x7ffff6e56000 to 0x7ffff6e57868 (temporary) - From 0x7ffff6b36000 to 0x7ffff6b3e140 (temporary) - From 0x7ffff68ce000 to 0x7ffff68ce2b0 (temporary) - From 0x7ffff6696000 to 0x7ffff66c41c0 (temporary) - From 0x7ffff648d000 to 0x7ffff648d0e8 (temporary) - From 0x7ffff7ffd000 to 0x7ffff7ffe188 (temporary) Total size: 721472 ***Heap sections: Total heap size: 65536 Section 0 from 0x642000 to 0x652000 0/16 blacklisted ***Free blocks: Free list 16 (Total size 65536): 0x642000 size 65536 not black listed Total of 65536 bytes on free list ***Blocks in use: (kind(0=3Dptrfree,1=3Dnormal,2=3Dunc.):size_in_bytes, #_marks_set) blocks =3D 0, bytes =3D 0 ***Static roots: - From 0x601000 to 0x6010c0 (temporary) - From 0x7ffff7ddb000 to 0x7ffff7ddd5c8 (temporary) - From 0x7ffff7b9e000 to 0x7ffff7bcabb8 (temporary) - From 0x7ffff7849000 to 0x7ffff784e8a8 (temporary) - From 0x7ffff74c7000 to 0x7ffff74c7100 (temporary) - From 0x7ffff7282000 to 0x7ffff72c3fe0 (temporary) - From 0x7ffff705f000 to 0x7ffff705f5f0 (temporary) - From 0x7ffff6e56000 to 0x7ffff6e57868 (temporary) - From 0x7ffff6b36000 to 0x7ffff6b3e140 (temporary) - From 0x7ffff68ce000 to 0x7ffff68ce2b0 (temporary) - From 0x7ffff6696000 to 0x7ffff66c41c0 (temporary) - From 0x7ffff648d000 to 0x7ffff648d0e8 (temporary) - From 0x7ffff7ffd000 to 0x7ffff7ffe188 (temporary) Total size: 721472 ***Heap sections: Total heap size: 196608 Section 0 from 0x642000 to 0x652000 0/16 blacklisted Section 1 from 0x652000 to 0x662000 1/16 blacklisted Section 2 from 0x683000 to 0x693000 0/16 blacklisted ***Free blocks: Free list 3 (Total size 12288): 0x690000 size 12288 not black listed Total of 12288 bytes on free list ***Blocks in use: (kind(0=3Dptrfree,1=3Dnormal,2=3Dunc.):size_in_bytes, #_marks_set) (1:32,53)(1:16,231)(0:32,30)(4:32,65)(1:4096,1)(1:32,85)(1:16,256)(1:32,8= 6)(1:16,256)(1:32,85)(4:32,128)(1:2048,0)(1:16,256)(1:32,125)(1:16,256)(1= :1344,0)(0:1344,1)(1:32,125)(0:64,1)(1:80,3)(1:512,0)(1:272,3)(1:256,0)(1= :128,0)(1:64,0)(4:32,128)(0:32,128)(1:14096,1)(1:48,7)(1:16,248)(0:16,1)(= 1:32,100)(0:48,12)(1:28160,1)(0:1344,3)(1:448,2) blocks =3D 36, bytes =3D 184320 0x759320 is not a GC visible pointer location GC_is_visible test failed Program received signal SIGABRT, Aborted. 0x00007ffff74fa675 in raise (sig=3D) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. in ../nptl/sysdeps/unix/sysv/linux/raise.c (gdb) > How was libgc compiled? Does its =E2=80=98make check=E2=80=99 pass? libgc was compiled from a gentoo ebuild and its sanity tests pass. > What does =E2=80=98env | grep ^GC=E2=80=99 say? $ env | grep ^GC GCC_SPECS=3D > Can you try this program with the same libgc: >=20 > --8<---------------cut here---------------start------------->8--- > #include >=20 > int foo[123]; >=20 > int > main (int argc, char *argv[]) > { > GC_INIT (); > GC_is_visible (&foo); > return 0; > } > --8<---------------cut here---------------end--------------->8--- compiled and ran your program: gcc -I/usr/include -lgc testgc.c -o testgc && ./testgc there was no output. Marijn -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3CWg4ACgkQp/VmCx0OL2y54QCgoDYLaoZtkpjp+Y0vD4NxuP1a RhAAn0qEXacaKBtGQSAeIVfnNx9EwPxg =3DTu+4 -----END PGP SIGNATURE-----