* [uml-devel] WARNING: CPU: 0 PID: 908 at include/linux/thread_info.h:128 sigsuspend+0xab/0xc0()
@ 2015-11-16 9:43 Vegard Nossum
2015-11-16 11:44 ` Richard Weinberger
0 siblings, 1 reply; 7+ messages in thread
From: Vegard Nossum @ 2015-11-16 9:43 UTC (permalink / raw)
To: Jeff Dike, Richard Weinberger; +Cc: user-mode-linux-devel
Hi,
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:
[ 12.790000] WARNING: CPU: 0 PID: 908 at
include/linux/thread_info.h:128 sigsuspend+0xab/0xc0()
[ 12.790000] CPU: 0 PID: 908 Comm: deferwq Tainted: G W
4.2.5+ #37
[ 12.790000] Stack:
[ 12.790000] 6243fe78 600753f2 6243fe68 00000009
[ 12.790000] 00000000 605cc5f4 6243fe88 605cf5a7
[ 12.790000] 6243fee8 60040f3d 6243fec8 600511eb
[ 12.790000] Call Trace:
[ 12.790000] [<600511eb>] ? sigsuspend+0xab/0xc0
[ 12.790000] [<605cc5f4>] ? printk+0x0/0x94
[ 12.790000] [<60029f0b>] show_stack+0xdb/0x1a0
[ 12.790000] [<600753f2>] ? dump_stack_print_info+0xd2/0xf0
[ 12.790000] [<605cc5f4>] ? printk+0x0/0x94
[ 12.790000] [<605cf5a7>] dump_stack+0x2a/0x2c
[ 12.790000] [<60040f3d>] warn_slowpath_common+0x9d/0xf0
[ 12.790000] [<600511eb>] ? sigsuspend+0xab/0xc0
[ 12.790000] [<605d0030>] ? __schedule+0x0/0x610
[ 12.790000] [<60051140>] ? sigsuspend+0x0/0xc0
[ 12.790000] [<60051140>] ? sigsuspend+0x0/0xc0
[ 12.790000] [<605cc5f4>] ? printk+0x0/0x94
[ 12.790000] [<6004111c>] warn_slowpath_null+0x1c/0x20
[ 12.790000] [<600511eb>] sigsuspend+0xab/0xc0
[ 12.790000] [<6002e7ca>] winch_thread+0x16a/0x250
[ 12.790000] [<605cc5f4>] ? printk+0x0/0x94
[ 12.790000] [<6002e660>] ? winch_thread+0x0/0x250
[ 12.790000]
[ 12.790000] ---[ end trace 6fe139d6fbc54eb3 ]---
Some (hopefully relevant) bits from my .config:
$ grep 'UML\|PTY\|TTY\|xterm' .config
CONFIG_UML=y
# UML-specific options
CONFIG_UML_X86=y
# UML Character Devices
CONFIG_PTY_CHAN=y
CONFIG_TTY_CHAN=y
CONFIG_CON_CHAN="xterm"
# CONFIG_UML_SOUND is not set
CONFIG_TTY=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_TTY_PRINTK is not set
# CONFIG_UML_RANDOM is not set
# CONFIG_UML_WATCHDOG is not set
# UML Network Devices
# CONFIG_UML_NET is not set
Thanks,
Vegard
------------------------------------------------------------------------------
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
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [uml-devel] WARNING: CPU: 0 PID: 908 at include/linux/thread_info.h:128 sigsuspend+0xab/0xc0()
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
0 siblings, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2015-11-16 11:44 UTC (permalink / raw)
To: Vegard Nossum, Jeff Dike; +Cc: user-mode-linux-devel
Hi!
Am 16.11.2015 um 10:43 schrieb Vegard Nossum:
> Hi,
>
> 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?
Thanks,
//richard
------------------------------------------------------------------------------
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
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [uml-devel] WARNING: CPU: 0 PID: 908 at include/linux/thread_info.h:128 sigsuspend+0xab/0xc0()
2015-11-16 11:44 ` Richard Weinberger
@ 2015-11-16 11:49 ` Vegard Nossum
2015-11-16 11:53 ` Richard Weinberger
2015-11-16 17:32 ` Richard Weinberger
0 siblings, 2 replies; 7+ messages in thread
From: Vegard Nossum @ 2015-11-16 11:49 UTC (permalink / raw)
To: Richard Weinberger, Jeff Dike; +Cc: user-mode-linux-devel
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.
(For the record, I also couldn't con=pty or con=pts to work either, it
just results in "Aborted." on the console where I ran ./vmlinux -- if I
try con1=pty or con1=pts it boots normally, but there is no message in
the kernel log indicating the host device that was used for the console.
But this could be a PEBKAC, I only mention it in case it might be
relevant. Also, normal ./vmlinux without any con*= arguments works fine,
but I only get the plain stdin/stdout console.)
Thanks,
Vegard
------------------------------------------------------------------------------
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
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [uml-devel] WARNING: CPU: 0 PID: 908 at include/linux/thread_info.h:128 sigsuspend+0xab/0xc0()
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
1 sibling, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2015-11-16 11:53 UTC (permalink / raw)
To: Vegard Nossum, Jeff Dike; +Cc: user-mode-linux-devel
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.
Okay, let me see. I use xterm very seldom these days. And maybe nobody else noticed. :D
> (For the record, I also couldn't con=pty or con=pts to work either, it
> just results in "Aborted."
You can use the "earlyprintk" parameter to get more output.
Thanks,
//richard
------------------------------------------------------------------------------
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
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [uml-devel] WARNING: CPU: 0 PID: 908 at include/linux/thread_info.h:128 sigsuspend+0xab/0xc0()
2015-11-16 11:53 ` Richard Weinberger
@ 2015-11-16 11:57 ` Anton Ivanov
0 siblings, 0 replies; 7+ messages in thread
From: Anton Ivanov @ 2015-11-16 11:57 UTC (permalink / raw)
To: user-mode-linux-devel@lists.sourceforge.net
On 16/11/15 11:53, Richard Weinberger wrote:
> 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.
> Okay, let me see. I use xterm very seldom these days. And maybe nobody else noticed. :D
ignore_console_runlevel triggers this. If you do not use it xterm
console actually works fine (I use it all the time with a debian userspace).
A.
>
>> (For the record, I also couldn't con=pty or con=pts to work either, it
>> just results in "Aborted."
> You can use the "earlyprintk" parameter to get more output.
>
> Thanks,
> //richard
>
> ------------------------------------------------------------------------------
> 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
> _______________________________________________
> User-mode-linux-devel mailing list
> User-mode-linux-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
>
------------------------------------------------------------------------------
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
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [uml-devel] WARNING: CPU: 0 PID: 908 at include/linux/thread_info.h:128 sigsuspend+0xab/0xc0()
2015-11-16 11:49 ` Vegard Nossum
2015-11-16 11:53 ` Richard Weinberger
@ 2015-11-16 17:32 ` Richard Weinberger
2015-11-16 17:46 ` Vegard Nossum
1 sibling, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2015-11-16 17:32 UTC (permalink / raw)
To: Vegard Nossum, Jeff Dike; +Cc: user-mode-linux-devel
[-- 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [uml-devel] WARNING: CPU: 0 PID: 908 at include/linux/thread_info.h:128 sigsuspend+0xab/0xc0()
2015-11-16 17:32 ` Richard Weinberger
@ 2015-11-16 17:46 ` Vegard Nossum
0 siblings, 0 replies; 7+ messages in thread
From: Vegard Nossum @ 2015-11-16 17:46 UTC (permalink / raw)
To: Richard Weinberger, Jeff Dike; +Cc: user-mode-linux-devel
On 11/16/2015 06:32 PM, Richard Weinberger wrote:
> 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. :-(
Perfect, with your patch xterm works every time.
(With the earlyprintk tip you gave earlier, I was also able to use
con0=pts -- con0=pty doesn't seem to find any host devices, but that's
probably expected.)
Thanks a lot!
Vegard
------------------------------------------------------------------------------
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
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-11-16 17:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-11-16 17:46 ` Vegard Nossum
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).