[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git guile hangs in fluids.test

From: Ludovic Courtès
Subject: Re: git guile hangs in fluids.test
Date: Sat, 22 Jan 2011 22:39:26 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)


address@hidden (Ludovic Courtès) writes:

> address@hidden (Ludovic Courtès) writes:
>> <address@hidden> writes:
>>> Thread 1 (Thread 0x404f92f0 (LWP 14857)):
>>> #0  0x4001e424 in __kernel_vsyscall ()
>>> #1  0x4046c285 in sem_wait@@GLIBC_2.1 () at 
>>> ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/sem_wait.S:80
>>> #2  0x40168018 in GC_stop_world () at pthread_stop_world.c:426
>> The other thread should have call sem_post() to release this one.  Can
>> you print the value of ‘GC_suspend_ack_sem’?
> For the record we’ve been having this problem on Hydra[*] for a couple
> of weeks and I can reproduce it using an i686 build and personality.
>   http://hydra.nixos.org/build/863871
> It happens while running ./check-guile, somewhere in between
> futures.test and gc.test (when the latter calls ‘scm_gc’ for the first
> time), which sounds like a race condition making libgc think there are
> more threads than in actuality.

After further investigation, it turns out to be due to the lack of
pthread_exit interception in both 7.1 and 7.2alpha4, which is fixed in
current CVS:

2010-08-14  Ivan Maidanski <address@hidden> (with help from Hans Boehm)

        * include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the
        beginning of the file.
        * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New
        macro (defined only for Linux and Solaris).
        * include/gc_pthread_redirects.h (GC_pthread_cancel,
        GC_pthread_exit): Declare new API function (only if
        * include/gc_pthread_redirects.h (pthread_cancel, pthread_exit):
        Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE).
        * include/private/pthread_support.h (DISABLED_GC): New macro.
        * pthread_support.c (pthread_cancel, pthread_exit): Restore
        original definition or declare "real" function (if needed and
        * pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t):
        Declare new types if needed.
        * pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New
        function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE).
        * pthread_support.c (GC_init_real_syms): Initialize pointers to
        the "real" pthread_cancel and pthread_exit (only if
        * pthread_support.c (GC_unregister_my_thread): Enable collections
        if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE).
        * pthread_support.c (pthread_cancel, pthread_exit): New wrapped
        function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined).
        * pthread_support.c (GC_start_routine): Refine the comment.
        * extra/threadlibs.c (main): Adjust --wrap (add "read",
        "pthread_exit", "pthread_cancel" but remove "sleep").
        * doc/README.linux (GC_USE_LD_WRAP): Ditto.
        * doc/README.linux: Expand all tabs to spaces; remove trailing
        spaces at EOLn.

Initially discussed at


reply via email to

[Prev in Thread] Current Thread [Next in Thread]