Skip to contentSkip to conversation

starting an UML image sometimes failed, next (identical) attempt works

uml-devel Toralf Förster 4 participants 5 messages Nov 19, 2014 – Nov 21, 2014 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

/me wonders, why the same call few seconds later works (current git kernel), but not for the first time :

$ nice start_uml.sh -r trinity 
+ /usr/local/bin/linux-v3.18-rc4 earlyprintk ubda=/home/tfoerste/virtual/uml/trinity ubdb=/mnt/ramdisk/trinity_swap eth0=tuntap,tap0,72:ef:3d:9f:c3:5a mem=2000M con0=fd:0,fd:1 con=pts umid=uml_trinity rootfstype=ext4 softlockup_all_cpu_backtrace=1

Locating the bottom of the address space ... 0x1000
Locating the top of the address space ... 0xc0000000
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking environment variables for a tempdir...none found
Checking if /dev/shm is on tmpfs...OK
Checking PROT_EXEC mmap in /dev/shm...OK
Checking for the skas3 patch in the host:
- /proc/mm...not found: No such file or directory
- PTRACE_FAULTINFO...not found
- PTRACE_LDT...not found
UML running in SKAS0 mode
Adding 28835840 bytes to physical memory to account for exec-shield gap
Kernel virtual memory size shrunk to 953155584 bytes
bootconsole [earlycon0] enabled
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
Memory: 2022804K/2076160K available (4848K kernel code, 310K rwdata, 1784K rodata, 118K init, 240K bss, 53356K reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:15
Calibrating delay loop... 2072.57 BogoMIPS (lpj=10362880)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 4096 (order: 2, 16384 bytes)
Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for host processor cmov support...Yes
Checking that host ptys support output SIGIO...tty_output : read failed, err = -1
Checking that host ptys support SIGIO on close...No, enabling workaround
devtmpfs: initialized
Using 2.6 host AIO
xor: measuring software checksum speed
8regs : 2519.200 MB/sec
8regs_prefetch: 2843.600 MB/sec
32regs : 1999.200 MB/sec
32regs_prefetch: 1238.400 MB/sec
xor: using function: 8regs_prefetch (2843.600 MB/sec)
prandom: seed boundary self test passed
prandom: 100 self tests passed
NET: Registered protocol family 16
raid6: int32x1 235 MB/s
raid6: int32x2 292 MB/s
raid6: int32x4 188 MB/s
raid6: int32x8 183 MB/s
raid6: using algorithm int32x2 (292 MB/s)
raid6: using intx1 recovery algorithm
Switched to clocksource itimer
NET: Registered protocol family 2
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 6, 327680 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP: reno registered
UDP hash table entries: 1024 (order: 3, 49152 bytes)
UDP-Lite hash table entries: 1024 (order: 3, 49152 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
console [stderr0] disabled
mconsole (version 2) initialized on /home/tfoerste/.uml/uml_trinity/mconsole
Checking host MADV_REMOVE support...OK
UML Audio Relay (host dsp = /dev/sound/dsp, host mixer = /dev/sound/mixer)
Host TLS support detected
Detected host type: i386 (GDT indexes 6 to 9)
futex hash table entries: 256 (order: 0, 7168 bytes)
audit: initializing netlink subsys (disabled)
audit: type=2000 audit(1416416597.671:1): initialized
zpool: loaded
zbud: loaded
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
Installing knfsd (copyright (C) 1996 [email protected]).
msgmni has been set to 3950
alg: No test for stdrng (krng)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered (default)
loop: module loaded
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.28.0-ioctl (2014-09-17) initialised: [email protected]
TCP: cubic registered
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17

Key type dns_resolver registered
Initialized stdio console driver
Console initialized on /dev/tty0
console [tty0] enabled
console [tty0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
Initializing software serial port version 1
console [mc-1] enabled
Failed to initialize ubd device 0 :Couldn't determine size of device's file
ubdb: unknown partition table
Netdevice 0 (72:ef:3d:9f:c3:5a) :
TUN/TAP backend -
Btrfs loaded
winch_thread : TIOCSCTTY failed on fd 1 err = 1
VFS: Cannot open root device "98:0" or unknown-block(98,0): error -6 Please append a correct "root=" boot option; here are the available partitions:
6210 262144 ubdb driver: uml-blkdev

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(98,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.0-rc4 #12
Stack:
 085c8b17 085c8b17 086f8547 085068c1 fffffffa 864aff40 864afef8 08509f65
 00000000 864afed0 864aff20 085060bd 085d4920 08739180 085c5be0 864aff30
 00000000 fffffffa 864aff40 00008001 864aff6c 08048f9d 085c5be0 864aff40
Call Trace:
 [<085068c1>] ? printk+0x38/0x3a
 [<08060ae9>] show_stack+0x119/0x180
 [<085068c1>] ? printk+0x38/0x3a
 [<08509f65>] dump_stack+0x26/0x28
 [<085060bd>] panic+0x8f/0x1a9
 [<08048f9d>] mount_block_root+0x1e0/0x261
 [<0811bea8>] ? SyS_mknod+0x28/0x30
 [<0804907e>] mount_root+0x60/0x66
 [<080491c3>] prepare_namespace+0x13f/0x185
 [<08048cb2>] kernel_init_freeable+0x190/0x19d
 [<0804821f>] ? repair_env_string+0x0/0x91
 [<0850493b>] kernel_init+0xb/0xe0
 [<0805f69b>] new_thread_handler+0x6b/0x90
Signature · 14 lines
Toralf
pgp key: 0076 E94E


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#1 lore raw

I have seen this a couple of times as well.

I am a bit snowed under at the moment, when I have some spare time I will try to dig through my trees to see exactly what did I come up with as a root cause.

A.

Quoted 125 lines · Toralf Förster

/me wonders, why the same call few seconds later works (current git kernel), but not for the first time :

$ nice start_uml.sh -r trinity 
+ /usr/local/bin/linux-v3.18-rc4 earlyprintk ubda=/home/tfoerste/virtual/uml/trinity ubdb=/mnt/ramdisk/trinity_swap eth0=tuntap,tap0,72:ef:3d:9f:c3:5a mem=2000M con0=fd:0,fd:1 con=pts umid=uml_trinity rootfstype=ext4 softlockup_all_cpu_backtrace=1

Locating the bottom of the address space ... 0x1000
Locating the top of the address space ... 0xc0000000
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking environment variables for a tempdir...none found
Checking if /dev/shm is on tmpfs...OK
Checking PROT_EXEC mmap in /dev/shm...OK
Checking for the skas3 patch in the host:
- /proc/mm...not found: No such file or directory
- PTRACE_FAULTINFO...not found
- PTRACE_LDT...not found
UML running in SKAS0 mode
Adding 28835840 bytes to physical memory to account for exec-shield gap
Kernel virtual memory size shrunk to 953155584 bytes
bootconsole [earlycon0] enabled
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
Memory: 2022804K/2076160K available (4848K kernel code, 310K rwdata, 1784K rodata, 118K init, 240K bss, 53356K reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:15
Calibrating delay loop... 2072.57 BogoMIPS (lpj=10362880)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 4096 (order: 2, 16384 bytes)
Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for host processor cmov support...Yes
Checking that host ptys support output SIGIO...tty_output : read failed, err = -1
Checking that host ptys support SIGIO on close...No, enabling workaround
devtmpfs: initialized
Using 2.6 host AIO
xor: measuring software checksum speed
8regs : 2519.200 MB/sec
8regs_prefetch: 2843.600 MB/sec
32regs : 1999.200 MB/sec
32regs_prefetch: 1238.400 MB/sec
xor: using function: 8regs_prefetch (2843.600 MB/sec)
prandom: seed boundary self test passed
prandom: 100 self tests passed
NET: Registered protocol family 16
raid6: int32x1 235 MB/s
raid6: int32x2 292 MB/s
raid6: int32x4 188 MB/s
raid6: int32x8 183 MB/s
raid6: using algorithm int32x2 (292 MB/s)
raid6: using intx1 recovery algorithm
Switched to clocksource itimer
NET: Registered protocol family 2
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 6, 327680 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP: reno registered
UDP hash table entries: 1024 (order: 3, 49152 bytes)
UDP-Lite hash table entries: 1024 (order: 3, 49152 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
console [stderr0] disabled
mconsole (version 2) initialized on /home/tfoerste/.uml/uml_trinity/mconsole
Checking host MADV_REMOVE support...OK
UML Audio Relay (host dsp = /dev/sound/dsp, host mixer = /dev/sound/mixer)
Host TLS support detected
Detected host type: i386 (GDT indexes 6 to 9)
futex hash table entries: 256 (order: 0, 7168 bytes)
audit: initializing netlink subsys (disabled)
audit: type=2000 audit(1416416597.671:1): initialized
zpool: loaded
zbud: loaded
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
Installing knfsd (copyright (C) 1996 [email protected]).
msgmni has been set to 3950
alg: No test for stdrng (krng)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered (default)
loop: module loaded
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.28.0-ioctl (2014-09-17) initialised: [email protected]
TCP: cubic registered
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17

Key type dns_resolver registered
Initialized stdio console driver
Console initialized on /dev/tty0
console [tty0] enabled
console [tty0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
Initializing software serial port version 1
console [mc-1] enabled
Failed to initialize ubd device 0 :Couldn't determine size of device's file
ubdb: unknown partition table
Netdevice 0 (72:ef:3d:9f:c3:5a) :
TUN/TAP backend -
Btrfs loaded
winch_thread : TIOCSCTTY failed on fd 1 err = 1
VFS: Cannot open root device "98:0" or unknown-block(98,0): error -6 Please append a correct "root=" boot option; here are the available partitions:
6210 262144 ubdb driver: uml-blkdev

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(98,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.0-rc4 #12
Stack:
 085c8b17 085c8b17 086f8547 085068c1 fffffffa 864aff40 864afef8 08509f65
 00000000 864afed0 864aff20 085060bd 085d4920 08739180 085c5be0 864aff30
 00000000 fffffffa 864aff40 00008001 864aff6c 08048f9d 085c5be0 864aff40
Call Trace:
 [<085068c1>] ? printk+0x38/0x3a
 [<08060ae9>] show_stack+0x119/0x180
 [<085068c1>] ? printk+0x38/0x3a
 [<08509f65>] dump_stack+0x26/0x28
 [<085060bd>] panic+0x8f/0x1a9
Quoted 11 lines
 [<08048f9d>] mount_block_root+0x1e0/0x261
 [<0811bea8>] ? SyS_mknod+0x28/0x30
 [<0804907e>] mount_root+0x60/0x66
 [<080491c3>] prepare_namespace+0x13f/0x185
 [<08048cb2>] kernel_init_freeable+0x190/0x19d
 [<0804821f>] ? repair_env_string+0x0/0x91
 [<0850493b>] kernel_init+0xb/0xe0
 [<0805f69b>] new_thread_handler+0x6b/0x90

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw
In reply to Toralf Förster
Quoted 2 lines · Toralf Förster

console [mc-1] enabled
Failed to initialize ubd device 0 :Couldn't determine size of device's file

This is ubd_file_size(). Can you find out where exactly it is failing? Just add a few printk()s into it.

Signature · 13 lines
Thanks,
//richard

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#3 lore raw
Quoted 4 lines · Richard Weinberger
Quoted 2 lines

console [mc-1] enabled

Quoted 1 line

Failed to initialize ubd device 0 :Couldn't determine size of device's file

This is ubd_file_size(). Can you find out where exactly it is failing? Just add a few printk()s into it.

Did it:

arch/um/drivers/ubd_kern.c +5 -0
index e8ab93c..22390f9 100644
@@ -508,19 +508,25 @@ static inline int ubd_file_size(struct ubd *ubd_dev, __u64 *size_out)
        int sector_size;
        int bitmap_offset;
 
+printk(KERN_INFO "ubd_file_size 0");
        if (ubd_dev->file && ubd_dev->cow.file) {
                file = ubd_dev->cow.file;
+printk(KERN_INFO "ubd_file_size 1");
 
                goto out;
        }
 
        fd = os_open_file(ubd_dev->file, of_read(OPENFLAGS()), 0);
+printk(KERN_INFO "ubd_file_size 2");
        if (fd < 0)
                return fd;
+printk(KERN_INFO "ubd_file_size 3");
 
        err = read_cow_header(file_reader, &fd, &version, &backing_file, \
                &mtime, &size, &sector_size, &align, &bitmap_offset);
        os_close_file(fd);
+printk(KERN_INFO "ubd_file_size 4, err=%i", err);
 
        if(err == -EINVAL)
                file = ubd_dev->file;

but no result so far (did the issue knows that I do observe him ???). I might test if this happens at the first time the UML image file is mounted using a loop device (after reboot of the host).

Signature · 14 lines
Toralf
pgp key: 0076 E94E


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#4 lore raw
Quoted 11 lines · Toralf Förster
arch/um/drivers/ubd_kern.c +1 -0
index e8ab93c..22390f9 100644
@@ -508,19 +508,25 @@ static inline int ubd_file_size(struct ubd *ubd_dev, __u64 *size_out)
        int sector_size;
        int bitmap_offset;
 
+printk(KERN_INFO "ubd_file_size 0");
        if (ubd_dev->file && ubd_dev->cow.file) {
                file = ubd_dev->cow.file;

arch/um/drivers/ubd_kern.c static inline int ubd_file_size(struct ubd *ubd_dev, __u64 *size_out) · line 523

Quoted 10 lines
arch/um/drivers/ubd_kern.c +3 -0
+printk(KERN_INFO "ubd_file_size 1");
 
                goto out;
        }
 
        fd = os_open_file(ubd_dev->file, of_read(OPENFLAGS()), 0);
+printk(KERN_INFO "ubd_file_size 2");
        if (fd < 0)
                return fd;
+printk(KERN_INFO "ubd_file_size 3");

Not really on-topic, but it's faster to add lines like

    pr_info("%s:%u\n", __func__, __LINE__);

They're identical (i.e. copy-'n-paste), but give unique output depending on context.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds