From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] mem/mmapstress10: fix hangs with recent glibc
Date: Wed, 19 Sep 2018 03:32:52 -0400 (EDT) [thread overview]
Message-ID: <264028361.49497270.1537342372589.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20180919072518.GA28540@rei>
----- Original Message -----
> Hi!
> > There haven't been any major changes to this test in years,
> > so presumably something in recent glibc changed, that exposed
> > this problem.
>
> I guess that it may have been elsewhere as well, such as kernel
> scheduller changes, etc.
>
> > I confirmed with glibc-2.28, that this test can hang quite reliably
> > on 2 CPU KVM guest. It reproduces easier with smaller number of loops
> > for child_mapper() and overall test runtime reduced (-p 20 -t 0.02).
> >
> > The problem is that childs' signal handler and main function both
> > call exit(), which can deadlock on __exit_funcs_lock:
> >
> > #0 0x00007f0619d72f8c in __lll_lock_wait_private () from
> > /lib64/libc.so.6
> > #1 0x00007f0619ca2f4b in __run_exit_handlers () from /lib64/libc.so.6
> > #2 0x00007f0619ca3160 in exit () from /lib64/libc.so.6
> > #3 0x00000000004039d8 in clean_mapper (sig=<optimized out>) at
> > mmapstress10.c:898
> > #4 <signal handler called>
> > #5 0x00007f0619ca2fbd in __run_exit_handlers () from /lib64/libc.so.6
> > #6 0x00007f0619ca3160 in exit () from /lib64/libc.so.6
> > #7 0x0000000000403e7f in child_mapper (file=file@entry=0x40f530
> > "mmapstress10.out", procno=<optimized out>,
> > nprocs=nprocs@entry=20) at mmapstress10.c:676
> > #8 0x0000000000403833 in main (argc=<optimized out>, argv=<optimized
> > out>) at mmapstress10.c:458
> >
> > Switch all signal handlers to _exit().
>
> Looks like a reasonable band aid for the problem. I looked shortly at
> the source code and anything cleaner would require larger rewrite, so
> acked.
Pushed.
Regards,
Jan
prev parent reply other threads:[~2018-09-19 7:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-18 15:51 [LTP] [PATCH] mem/mmapstress10: fix hangs with recent glibc Jan Stancek
2018-09-19 7:25 ` Cyril Hrubis
2018-09-19 7:32 ` Jan Stancek [this message]
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=264028361.49497270.1537342372589.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--cc=ltp@lists.linux.it \
/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