This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/17326] New: endless loop in __reclaim_stacks
- From: "ma.jiang at zte dot com.cn" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 29 Aug 2014 08:06:50 +0000
- Subject: [Bug nptl/17326] New: endless loop in __reclaim_stacks
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17326
Bug ID: 17326
Summary: endless loop in __reclaim_stacks
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: nptl
Assignee: unassigned at sourceware dot org
Reporter: ma.jiang at zte dot com.cn
CC: drepper.fsp at gmail dot com
Created attachment 7766
--> https://sourceware.org/bugzilla/attachment.cgi?id=7766&action=edit
my fix for the bug
Hi all,
After the fix mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=477705,
I can still reproduce the bug on a dual-core armv7 board.
As the Linux kernel only guarantee a per-page atomicity when doing fork, just
adding a atomic_write_barrier is not enough to protect the
stack_used/stack_cache lists. We need to stop threads which tried to modify the
lists when a thread is doing fork, only then the child process could get a
coherent list, and the __reclaim_stacks could do the right job.
In fork, we have already done such things for io locks(see _IO_list_lock
(),_IO_list_resetlock () and _IO_list_unlock () in __libc_fork). I belive we
should also add some similar codes to protect the stack_used/stack_cache lists.
I have made a patch(see the attachment), is that ok for trunk?
--
You are receiving this mail because:
You are on the CC list for the bug.