2.6.14-rc1 x86 on 2.6.13.1 amd64 host: guest segfaults
Host is running 2.6.13.1
I tried mode=skas0 but it seems to always default to TT. Or has this not been merged in mainline yet?
***
Here is a strace of a x86 guest:
strace ./kernel32 mode=skas0 root=/dev/ubda mem=384M ubd0=./root_fs32 console0=fd:0,fd:1
(..)
gettimeofday({2451808977522855, 18446659740416081920}, NULL) = 0 open("/tmp/vm_file-WEUjnm", O_RDWR|O_CREAT|O_EXCL, 0600) = 5unlink("/tmp/vm_file-WEUjnm") = 0fchmod(5, 0777) = 0_llseek(5, 402653184, [402653184], SEEK_SET) = 0write(5, "\0", 1) = 1fcntl64(5, F_SETFD, FD_CLOEXEC) = 0mmap2(0xa0800000, 394264576, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, 5, 0x800) = 0xffffffffa0800000mkdir("/root/.uml/", 0777) = -1 EEXIST (File exists)mkdir("/root/.uml/1", 0777) = 0open("/root/.uml/1/pid", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0644) = 6
getpid() = 6026
write(6, "6026\n", 5) = 5
close(6) = 0
mprotect(0xa0256000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
rt_sigaction(SIGPIPE, {0x1000000000000001, [], 0}, {SIG_DFL}, 8) = 0
socketcall(0x8, 0xffffc360) = 0
fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
fcntl64(7, F_SETFD, FD_CLOEXEC) = 0rt_sigaction(SIGWINCH, {0x10000000a0019a60, [], 0}, {SIG_DFL}, 8) = 0getpid() = 6026write(1, "tracing thread pid = 6026\n", 26tracing thread pid = 6026 ) = 26clone(child_stack=0xa0257fd4, flags=CLONE_FILES|SIGCHLD) = 6027 --- SIGCHLD (Child exited) @ 0 (0) ---waitpid(6027, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGSTOP}], WSTOPPED) = 6027ptrace(0x15 /* PTRACE_??? */, 6027, 0, 0x1) = 0ptrace(PTRACE_CONT, 6027, 0, SIG_0) = 0rt_sigaction(SIGSEGV, {0x10000000a0019be0, [], 0}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGUSR1, {0x10000000a00184f0, [], 0}, {SIG_DFL}, 8) = 0 waitpid(4294967295, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGSEGV}], WSTOPPED) = 6027
--- SIGCHLD (Child exited) @ 0 (0) ---ptrace(PTRACE_CONT, 6027, 0, SIGSEGV) = 0waitpid(4294967295, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGUSR1}], WSTOPPED) = 6027
--- SIGCHLD (Child exited) @ 0 (0) ---munmap(0, 2692743168) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
**
And here is a amd64 guest:
(This trace was much much longer)
(...)
It seems to spin for an awful long time on:rt_sigprocmask(SIG_BLOCK, [], NULL, 8) = 0 rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM IO], [ALRM VTALRM IO], 8) = 0
Reducing the ram seemed to help, no idea what this is about!
Another weirdness, this command line works:
# ./kernel64 root=/dev/ubda mem=256M ubd0=./root_fs64 eth0=tuntap,tap0,FE:F0:00:00:00:01,10.0.0.254 eth1=pcap,eth0 console0=fd:0,fd:1 umid=1 But this one does not: # ./kernel64 root=/dev/ubda mem=256M ubd0=./root_fs64 eth0=tuntap,tap0,FE:F0:00:00:00:01,10.0.0.254 eth1=pcap,eth0 console0=fd:0,fd:1 console=pty umid=1 gentoo=nodevfs nodevfs selinux=1 enforcing=0 With this one it crashes after checking for PROT_EXEC. Is this to do with command line size limitations?
** Last issue, when running in a 2.6.14-rc1 guest, I can't 'emerge --sync', it dies before rebuilding its cache:
Here is the strace:
(..)
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
checking server timestamp ...
Timestamps on the server and in the local repository are the same. Cancelling all further sync action. You are already up to date.
) = 247ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7f7fc2da50) = -1 ENOTTY (Inappropriate ioctl for device)stat("/var/log/emerge.log", {st_mode=S_IFREG|0660, st_size=222087, ...}) = 0open("/var/log/emerge.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3 fstat(3, {st_mode=S_IFREG|0660, st_size=222087, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000fstat(3, {st_mode=S_IFREG|0660, st_size=222087, ...}) = 0lseek(3, 222087, SEEK_SET) = 222087fstat(3, {st_mode=S_IFREG|0660, st_size=222087, ...}) = 0 fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0 fstat(3, {st_mode=S_IFREG|0660, st_size=222087, ...}) = 0lseek(3, 222087, SEEK_SET) = 222087write(3, "1126803520: *** terminating.\n", 30) = 30 fcntl(3, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
close(3) = 0munmap(0x40018000, 4096) = 0ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7f7fc2daf0) = -1 ENOTTY (Inappropriate ioctl for device)wait4(-1, 0x7f7fc2e034, 0, NULL) = -1 ECHILD (No child processes)open("/var/cache/edb/mtimedb", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 fstat(3, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 fstat(3, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
write(3, "\200\2}q\1(U\4infoq\2}q\3(U\17/usr/share/i"..., 1772) = 1772
close(3) = 0munmap(0x40018000, 4096) = 0chown("/var/cache/edb/mtimedb", 0, 250) = 0chmod("/var/cache/edb/mtimedb", 0664) = 0rt_sigaction(SIGINT, NULL, {0x403330d0, [], SA_RESTORER, 0x40b72ba0}, 8) = 0rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0 rt_sigaction(SIGTERM, NULL, {0x403330d0, [], SA_RESTORER, 0x40b72ba0},
8) = 0rt_sigaction(SIGTERM, {SIG_DFL}, NULL, 8) = 0
munmap(0x4009f000, 200704) = 0 close(4) = 0 munmap(0x40016000, 4096) = 0 munmap(0x40017000, 4096) = 0 exit_group(0) = ?
Any clues?
Thanks
Antoine
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · Antoine Martin
I tried mode=skas0 but it seems to always default to TT. Or has this not been merged in mainline yet?
It's in mainline. What's the guest?
Quoted 3 lines
**
And here is a amd64 guest:
(This trace was much much longer)
Did this one come up in skas0 or tt mode?
Quoted 4 lines
Another weirdness, this command line works:
# ./kernel64 root=/dev/ubda mem=256M ubd0=./root_fs64 eth0=tuntap,tap0,FE:F0:00:00:00:01,10.0.0.254 eth1=pcap,eth0 console0=fd:0,fd:1 umid=1
What's with the console* business? The switch is "con".
Quoted 7 lines
But this one does not:
# ./kernel64 root=/dev/ubda mem=256M ubd0=./root_fs64 eth0=tuntap,tap0,FE:F0:00:00:00:01,10.0.0.254 eth1=pcap,eth0 console0=fd:0,fd:1 console=pty umid=1 gentoo=nodevfs nodevfs selinux=1 enforcing=0 With this one it crashes after checking for PROT_EXEC. Is this to do with command line size limitations?
Maybe, but it probably shouldn't crash.
Quoted 1 line
write(3, "1126803520: *** terminating.\n", 30)= 30
This bit seems relevent - were there any syscall failures above that?
Jeff
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 5 lines · Jeff Dike
Quoted 2 lines · Antoine Martin
I tried mode=skas0 but it seems to always default to TT. Or has this not been merged in mainline yet?
It's in mainline. What's the guest?
2.6.14-rc1
Quoted 5 lines
Quoted 3 lines
**
And here is a amd64 guest:
(This trace was much much longer)Did this one come up in skas0 or tt mode?
I think it was tt (will check tomorrow on that box) As I said above, it seems to always use TT, ignoring mode=skas0
Quoted 6 lines
Quoted 4 lines
Another weirdness, this command line works:
# ./kernel64 root=/dev/ubda mem=256M ubd0=./root_fs64 eth0=tuntap,tap0,FE:F0:00:00:00:01,10.0.0.254 eth1=pcap,eth0 console0=fd:0,fd:1 umid=1What's with the console* business? The switch is "con".
DOH Can't trust my memory! That's why I try to use scripts..
Quoted 9 lines
Quoted 7 lines
But this one does not:
# ./kernel64 root=/dev/ubda mem=256M ubd0=./root_fs64 eth0=tuntap,tap0,FE:F0:00:00:00:01,10.0.0.254 eth1=pcap,eth0 console0=fd:0,fd:1 console=pty umid=1 gentoo=nodevfs nodevfs selinux=1 enforcing=0 With this one it crashes after checking for PROT_EXEC. Is this to do with command line size limitations?Maybe, but it probably shouldn't crash.
Yep, it isn't even that big.
Quoted 4 lines
Quoted 2 lines
write(3, "1126803520: *** terminating.\n", 30)= 30This bit seems relevent - were there any syscall failures above that?
What I am looking for?
I could just drop the full log on a public server if that helps.
Antoine
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Here is another problem that may be of interest:
host is 2.6.13.1 amd64
guest is 2.6.14-rc1
after issuing a uml_mconsole N reboot, I got (from stdout):
" * Starting local... [ ok ]deactivate_all_fds failed, errno = 9
I/O possible"
And the guest just stopped there. Not sure why.
Antoine
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 5 lines · antoine
after issuing a
uml_mconsoleN reboot, I got (from stdout):
" * Starting local... [ ok ]deactivate_all_fdsfailed, errno = 9I/O possible"
Was this booting up or shutting down? The "starting local" business suggests booting, but deactivate_all_fds is only called at shutdown.
I'm chasing a similar bug, which seems to be exercised by hotplugging devices.
Jeff
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 9 lines · Jeff Dike
Quoted 5 lines · antoine
after issuing a
uml_mconsoleN reboot, I got (from stdout):
" * Starting local... [ ok ]deactivate_all_fdsfailed, errno = 9I/O possible"
Was this booting up or shutting down? The "starting local" business suggests booting, but
deactivate_all_fdsis only called at shutdown.
'starting local' was the last message of the boot process (no login screen on this console)
I was shutting down with uml_mconsole N reboot
(I believe this does the equivalent of a 'init 6')
This instance was quite short on memory - which may have caused or helped trigger this.
Antoine
Quoted 4 lines
I'm chasing a similar bug, which seems to be exercised by hotplugging devices.
Jeff
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 9 lines · antoine
Quoted 5 lines · Jeff Dike
Quoted 2 lines · Antoine Martin
I tried mode=skas0 but it seems to always default to TT. Or has this not been merged in mainline yet?
It's in mainline. What's the guest?
2.6.14-rc1
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
**
And here is a amd64 guest:
(This trace was much much longer)Did this one come up in skas0 or tt mode?
I think it was tt (will check tomorrow on that box) As I said above, it seems to always use TT, ignoring mode=skas0
I have a little trick I do, which is to build a minimal UML with hostfs (sample config file attached), and then booting it ala:
./linux rootfstype=hostfs rootflags=/ rw mem=48M init=/bin/sh
This should come up with /bin/sh as pid 1 attached to /dev/console which is going to stdin and stdout of the UML process. (I.E. bog simple uml wrapper for a command shell.)
If I compile it in tt mode, it works fine on ubuntu (hoar-infested hedgehog release).
If I compile it instead for skas mode, it makes it all the way to mounting the rootfs (which it will only do if skas0 is in, because the ubuntu host kernel doesn't have skas support), but then barfs saying it can't intialize the TLS environment, kills PID 1, dumps a panic, and gives me my host kernel's shell prompt back.
(Easy way to tell which system you're running: "whoami". If it says root, you're in the child kernel. "mount -t proc /proc /proc" followed by "cat /proc/cpuinfo" is good too...)
When I build both in, skas0 wins (at least in that it gives me the can't setup tls message and corresponding panic).
Rob
CONFIG_GENERIC_HARDIRQS=yCONFIG_UML=yCONFIG_MMU=yCONFIG_UID16=yCONFIG_RWSEM_GENERIC_SPINLOCK=yCONFIG_GENERIC_CALIBRATE_DELAY=yCONFIG_IRQ_RELEASE_METHOD=yCONFIG_MODE_SKAS=yCONFIG_UML_X86=yCONFIG_TOP_ADDR=0xc0000000CONFIG_STUB_CODE=0xbfffe000CONFIG_STUB_DATA=0xbffff000CONFIG_STUB_START=0xbfffe000CONFIG_ARCH_HAS_SC_SIGNALS=yCONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=yCONFIG_FLATMEM=yCONFIG_FLAT_NODE_MEM_MAP=yCONFIG_LD_SCRIPT_DYN=yCONFIG_NET=yCONFIG_BINFMT_ELF=yCONFIG_HOSTFS=yCONFIG_NEST_LEVEL=0CONFIG_KERNEL_HALF_GIGS=1CONFIG_KERNEL_STACK_ORDER=2CONFIG_CLEAN_COMPILE=yCONFIG_BROKEN_ON_SMP=yCONFIG_INIT_ENV_ARG_LIMIT=32CONFIG_LOCALVERSION=""CONFIG_SYSCTL=yCONFIG_KOBJECT_UEVENT=yCONFIG_KALLSYMS=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_EPOLL=yCONFIG_SHMEM=yCONFIG_CC_ALIGN_FUNCTIONS=0CONFIG_CC_ALIGN_LABELS=0CONFIG_CC_ALIGN_LOOPS=0CONFIG_CC_ALIGN_JUMPS=0CONFIG_BASE_SMALL=0CONFIG_PACKET=yCONFIG_UNIX=yCONFIG_STANDALONE=yCONFIG_STDERR_CONSOLE=yCONFIG_STDIO_CONSOLE=yCONFIG_XTERM_CHAN=yCONFIG_NOCONFIG_CHAN=yCONFIG_CON_ZERO_CHAN="fd:0,fd:1"CONFIG_CON_CHAN="xterm"CONFIG_SSL_CHAN="pty"CONFIG_UNIX98_PTYS=yCONFIG_BLK_DEV_LOOP=yCONFIG_BLK_DEV_RAM_COUNT=16CONFIG_INITRAMFS_SOURCE=""CONFIG_LBD=yCONFIG_IOSCHED_NOOP=yCONFIG_NETDEVICES=yCONFIG_EXT3_FS=yCONFIG_JBD=yCONFIG_DNOTIFY=yCONFIG_PROC_FS=yCONFIG_SYSFS=yCONFIG_RAMFS=yCONFIG_MSDOS_PARTITION=yCONFIG_LOG_BUF_SHIFT=14
Quoted 3 lines · Antoine Martin
Host is running 2.6.13.1
I tried mode=skas0 but it seems to always default to TT.
The correct switch is skas0, mode=skas0 doesn't exist (maybe to fix). Just verified looking at vmlinux --help output.
Quoted 1 line
Or has this not been merged in mainline yet?
The only idea I can have about this is that you didn't compile skas mode in at all. Which makes sense since you never ran a x86_64 SKAS guest until skas0 was born.
In fact,if you have both TT and SKAS0 in, it by default chooses always skas0, unless you say mode=tt.
If you can verify (on *that* kernel, with --showconfig) it's not your fault, I'll check the sources.
Signature · 21 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Messenger: chiamate gratuite in tutto il mondo http://it.messenger.yahoo.com ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel