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

Bug#58385: libc6: libc6 fork(): child dumps core (sig11) before reaching code after fork



Package: libc6
Version: 2.1.3-2
Severity: normal

This bug has been reported to Redhat.  Please look at
<http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=4437>

The crashing application is a feature-rich scheduler tightly
integrated with Oracle (8.1.5).  It does not show this problem with
linux-2.0.35 with glibc-2.0.7 (Oracle 8.0.5) and 8 other Unix
flavours.

The scheduler crashes when it fork/execs two agents.  These agents
connect to the Oracle database by means of the BEQ-protocol (a helper
process is fork/execed by the oracle OCI-library).  The last fork()
call returns the child pid to the parent but the child process never
reaches the code after the fork.  The child dumps core before that..

A gdb session on the produced core file led me to glibc.  The
following workaround avoids these core dumps and makes fork() work
fine.  This patch has been incorporated in Redhats glibc-2.1.2-5.

--- linuxthreads/lockfile.c.orig	Thu Jul  9 15:41:28 1998
+++ linuxthreads/lockfile.c	Thu Feb 17 13:29:17 2000
@@ -80,7 +80,7 @@
   __pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE_NP);

   for (fp = _IO_list_all; fp != NULL; fp = fp->_chain)
-    __pthread_mutex_init (fp->_lock, &attr);
+    if (fp->_lock) __pthread_mutex_init (fp->_lock, &attr);

   __pthread_mutexattr_destroy (&attr);
 #endif


-- System Information
Debian Release: 2.2
Kernel Version: Linux azrael 2.2.14 #1 Tue Feb 15 09:32:39 CET 2000 i686 unknown

Versions of the packages libc6 depends on:
ii  ldso           1.9.11-5       The Linux dynamic linker, library and utilit


Reply to: