From owner-freebsd-bugs Thu Jul 5 17: 0: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B343937B408 for ; Thu, 5 Jul 2001 17:00:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f66003459195; Thu, 5 Jul 2001 17:00:03 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5978937B40A for ; Thu, 5 Jul 2001 16:53:33 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f65NrX458621; Thu, 5 Jul 2001 16:53:33 -0700 (PDT) (envelope-from nobody) Message-Id: <200107052353.f65NrX458621@freefall.freebsd.org> Date: Thu, 5 Jul 2001 16:53:33 -0700 (PDT) From: Nathan Mower To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: i386/28746: Race condition in run-time linker Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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