From: Richard Weinberger <richard@nod.at>
To: Vegard Nossum <vegard.nossum@oracle.com>, Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] WARNING: CPU: 0 PID: 908 at include/linux/thread_info.h:128 sigsuspend+0xab/0xc0()
Date: Mon, 16 Nov 2015 18:32:41 +0100 [thread overview]
Message-ID: <564A1339.8010607@nod.at> (raw)
In-Reply-To: <5649C2D9.90407@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]
Am 16.11.2015 um 12:49 schrieb Vegard Nossum:
> On 11/16/2015 12:44 PM, Richard Weinberger wrote:
>> Am 16.11.2015 um 10:43 schrieb Vegard Nossum:
>>> Starting UML like this:
>>>
>>> ./vmlinux rootfstype=hostfs rw ignore_console_loglevel con=xterm init=/bin/bash
>>>
>>> Results in unpredictable behaviour, most of the time an xterm flashes on
>>> my screen but the process aborts with only "Aborted" on the console
>>> where I ran the command, sometimes the xterm remains there but frozen,
>>> sometimes the xterm spews this warning non-stop:
>>
>> Hmm, is this a new regression?
>> I bet it only happens with con=xterm, right?
>
> It's the first UML kernel I compile in a few years, so I don't know if
> it's old or new, sorry.
>
> Yes, only con=xterm triggers this.
/me found some odd stuff.
arch/um/drivers/chan_user.c tries to call sigsuspend() on the host side.
But sadly the kernel has also a function with the same name.
So, chan_user.c calls into the UML kernel instead of the host.
This seems to work by accident but confuses the Linux signal logic
and you trigger from time to time the WARN_ON().
>>From a quick look, the kernel sigsuspend() has no users except in the same
object file. So we can mark it static and UML calls the real one.
Does the attached patch help?
I'm sure we need more work as this clearly never worked as expected. :-(
Thanks,
//richard
[-- Attachment #2: unexport_sigsuspend.diff --]
[-- Type: text/x-patch, Size: 774 bytes --]
diff --git a/include/linux/signal.h b/include/linux/signal.h
index ab1e039..92557bb 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -239,7 +239,6 @@ extern int sigprocmask(int, sigset_t *, sigset_t *);
extern void set_current_blocked(sigset_t *);
extern void __set_current_blocked(const sigset_t *);
extern int show_unhandled_signals;
-extern int sigsuspend(sigset_t *);
struct sigaction {
#ifndef __ARCH_HAS_IRIX_SIGACTION
diff --git a/kernel/signal.c b/kernel/signal.c
index c0b01fe..f3f1f7a 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -3503,7 +3503,7 @@ SYSCALL_DEFINE0(pause)
#endif
-int sigsuspend(sigset_t *set)
+static int sigsuspend(sigset_t *set)
{
current->saved_sigmask = current->blocked;
set_current_blocked(set);
[-- Attachment #3: Type: text/plain, Size: 426 bytes --]
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
[-- Attachment #4: Type: text/plain, Size: 194 bytes --]
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2015-11-16 17:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 9:43 [uml-devel] WARNING: CPU: 0 PID: 908 at include/linux/thread_info.h:128 sigsuspend+0xab/0xc0() Vegard Nossum
2015-11-16 11:44 ` Richard Weinberger
2015-11-16 11:49 ` Vegard Nossum
2015-11-16 11:53 ` Richard Weinberger
2015-11-16 11:57 ` Anton Ivanov
2015-11-16 17:32 ` Richard Weinberger [this message]
2015-11-16 17:46 ` Vegard Nossum
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=564A1339.8010607@nod.at \
--to=richard@nod.at \
--cc=jdike@addtoit.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=vegard.nossum@oracle.com \
/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 NNTP newsgroup(s).