OK, I understand what's going wrong and how to reproduce the
signal-to-parent problem.  It does look like a bug in vmlinux.

It happens if the init process (PID 1) inside the VM gets a segfault.

In libguestfs we can force that easily, as there is a test path for
exercising segfaults in our init process:

----------------------------------------------------------------------
#!/bin/bash -
export LIBGUESTFS_BACKEND=uml
export LIBGUESTFS_QEMU=/home/rjones/d/linux/vmlinux
export LIBGUESTFS_DEBUG=1
export LIBGUESTFS_TRACE=1
./run strace -o /tmp/strace.log ./fish/guestfish -a /dev/null <<EOF
run
get-pid
debug segv 1
!sleep 5
EOF
----------------------------------------------------------------------

The output of this and the strace log file is here:

http://oirase.annexia.org/tmp/uml-signal/

output.log.txt shows the PID of vmlinux is 6856.

strace.log.txt shows that the parent process gets terminated by
SIGTERM *from* PID 6856:

--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=6856, si_uid=1000} ---
+++ killed by SIGTERM +++

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to