From: Richard W.M. J. <rj...@re...> - 2013-08-13 12:04:13
|
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 |