public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ma.jiang at zte dot com.cn" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug nptl/17326] New: endless loop in __reclaim_stacks
Date: Fri, 29 Aug 2014 08:07:00 -0000	[thread overview]
Message-ID: <bug-17326-131@http.sourceware.org/bugzilla/> (raw)

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.


             reply	other threads:[~2014-08-29  8:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29  8:07 ma.jiang at zte dot com.cn [this message]
2014-09-05  7:44 ` [Bug nptl/17326] " ma.jiang at zte dot com.cn
2015-02-18 14:27 ` fweimer at redhat dot com
2020-06-10  9:19 ` wuxu.wu at huawei dot com
2020-06-11 17:57 ` carlos at redhat dot com
2020-06-11 17:58 ` carlos at redhat dot com
2020-06-11 17:58 ` carlos at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-17326-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).