From: "dsmith at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug testsuite/20600] parallel testsuite hang in [nd_]syscall.exp
Date: Thu, 22 Sep 2016 14:26:00 -0000 [thread overview]
Message-ID: <bug-20600-6586-TN6AFyjLsb@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-20600-6586@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20600
--- Comment #4 from David Smith <dsmith at redhat dot com> ---
Here's an update.
I believe I've tracked this down to _stp_init_time(). I've added lots of
'might_sleep()' calls to that function in my local copy of systemtap, and I got
the following:
====
Sep 21 22:32:40 ibm-p8-01-lp7.lab.eng.rdu.redhat.com kernel: BUG: sleeping
function called from invalid context at
/usr/local/share/systemtap/runtime/time.c:323
Sep 21 22:32:40 ibm-p8-01-lp7.lab.eng.rdu.redhat.com kernel: in_atomic(): 1,
irqs_disabled(): 0, pid: 5960, name: stapio
Sep 21 22:32:40 ibm-p8-01-lp7.lab.eng.rdu.redhat.com kernel: INFO: lockdep is
turned off.
====
Here's that section of runtime/time.c (with line numbers):
====
310 might_sleep();
311 stp_time = _stp_alloc_percpu(sizeof(stp_time_t));
312 if (unlikely(stp_time == 0))
313 return -1;
314
315 might_sleep();
316 #ifdef STAPCONF_ONEACHCPU_RETRY
317 ret = on_each_cpu(__stp_init_time, NULL, 0, 1);
318 #else
319 ret = on_each_cpu(__stp_init_time, NULL, 1);
320 #endif
321
322 #ifdef STAPCONF_ADD_TIMER_ON
323 might_sleep();
324 for_each_online_cpu(cpu) {
325 stp_time_t *time = per_cpu_ptr(stp_time, cpu);
326 add_timer_on(&time->timer, cpu);
327 }
328 #endif
===
I believe this means that something in the following line is causing us to
become atomic:
ret = on_each_cpu(__stp_init_time, NULL, 1);
At line 315, might_sleep() didn't complain, but at line 323 we're suddenly
atomic.
On RHEL7, on_each_cpu() looks like the following:
====
static inline int on_each_cpu(smp_call_func_t func, void *info, int wait)
{
unsigned long flags;
local_irq_save(flags);
func(info);
local_irq_restore(flags);
return 0;
}
====
That matches up to the kernel message above, since irqs aren't disabled. So, my
guess is that something in __stp_init_time() is causing us to become atomic.
--
You are receiving this mail because:
You are the assignee for the bug.
next prev parent reply other threads:[~2016-09-22 14:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-12 14:58 [Bug testsuite/20600] New: parallet " dsmith at redhat dot com
2016-09-15 14:28 ` [Bug testsuite/20600] " dsmith at redhat dot com
2016-09-15 19:40 ` dsmith at redhat dot com
2016-09-15 19:53 ` [Bug testsuite/20600] parallel " dsmith at redhat dot com
2016-09-15 20:13 ` dsmith at redhat dot com
2016-09-22 14:26 ` dsmith at redhat dot com [this message]
2016-09-22 18:09 ` dsmith at redhat dot com
2017-02-28 16:13 ` dsmith at redhat dot com
2017-03-02 7:29 ` mcermak at redhat dot com
2017-03-03 19:17 ` dsmith at redhat dot com
2023-12-06 20:55 ` wcohen at redhat dot com
2024-02-21 13:25 ` fche 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-20600-6586-TN6AFyjLsb@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@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).