Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Aug 2002 09:25:21 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        Martin Blapp <mb@imp.ch>
Cc:        hackers@FreeBSD.ORG, openoffice@FreeBSD.ORG, Alexander Kabaev <ak03@gte.com>
Subject:   Re: Help needed. Deadlock in rtld makes openoffice build hang ag
Message-ID:  <XFMail.20020806092521.jdp@polstra.com>
In-Reply-To: <20020806095745.M58571-100000@levais.imp.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
Martin Blapp wrote:
> 
> From 10 builds, about 6 are hanging, and I need to restart them.
> 
> This is not a usable solution for a package building cluster.
> 
> I end with a process consuming all CPU resources and hanging for
> waiting for a lock to get released what never happens.
> 
> Problem is exit(). Replaceing exit() with _exit() did not help.
> 
> [Switching to Process 4968, Thread 1]
> 0x28050784 in sigprocmask () from /usr/libexec/ld-elf.so.1
> (gdb) bt
>#0  0x28050784 in sigprocmask () from /usr/libexec/ld-elf.so.1
>#1  0x2804f2d1 in xprintf () from /usr/libexec/ld-elf.so.1
>#2  0x2804df78 in find_symdef () from /usr/libexec/ld-elf.so.1
>#3  0x2838dbd8 in exit () from /usr/lib/libc_r.so.4
>#4  0x08048c77 in _start ()
> 
> I tried to add the following lines as proposed by Alexander Kabaev
> to libexec/rtld-elf/i386/lockdflt.c

[...]

The lock algorithms are taken from the paper referenced in the comment
at the top of lockdflt.c, and I believe they are correct.  Whatever is
happening must be caused by changes in libc_r that cause the profiling
timer to stop advancing, or cause SIGPROF to be blocked.  There were
some major changes made to libc_r on 13 Oct 2000 that could be
connected with this.

Just as an experiment, please try this change to lockdflt_init() in
rtld-elf/i386/lockdflt.c:

Index: lockdflt.c
===================================================================
RCS file: /home/ncvs/src/libexec/rtld-elf/i386/lockdflt.c,v
retrieving revision 1.5.2.4
diff -U5 -r1.5.2.4 lockdflt.c
--- lockdflt.c  11 Jul 2002 23:52:32 -0000      1.5.2.4
+++ lockdflt.c  6 Aug 2002 16:23:33 -0000
@@ -263,10 +263,11 @@
     /*
      * Construct a mask to block all signals except traps which might
      * conceivably be generated within the dynamic linker itself.
      */
     sigfillset(&fullsigmask);
+    sigdelset(&fullsigmask, SIGPROF);
     sigdelset(&fullsigmask, SIGILL);
     sigdelset(&fullsigmask, SIGTRAP);
     sigdelset(&fullsigmask, SIGABRT);
     sigdelset(&fullsigmask, SIGEMT);
     sigdelset(&fullsigmask, SIGFPE);



John

PS - Are you working with -stable or with -current?


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020806092521.jdp>