pthreads stress test hangs on read() returning EINTR

Chase N Douglas cndougla at us.ibm.com
Wed Oct 15 13:44:32 PDT 2008


-----Bernhard Reutner-Fischer <rep.dot.nop at gmail.com> wrote: -----
>On Wed, Oct 15, 2008 at 07:43:47AM -0600, Chase N Douglas wrote:
>>-----Bernhard Reutner-Fischer <rep.dot.nop at gmail.com> wrote: -----
>>>On Mon, Oct 06, 2008 at 04:14:27PM -0400, Chase Douglas wrote:
>>>> On Oct 6, 2008, at 6:04 AM, Fathi Boudra wrote:
>>>>> Hi,
>>>>>
>>>>> ping.
>>>>>
>>>>> Any comments from people who care about thread ?
>>>>>
>>>>> As a reminder:
>>>>>  - http://busybox.net/bugs/view.php?id=4994
>>>>>  - http://uclibc.org/lists/uclibc/2008-March/019187.html
>>>>>
>>>>> It could be nice to take a look before 0.9.30 release.
>>>>
>>>> Just to be clear, both of these tackle the same issue, but the
>first
>>>> should cover all cases, while the second is specific to
>malloc-standard
>>>> and does not cover the pthreads_atfork mutex.
>>>
>>>This patch (which went in as r23660) broke
>>>- no threads
>>>- malloc debug
>>
>>Do you have any information on how the patch broke these two
>scenarios?
>>Were they compilation errors, or runtime errors? What malloc
>stack(s)
>>broke? I have not been able to reproduce the issues myself, but I
>have been
>>running an older version of uClibc, not 0.9.30-rc2.
>
>This should catch all:
>
>$ egrep "(THREAD|MALLOC)" .config
># HAS_NO_THREADS is not set
># UCLIBC_HAS_THREADS is not set
>MALLOC=y
># MALLOC_SIMPLE is not set
># MALLOC_STANDARD is not set
># MALLOC_GLIBC_COMPAT is not set
>UCLIBC_MALLOC_DEBUGGING=y
>
>
>  CC libc/stdlib/malloc/malloc.os
>In file included from libc/stdlib/malloc/malloc.c:22:
>libc/stdlib/malloc/malloc.h:225: error: expected '=', ',', ';', 'asm'
>or
>'__attribute__' before '__malloc_heap_lock'
>libc/stdlib/malloc/malloc.c:30: error: expected '=', ',', ';', 'asm'
>or
>'__attribute__' before '__malloc_heap_lock'
>libc/stdlib/malloc/malloc.c:53: error: expected declaration
>specifiers
>or '...' before 'malloc_mutex_t'
>libc/stdlib/malloc/malloc.c: In function 'malloc':
>libc/stdlib/malloc/malloc.c:196: warning: passing argument 1 of
>'__heap_check' from incompatible pointer type
>libc/stdlib/malloc/malloc.c:212: error: '__malloc_heap_lock'
>undeclared
>(first use in this function)
>libc/stdlib/malloc/malloc.c:212: error: (Each undeclared identifier
>is
>reported only once
>libc/stdlib/malloc/malloc.c:212: error: for each function it appears
>in.)
>libc/stdlib/malloc/malloc.c:212: error: too many arguments to
>function
>'malloc_from_heap'
>make: *** [libc/stdlib/malloc/malloc.os] Error 1

Please see the attached patch which should apply cleanly against
0.9.30-rc2. This should fix malloc with debug and without threads.

Thanks,
Chase Douglas
(See attached file: malloc-lock-fixes.patch)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/uclibc/attachments/20081015/1792a77e/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: malloc-lock-fixes.patch
Type: application/octet-stream
Size: 10402 bytes
Desc: not available
Url : http://busybox.net/lists/uclibc/attachments/20081015/1792a77e/attachment.obj 


More information about the uClibc mailing list