Date: Thu, 5 Jul 2001 16:53:33 -0700 (PDT) From: Nathan Mower <nmower@verio.net> To: freebsd-gnats-submit@FreeBSD.org Subject: i386/28746: Race condition in run-time linker Message-ID: <200107052353.f65NrX458621@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 28746 >Category: i386 >Synopsis: Race condition in run-time linker >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jul 05 17:00:03 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Nathan Mower >Release: 4.2 >Organization: Verio >Environment: FreeBSD ft.iserver.com 4.2-RELEASE FreeBSD 4.2-RELEASE #2a: Thu Jun 28 11:27:27 MDT 2001 root@fc:/usr/src/sys/compile/VKERN i386 >Description: There seems to be a race condition in the run-time linker (ELF). As near as I can tell, the situation is this: _rtld_bind calls rlock_acquire(), but before it gets to rlock_release(), a signal is caught. The signal handler calls exit(), so the __atexit list is traversed, calling rtld_exit(), which calls wlock_acquire(). This spins on the lock, which it never gets. The process is hung. >How-To-Repeat: Heavy traffic on Apache web server (I use torture.pl). Frequently send SIGUSR1 to child Apache processes. This is a very intermittent bug, as you can well imagine. >Fix: Known work-around: run Apache with LD_BIND_NOW turned on. I dunno -- might have to block signals between rlock_acquire() and rlock_release() in _rtld_bind(). >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107052353.f65NrX458621>