Hello!
I develop software for a small router/firewall appliance
(http://www.stratum.lv/), and use User-Mode Linux for testing and debugging.
Recently, I've upgraded my development system to Fedora Core 4, and UML ceased
to work. I've switched to UML 2.6.12-bs1, and the problem still persists.
Look at the log of kernel invoked with “stderr=1” option (there are many
other options specifying root filesystem and network interfaces, but they are
irrelevant):
[-- Begin of log --]
Checking for /proc/mm...found
Checking for the skas3 patch in the host...not found
Checking PROT_EXEC mmap in /tmp...OK
Failed to mkdir /home/ol/.uml/: Success
tracing thread pid = 2745
Linux version 2.6.12-bs1-um ([EMAIL PROTECTED]) (gcc version 4.0.0
20050519 (Red Hat 4.0.0-8)) #1 Tue Jul 5 09:49:10 EEST 2005
Built 1 zonelists
Kernel command line: rw root=/dev/root
rootflags=/home/ol/work/svn/scf/head/build/image-um/root.i386
rootfstype=hostfs con0=fd:0,fd:1 con=port:9101 ssl=port:9102
eth0=tuntap,,,192.168.254.1 eth1=mcast ubd=3
ubd0=/home/ol/work/svn/scf/head/build/image-um/hda fakehd fake_ide mem=128M
stderr=1
Setting extra ubd major number to 3
fakehd : Changing ubd name to "hd".
PID hash table entries: 1024 (order: 10, 16384 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 125824k available
Mount-cache hash table entries: 512
Checking for host processor cmov support...Yes
Checking for host processor xmm support...No
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...missing
Checking that host ptys support output SIGIO...<0>Kernel panic - not syncing:
check_sigio : write failed, errno = 0
Kernel panic - not syncing: Segfault with no mm
EIP: 0073:[<a002cb1c>] CPU: 0 Not tainted ESP: 007b:a01bbb40 EFLAGS: 00210202
Not tainted
EAX: 00000000 EBX: 00000038 ECX: 00000001 EDX: a01bcf44
ESI: a01bcf74 EDI: a0295120 EBP: a01bbeb4 DS: 007b ES: 007b
a01bb690: [<a0031634>] printk+0x18/0x1c
a01bb6a0: [<a0040dea>] notifier_call_chain+0x1e/0x38
a01bb6c0: [<a0030c11>] panic+0x59/0x110
a01bb6d0: [<a00153f3>] change_sig+0x4b/0x60
a01bb6f0: [<a00174bd>] segv+0x211/0x250
a01bb74c: [<a0128d77>] sigemptyset+0x17/0x34
a01bb760: [<a0015446>] change_signals+0x3e/0x70
a01bb7b0: [<a0017853>] segv_handler+0x10b/0x190
a01bb7c0: [<a002cb1c>] show_regs+0x34/0x1f4
a01bb7f0: [<a001a9fd>] sig_handler_common_tt+0xbd/0x114
a01bb800: [<a001aa3d>] sig_handler_common_tt+0xfd/0x114
a01bb840: [<a0028252>] sig_handler+0x1e/0x3c
a01bb8a0: [<a002cb1c>] show_regs+0x34/0x1f4
a01bbb5c: [<a0018052>] panic_exit+0x26/0x48
a01bbb7c: [<a0031634>] printk+0x18/0x1c
a01bbb8c: [<a0040dea>] notifier_call_chain+0x1e/0x38
a01bbbac: [<a0030c11>] panic+0x59/0x110
a01bbbdc: [<a0014426>] tty_output+0x66/0xf4
a01bbbec: [<a0014411>] tty_output+0x51/0xf4
a01bbdfc: [<a000894e>] check_one_sigio+0xee/0x1dc
a01bbe28: [<a0008854>] handler+0x0/0xc
a01bbe44: [<a0128d77>] sigemptyset+0x17/0x34
a01bbe58: [<a001558d>] set_signals+0x79/0x178
a01bbea8: [<a0141910>] __tcgetattr+0x60/0x84
a01bbeb4: [<a0028234>] sig_handler+0x0/0x3c
a01bbed0: [<a0128d77>] sigemptyset+0x17/0x34
a01bbee4: [<a001558d>] set_signals+0x79/0x178
a01bbf34: [<a0141910>] __tcgetattr+0x60/0x84
a01bbf4c: [<a001a09c>] signal_tramp+0x0/0xf0
a01bbf5c: [<a0008a5f>] check_sigio+0x23/0x64
a01bbf60: [<a00143c0>] tty_output+0x0/0xf4
a01bbf6c: [<a001a09c>] signal_tramp+0x0/0xf0
a01bbf7c: [<a0008cc2>] check_bugs+0x12/0x1c
a01bbf80: [<a001a09c>] signal_tramp+0x0/0xf0
a01bbf8c: [<a0002598>] start_kernel+0x14c/0x1a8
a01bbf94: [<a001a09c>] signal_tramp+0x0/0xf0
a01bbf9c: [<a0002556>] start_kernel+0x10a/0x1a8
a01bbfb4: [<a001a09c>] signal_tramp+0x0/0xf0
a01bbfbc: [<a001976a>] start_kernel_proc+0x42/0x48
a01bbfc4: [<a0028234>] sig_handler+0x0/0x3c
a01bbfcc: [<a001a0cf>] signal_tramp+0x33/0xf0
a01bbfdc: [<a014247e>] __clone+0x6e/0x9c
[-- End of log --]
The first anomaly appears immediately after start:
Checking for /proc/mm...found
There is no “/proc/mm” file on my host system! I use unpatched kernel which
comes with Fedora core 4. Inserting debugging output revealed very strange
behaviour: access() system call in os_access() function in
“arch/um/os-Linux/file.c” file returns -1, but errno is equal to zero!
The same problem happens when on “Checking that host ptys support output
SIGIO” phase:
Checking that host ptys support output SIGIO...<0>Kernel panic - not
syncing: check_sigio : write failed, errno = 0
Again, debugging output inserted in file_io() finction in
“arch/um/os-Linux/file.c” shows than write() system call returns -1, but
errno is again equal to zero.
I don't understand, how can it happen that system calls return failure without
setting errno variable. I don't think that debugging output I was inserting
messes errno value: I save and restore errno carefully, and the same effect
persists both with and without additional debugging output. Also, it doesn't
look like this error is caused by corrupt libraries on my particular system:
I've reproduced the same error on two different Fedora Core 4 host
installations. Did anyone encounter similar effect? Does anyone have an idea
how to fix this problem?
BTW, I call UML on Fedora under “setarch i386 -R” to turn off address space
randomisation. Otherwise, UML dumps core immediately.
P.S. Also, you can see from stack trace, than printk() in panic() causes
double-panic. This looks like another error, but it will not have effect if
the primary error I've describe above gets fixed.
-- Oleg Girko, http://www.infoserver.ru/~ol/
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user