From: Joel Fernandes <agnel.joel@gmail.com>
To: user-mode-linux-devel@lists.sourceforge.net,
Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>
Subject: [uml-devel] UML hangs with hrtimer test module
Date: Wed, 28 Mar 2018 03:28:02 -0700 [thread overview]
Message-ID: <CAD=GYpatpGo=6mwhkw+RCQX=TNxX9jyfsq67srFc6+FhYtxaWg@mail.gmail.com> (raw)
Hi,
I wrote a kernel module to play with hrtimer subsystem and it hangs
with UML, Any ideas on why it may be hanging? It doesn't hang on any
of my other machines. Hopefully I'm not doing something stupid, but I
don't think I am..
It appears the timer handler does fire. However, the UML process is
continously doing a kill(SIGALRM) to the host, and the shell hangs.
Here's the continous strace output of UML's process at the time of the
hang: https://hastebin.com/ikehadapon.sql
To build UML, I do:
make ARCH=um x86_64_defconfig
UML kernel version is v4.16-rc4
Here's the module I'm loading:
static enum hrtimer_restart bigtimer_handle(struct hrtimer *timer)
{
printk(KERN_ERR "timer fired 2\n");
spin_lock(&il->biglock);
spin_unlock(&il->biglock);
release_now = 1;
return HRTIMER_NORESTART;
}
void init_bigstr(struct bigstr *b)
{
spin_lock_init(&b->biglock);
}
static int __init test_module_init(void)
{
struct bigstr b1, b2;
struct hrtimer *timer;
release_now = 0;
init_bigstr(&b1);
init_bigstr(&b2);
timer = &bigtimer;
timer->debug = 1;
hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
timer->function = bigtimer_handle;
il = &b2;
spin_lock(&b1.biglock);
printk(KERN_ERR "Starting timer\n");
hrtimer_start(timer, ns_to_ktime(50000ULL),
HRTIMER_MODE_REL_PINNED);
while(release_now == 0);
spin_unlock(&b1.biglock);
return -1;
}
Thanks for any debug thoughts!
I'll also try to hook up gdb tomorrow and see if I find something..
Regards,
- Joel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next reply other threads:[~2018-03-28 10:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 10:28 Joel Fernandes [this message]
2018-03-28 11:04 ` [uml-devel] UML hangs with hrtimer test module Richard Weinberger
2018-03-28 13:11 ` Geert Uytterhoeven
2018-03-28 13:19 ` Richard Weinberger
2018-03-28 22:19 ` Joel Fernandes
2018-03-28 22:35 ` Richard Weinberger
2018-03-29 6:04 ` Geert Uytterhoeven
2018-03-29 20:20 ` Joel Fernandes
2018-03-29 20:34 ` Richard Weinberger
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='CAD=GYpatpGo=6mwhkw+RCQX=TNxX9jyfsq67srFc6+FhYtxaWg@mail.gmail.com' \
--to=agnel.joel@gmail.com \
--cc=jdike@addtoit.com \
--cc=richard@nod.at \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.