unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Marijn <hkBst@gentoo.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: bug-guile@gnu.org
Subject: Re: guile-2.0.0 fails to build without threads
Date: Thu, 05 May 2011 10:04:30 +0200	[thread overview]
Message-ID: <4DC25A0E.8060107@gentoo.org> (raw)
In-Reply-To: <87ei4er73u.fsf@gnu.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Ludo,

On 05/04/11 14:19, Ludovic Courtès wrote:
>>> Actually, Marijn: can you try “GC_DUMP_REGULARLY=1 ./meta/guile -c 0”,
>>> and check what’s under “Static roots”?
> 
> More precisely:
> 
> --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 <http://gnu.org/licenses/gpl.html>
> 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-unknown-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> 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
> 
> Starting program: /home/ludo/src/guile/libguile/.libs/guile -c 0
> [Thread debugging using libthread_db enabled]
> 
> Breakpoint 1, main (argc=3, argv=0x7fffffffce88) at guile.c:69
> 69      {
> (gdb) p &scm_protects
> $2 = (SCM *) 0x7ffff7dd7788
> (gdb) c
> Continuing.
> ***Static roots:
> Total size: 0
> 
> ***Heap sections:
> Total heap size: 65536
> Section 0 from 0x663000 to 0x673000 0/16 blacklisted
> 
> ***Free blocks:
> Free list 16 (total size 65536):
>         0x663000 size 65536 not black listed
> Total of 65536 bytes on free list
> 
> ***Blocks in use:
> (kind(0=ptrfree,1=normal,2=unc.):size_in_bytes, #_marks_set)
> 
> blocks = 0, bytes = 0
> ***Static roots:
> From 0x601000 to 0x601360 (temporary)
> From 0x7ffff7db0000 to 0x7ffff7ddde00 (temporary)  ;; ← 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---
> 
> Above ‘scm_protects’ clearly appears as a root.  Can you 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
<http://gnu.org/licenses/gpl.html>
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:
<http://bugs.gentoo.org/>...
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=3, argv=0x7fffffffd518) at guile.c:69
69	{
(gdb) p &scm_protects
$1 = (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=ptrfree,1=normal,2=unc.):size_in_bytes, #_marks_set)

blocks = 0, bytes = 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=ptrfree,1=normal,2=unc.):size_in_bytes, #_marks_set)

blocks = 0, bytes = 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=ptrfree,1=normal,2=unc.):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,86)(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 = 36, bytes = 184320
0x759320 is not a GC visible pointer location
GC_is_visible test failed

Program received signal SIGABRT, Aborted.
0x00007ffff74fa675 in raise (sig=<value optimized out>) 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 ‘make check’ pass?

libgc was compiled from a gentoo ebuild and its sanity tests pass.

> What does ‘env | grep ^GC’ say?

$ env | grep ^GC
GCC_SPECS=

> Can you try this program with the same libgc:
> 
> --8<---------------cut here---------------start------------->8---
> #include <gc/gc.h>
> 
> int foo[123];
> 
> 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
=Tu+4
-----END PGP SIGNATURE-----



  reply	other threads:[~2011-05-05  8:04 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07 14:47 guile-2.0.0 fails to build without threads Marijn
2011-04-11 16:19 ` Andy Wingo
2011-04-12  7:26   ` Marijn
2011-04-13 10:05     ` Andy Wingo
2011-04-13 13:44       ` Marijn
2011-04-13 14:09         ` Andy Wingo
2011-04-13 14:27           ` Marijn
2011-04-13 15:22             ` Andy Wingo
2011-04-14 13:25               ` Marijn
2011-04-28 11:17                 ` Andy Wingo
2011-04-28 13:08                   ` Ludovic Courtès
2011-04-28 13:15                     ` Andy Wingo
2011-04-28 15:09                       ` Ludovic Courtès
2011-05-03 14:58                         ` Marijn
2011-05-04 12:19                           ` Ludovic Courtès
2011-05-05  8:04                             ` Marijn [this message]
2011-05-05 12:08                               ` Ludovic Courtès
2011-05-05 13:59                                 ` Marijn
2011-05-05 14:25                                   ` Ludovic Courtès
2011-05-06  8:16                                     ` Marijn
2011-05-06  9:52                                       ` Ludovic Courtès
2011-05-06 12:49                                         ` Marijn
2011-05-10  7:43                                         ` Marijn
2011-05-03 14:55                     ` Marijn
2011-04-12  6:49 ` Marco Maggi
2011-04-13  9:04   ` Marco Maggi
2011-04-13 11:42     ` Marco Maggi
2011-04-13 12:26       ` Andy Wingo
2011-04-13 13:56         ` Marco Maggi
2011-04-28 11:21           ` Andy Wingo
2011-05-02  6:20             ` Marco Maggi
2011-05-20  9:37               ` Andy Wingo
2011-05-20 18:41                 ` Marco Maggi
2011-05-21  2:23                   ` Mark H Weaver
2011-05-21  8:45                   ` Andy Wingo
2011-05-21 13:51                     ` Marco Maggi
2011-05-21 14:29                       ` Neil Jerram
2011-06-17 10:25                       ` Andy Wingo
2011-06-20  8:06                         ` Andy Wingo
2011-06-22 21:39                           ` Neil Jerram
2011-04-13  9:55   ` Andy Wingo
2011-04-13 14:19     ` Marco Maggi
2011-04-13 21:57   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DC25A0E.8060107@gentoo.org \
    --to=hkbst@gentoo.org \
    --cc=bug-guile@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).