This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: read/thread/deadlock


Andreas Jaeger <aj@arthur.rhein-neckar.de> writes:

|> >>>>> marc  writes:
|> 
|> >> Description:
|>  > perl compiled with thread support freezes in the testsuite on the t/io/read.t test. attaching
|>  > to the process gives me the following backtrace:
|> 
|>  > #0  0x4005bdc1 in __syscall_rt_sigsuspend ()
|>  > #1  0x4005ada8 in __sigsuspend (set=0xbffff568) at ../sysdeps/unix/sysv/linux/sigsuspend.c:44
|>  > #2  0x40168479 in __pthread_lock (lock=0x8110eb8) at restart.h:32
|>  > #3  0x4016643d in __pthread_mutex_lock (mutex=0x8110ea8) at mutex.c:84
|>  > #4  0x40167ea7 in __flockfile (stream=0x8110e10) at lockfile.c:32
|>  > #5  0x4008bae4 in _IO_seekoff (fp=0x8110e10, offset=0, dir=0, mode=3) at ioseekoff.c:41
|>  > #6  0x4008c474 in fseek (fp=0x8110e10, offset=0, whence=0) at fseek.c:39
|>  > #7  0x80ec3bf in Perl_do_seek ()
|> 
|>  > incidently, fseek locks the stream before calling ioseekfoff, which tries to
|>  > do the same. after removing the lock, the testsuite stopped again at various other
|>  > tests, similar diagnose.
|> 
|> >> How-To-Repeat:
|>  > compile perl with support for threads, make test.
|> 
|> I just compiled perl 5.00502 with thread-support using egcs-1.1 and
|> using a glibc 2.1 from 980814 (later than 2.0.95), Linux 2.113 on
|> i486.  make check did pass the whole perl testsuite (including
|> io/read).
|> 
|> I do hope that the appended patch fixes your problem.  The patch
|> should be in glibc 2.0.95.

The real bug was fixed here:

1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/pthread/bits/libc-lock.h: Make
	__pthread_mutexattr_settype weak.  Don't make
	__pthread_mutexattr_setkind_np weak.

Index: sysdeps/pthread/bits/libc-lock.h
===================================================================
RCS file: /glibc/cvsfiles/libc/linuxthreads/sysdeps/pthread/bits/libc-lock.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -a -r1.4 -r1.5
--- libc-lock.h	1998/07/14 19:40:42	1.4
+++ libc-lock.h	1998/07/24 12:57:35	1.5
@@ -176,7 +176,7 @@
 weak_extern (__pthread_mutex_unlock)
 weak_extern (__pthread_mutexattr_init)
 weak_extern (__pthread_mutexattr_destroy)
-weak_extern (__pthread_mutexattr_setkind_np)
+weak_extern (__pthread_mutexattr_settype)
 weak_extern (__pthread_key_create)
 weak_extern (__pthread_setspecific)
 weak_extern (__pthread_getspecific)
@@ -195,7 +195,7 @@
 # pragma weak __pthread_mutex_unlock
 # pragma weak __pthread_mutexattr_init
 # pragma weak __pthread_mutexattr_destroy
-# pragma weak __pthread_mutexattr_setkind_np
+# pragma weak __pthread_mutexattr_settype
 # pragma weak __pthread_key_create
 # pragma weak __pthread_setspecific
 # pragma weak __pthread_getspecific

Andreas.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
schwab@gnu.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]