All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] uml instance crashes when started from script
@ 2015-12-06 15:34 Vegard Nossum
  2015-12-07  7:24 ` stian
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vegard Nossum @ 2015-12-06 15:34 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: Jeff Dike, user-mode-linux-devel

Hi,

I've been running into some odd crashes when starting my UML instance 
from Python. This is my script:

import subprocess
subprocess.check_call(['path/to/vmlinux', 'mem=2048M', 
'rootfstype=hostfs', 'rw', 'init=/bin/bash'])

This will crash 9 out of 10 times with various strange messages on the 
console:

[    1.890000] devtmpfs: mounted
[    1.960000] mount (947) used greatest stack depth: 5592 bytes left
[    1.990000] mount (948) used greatest stack depth: 5496 bytes left
#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#��+J@��o��#7%����2Z����.�j
o
��h� -^(�l0�w8�\@�}P�)o`o-�p)CS�-!���8��,��Ҋ8�>)DV9 � 
�9�����$��#�#�#�#[    6.870000]
[    6.870000] Pid: 1, comm: init Not tainted 4.4.0-rc3
[    6.870000] RIP: 0033:[<00000000018d4848>]
[    6.870000] RSP: 00000000dff3efa8  EFLAGS: 00010216
[    6.870000] RAX: 0000000000000001 RBX: 00000000600748c0 RCX: 
00007fb9d87dacd8
[    6.870000] RDX: ffffffffffffffff RSI: 0000000000000001 RDI: 
00000000dfeba3c8
[    6.870000] RBP: 00000000dff3efe8 R08: 00000000dff3ee38 R09: 
0000000000001382
[    6.870000] R10: 0000000000000000 R11: 0000000000000246 R12: 
00000000dff3e000
[    6.870000] R13: 0000000060050f90 R14: 0000000000000000 R15: 
0000000060050a20
[    6.870000] Kernel panic - not syncing: Kernel tried to access user 
memory at addr 0x18d4848, ip 0x18d4848
[    6.870000] CPU: 0 PID: 1 Comm: init Not tainted 4.4.0-rc3 #1
[    6.870000]
[    6.870000] Pid: -538516280, comm:  Not tainted 4.4.0-rc3
[    6.870000] RIP: 0033:[<000000006005b54a>]
[    6.870000] RSP: 00000000dff3c060  EFLAGS: 00010206
[    6.870000] RAX: 0000000002556c00 RBX: 0000000002557610 RCX: 
0000000000000001
[    6.870000] RDX: 0000000000000006 RSI: 0000000000000000 RDI: 
000000006005b54a
[    6.870000] RBP: 00000000dff3c120 R08: 00000000dff3e0a0 R09: 
0000000000000001
[    6.870000] R10: 0000000000000008 R11: 0000000000000246 R12: 
00000000dff3c190
[    6.870000] R13: 0000000000000000 R14: 000000006005b54a R15: 
00000000dff3c578
[    6.870000] Kernel panic - not syncing: Kernel tried to access user 
memory at addr 0x2557610, ip 0x6005b54a

I think the biggest clue is perhaps this message that occurs occasionally:

[    1.880000] winch_thread : TIOCSCTTY failed on fd 1 err = 1

I've also seen these traces:

[    1.940000] Kernel panic - not syncing: Kernel mode signal 4
[    1.940000] CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.0-rc3 #1
[    1.940000] Stack:
[    1.940000]  e032f4e0 601099cb ffffffffff0a0110 6187c3c0
[    1.940000]  611ad811 601ad6c6 e032f500 60acf171
[    1.940000]  60acf134 60aeec40 e032f620 601ad207
[    1.940000] Call Trace:
[    1.940000]  [<60076f89>] ? os_is_signal_stack+0x29/0x40
[    1.940000]  [<601ad6c6>] ? printk+0x0/0xfd
[    1.940000]  [<6005850e>] show_stack+0x1fe/0x430
[    1.940000]  [<601099cb>] ? dump_stack_print_info+0x17b/0x1f0
[    1.940000]  [<601ad6c6>] ? printk+0x0/0xfd
[    1.940000]  [<60acf171>] dump_stack+0x3d/0x4c
[    1.940000]  [<60acf134>] ? dump_stack+0x0/0x4c
[    1.940000]  [<60aeec40>] ? bust_spinlocks+0x0/0xe0
[    1.940000]  [<601ad207>] panic+0x206/0x5be
[    1.940000]  [<601ad001>] ? panic+0x0/0x5be
[    1.940000]  [<6005bfde>] relay_signal+0x23e/0x290
[    1.940000]  [<60076c08>] sig_handler_common+0x98/0x1a0
[    1.940000]  [<60076db4>] sig_handler+0xa4/0x160
[    1.940000]  [<600761e1>] hard_handler+0xf1/0x1e0
[    1.940000]  [<601182ab>] ? __call_rcu.isra.1+0x9b/0x140
[    1.940000]  [<60ae48bf>] ? put_dec+0x4f/0x140
[    1.940000]  [<60ae7ce0>] ? number.isra.10+0x720/0x7e0
[    1.940000]  [<601182ab>] ? __call_rcu.isra.1+0x9b/0x140
[    1.940000]  [<600eecec>] ? __enqueue_entity+0xec/0x130
[    1.940000]  [<600f06a0>] ? update_cfs_shares.isra.11+0x0/0x1e0
[    1.940000]  [<600ef3f8>] ? check_preempt_wakeup+0x468/0x6a0
[    1.940000]  [<600748c0>] ? write_sigio_thread+0x0/0x500
[    1.940000]  [<6007494e>] ? write_sigio_thread+0x8e/0x500
[    1.940000]  [<600e625d>] ? schedule_tail+0x2d/0x290
[    1.940000]  [<600748c0>] ? write_sigio_thread+0x0/0x500

and

[    1.900000] Pid: 943, comm: deferwq Not tainted 4.4.0-rc3
[    1.900000] RIP: 0033:[<0000000000000000>]

(On Ctrl-C:)

[  239.840000] Kernel panic - not syncing: Kernel tried to access user 
memory at addr 0x1844248, ip 0x1844248
[  239.840000] CPU: 0 PID: 1 Comm: init Not tainted 4.4.0-rc3 #1
[  239.840000]
[  239.840000] Pid: -538516280, comm:  Not tainted 4.4.0-rc3
[  239.840000] RIP: 0033:[<000000006005b54a>]

When I start my instance from the command line (but inside a screen --
the Python script was also started in a screen) there is no problem AFAICT.

I am not passing any con*= parameters, so it should be using all the
defaults.

I can test patches. Thanks,


Vegard

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&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] 5+ messages in thread

* Re: [uml-devel] uml instance crashes when started from script
  2015-12-06 15:34 [uml-devel] uml instance crashes when started from script Vegard Nossum
@ 2015-12-07  7:24 ` stian
  2015-12-07  7:35   ` Anton Ivanov
  2015-12-08 21:53 ` Richard Weinberger
  2015-12-09  9:08 ` stian
  2 siblings, 1 reply; 5+ messages in thread
From: stian @ 2015-12-07  7:24 UTC (permalink / raw)
  To: user-mode-linux-devel

Den 2015-12-06 16:34, skrev Vegard Nossum:
> Hi,
>
> I've been running into some odd crashes when starting my UML instance
> from Python. This is my script:
>
> import subprocess
> subprocess.check_call(['path/to/vmlinux', 'mem=2048M',
> 'rootfstype=hostfs', 'rw', 'init=/bin/bash'])
>
> [    1.880000] winch_thread : TIOCSCTTY failed on fd 1 err = 1
>

I suspect subprocess.check_call() uses pipes and not pty/tty when 
creating this process. Same problem probably happens if do you something 
like

cat /dev/null | path/to/vmlinux mem=2048M rootfstype=hostfs rw 
init=/bin/bash 2>&1 >log



Stian

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&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] 5+ messages in thread

* Re: [uml-devel] uml instance crashes when started from script
  2015-12-07  7:24 ` stian
@ 2015-12-07  7:35   ` Anton Ivanov
  0 siblings, 0 replies; 5+ messages in thread
From: Anton Ivanov @ 2015-12-07  7:35 UTC (permalink / raw)
  To: user-mode-linux-devel

On 07/12/15 07:24, stian@nixia.no wrote:
> Den 2015-12-06 16:34, skrev Vegard Nossum:
>> Hi,
>>
>> I've been running into some odd crashes when starting my UML instance
>> from Python. This is my script:
>>
>> import subprocess
>> subprocess.check_call(['path/to/vmlinux', 'mem=2048M',
>> 'rootfstype=hostfs', 'rw', 'init=/bin/bash'])
>>
>> [    1.880000] winch_thread : TIOCSCTTY failed on fd 1 err = 1
>>
> I suspect subprocess.check_call() uses pipes and not pty/tty when 
> creating this process.

It does.

>  Same problem probably happens if do you something 
> like
>
> cat /dev/null | path/to/vmlinux mem=2048M rootfstype=hostfs rw 
> init=/bin/bash 2>&1 >log

Brgds,

A.
>
>
>
> Stian
>
> ------------------------------------------------------------------------------
> Go from Idea to Many App Stores Faster with Intel(R) XDK
> Give your users amazing mobile app experiences with Intel(R) XDK.
> Use one codebase in this all-in-one HTML5 development environment.
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&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
>


------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&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] 5+ messages in thread

* Re: [uml-devel] uml instance crashes when started from script
  2015-12-06 15:34 [uml-devel] uml instance crashes when started from script Vegard Nossum
  2015-12-07  7:24 ` stian
@ 2015-12-08 21:53 ` Richard Weinberger
  2015-12-09  9:08 ` stian
  2 siblings, 0 replies; 5+ messages in thread
From: Richard Weinberger @ 2015-12-08 21:53 UTC (permalink / raw)
  To: Vegard Nossum; +Cc: Jeff Dike, stian, user-mode-linux-devel

Hi!

Am 06.12.2015 um 16:34 schrieb Vegard Nossum:
> Hi,
> 
> I've been running into some odd crashes when starting my UML instance from Python. This is my script:
> 
> import subprocess
> subprocess.check_call(['path/to/vmlinux', 'mem=2048M', 'rootfstype=hostfs', 'rw', 'init=/bin/bash'])
> 
> This will crash 9 out of 10 times with various strange messages on the console:

Hmm, I cannot reproduce here on my laptop.
Stian, can you?

I wonder what could cause this.
A completely different terminal should not cause a crash.

*confused*,
//richard

------------------------------------------------------------------------------
_______________________________________________
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] 5+ messages in thread

* Re: [uml-devel] uml instance crashes when started from script
  2015-12-06 15:34 [uml-devel] uml instance crashes when started from script Vegard Nossum
  2015-12-07  7:24 ` stian
  2015-12-08 21:53 ` Richard Weinberger
@ 2015-12-09  9:08 ` stian
  2 siblings, 0 replies; 5+ messages in thread
From: stian @ 2015-12-09  9:08 UTC (permalink / raw)
  To: user-mode-linux-devel

Den 2015-12-06 16:34, skrev Vegard Nossum:
> Hi,
>
> I've been running into some odd crashes when starting my UML instance
> from Python. This is my script:
>
> import subprocess
> subprocess.check_call(['path/to/vmlinux', 'mem=2048M',
> 'rootfstype=hostfs', 'rw', 'init=/bin/bash'])

Can you please share your kernel config file?

Stian

------------------------------------------------------------------------------
_______________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2015-12-09  9:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-06 15:34 [uml-devel] uml instance crashes when started from script Vegard Nossum
2015-12-07  7:24 ` stian
2015-12-07  7:35   ` Anton Ivanov
2015-12-08 21:53 ` Richard Weinberger
2015-12-09  9:08 ` stian

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.