Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Aug 2002 14:56:47 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        John Polstra <jdp@polstra.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Help needed. Deadlock in rtld makes openoffice build hang ag
Message-ID:  <200208072156.g77Lulgi000927@apollo.backplane.com>
References:  <20020807231439.F58571-100000@levais.imp.ch> <200208072132.g77LWOBD058671@vashon.polstra.com> <200208072140.g77LeL2b000769@apollo.backplane.com> <200208072146.g77Lkke8058706@vashon.polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
:In article <200208072140.g77LeL2b000769@apollo.backplane.com>,
:Matthew Dillon  <dillon@apollo.backplane.com> wrote:
:> 
:>     If it's a matter of one thread hogging the cpu and the other (which
:>     holds the lock) not being able to run to completion, maybe putting
:>     the sleep back in would work.
:
:
:Yes, that was the original idea behind the sleeps.  But in practice
:it doesn't work, because the rtld isn't really linked with the rest
:of the application.  When the rtld calls nanosleep(), it's getting
:the real system call rather than the threads package's version.
:
:John
:-- 
:  John Polstra
:  John D. Polstra & Co., Inc.                        Seattle, Washington USA

    So the only solution may be a callback vector to switch threads that
    the application can set.

    Martin's earlier comment in regards to the problem occuring in exit()
    led me to search for 'atexit' use inside rtld-elf.  I found a 
    comment in rtld_start.S (for i386) but no direct link.  If there is
    an at-exit function it could be deadlocking against a thread trying
    to cause the program to exit.  Odd, but possible.

    Judicious use of write()'s to stderr (descriptor 2) on Martin's part
    may shed some light on exactly how the deadlock is occuring.

    (I'm getting into this conversation late.  I am actually on vacation
    and will not have email access for about a week starting in about a day).

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

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?200208072156.g77Lulgi000927>