[BusyBox 0001589]: mount fail with invalid argument

bugs at busybox.net bugs at busybox.net
Thu Nov 15 07:10:55 UTC 2007


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1589 
====================================================================== 
Reported By:                thesame
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1589
Category:                   Other
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
====================================================================== 
Date Submitted:             11-13-2007 16:50 PST
Last Modified:              11-14-2007 23:10 PST
====================================================================== 
Summary:                    mount fail with invalid argument
Description: 
Using linux-live-scripts and busybox 1.4.* up to 1.8.0, mount fail with
invalid argument during boot (mount -o loop,ro /usr.lzm /usr) but if
manually used the mount it works. The fs is a squashfs with lmza patches
on a 64-bit Linux, kernel 2.6.23.1. squashfs is present in
/proc/filesystems
====================================================================== 

---------------------------------------------------------------------- 
 thesame - 11-13-07 16:54  
---------------------------------------------------------------------- 
typo: up to 1.8.1* 

---------------------------------------------------------------------- 
 vda - 11-13-07 18:55  
---------------------------------------------------------------------- 
Can you provide strace output of both unsuccessful mount at boot and
successful mount later on? Also give lsmod output at both points. 

---------------------------------------------------------------------- 
 thesame - 11-14-07 04:47  
---------------------------------------------------------------------- 
Sorry for this, I was too tired. The loop mount work great, the problem is
when the cdrom device is mounted using mount in a bash script/function at
boot or manually and only on a 64-bit, the 32-bit version works. From
there is the invalid argument. I'll be back with a strace later. 

---------------------------------------------------------------------- 
 thesame - 11-14-07 06:58  
---------------------------------------------------------------------- 
Here is the strace and lsmod using BusyBox v1.8.1


execve("/sbin/mount", ["mount", "-n", "-o",
"noatime,users,suid,dev,exec,ro", "/dev/hda", "/mnt/hda"], [/* 9 vars */])
= 0
brk(0)                                  = 0x641000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b2642d26000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = -1 ENOENT (No such file or
directory)
open("/lib/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat("/lib/tls/x86_64", 0x7fff67d9ef40) = -1 ENOENT (No such file or
directory)
open("/lib/tls/libc.so.6", O_RDONLY)    = -1 ENOENT (No such file or
directory)
stat("/lib/tls", 0x7fff67d9ef40)        = -1 ENOENT (No such file or
directory)
open("/lib/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat("/lib/x86_64", 0x7fff67d9ef40)     = -1 ENOENT (No such file or
directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\331"..., 832)
= 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1602784, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b2642d27000
mmap(NULL, 3465368, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
= 0x2b2642f27000
mprotect(0x2b264306d000, 2093056, PROT_NONE) = 0
mmap(0x2b264326c000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x145000) = 0x2b264326c000
mmap(0x2b2643271000, 16536, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b2643271000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b2643276000
arch_prctl(ARCH_SET_FS, 0x2b26432766f0) = 0
mprotect(0x2b264326c000, 12288, PROT_READ) = 0
getuid()                                = 0
brk(0)                                  = 0x641000
brk(0x662000)                           = 0x662000
stat("/dev/hda", {st_mode=S_IFBLK|0660, st_rdev=makedev(3, 0), ...}) = 0
open("/etc/filesystems", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b2643277000
read(3, "ext3\next2\nvfat\n*\n", 1024)  = 17
read(3, "", 1024)                       = 0
open("/proc/filesystems", O_RDONLY)     = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b2643278000
read(4, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 443
read(4, "", 1024)                       = 0
mount("/dev/hda", "/mnt/hda", "ext3", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "ext2", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "vfat", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "reiserfs", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "ext3", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "ext2", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "minix", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "msdos", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "vfat", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "iso9660", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "ntfs", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "udf", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "jfs", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "xfs", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "ocfs2", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "gfs2", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 ENOMEM (Cannot allocate memory)
mount("/dev/hda", "/mnt/hda", "gfs2meta", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 ENOENT (No such file or directory)
mount("/dev/hda", "/mnt/hda", "squashfs", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
mount("/dev/hda", "/mnt/hda", "fuseblk", MS_RDONLY|MS_NOATIME|MS_SILENT,
"users") = -1 EINVAL (Invalid argument)
write(2, "mount: mounting /dev/hda on /mnt"..., 62mount: mounting /dev/hda
on /mnt/hda failed: Invalid argument
) = 62
exit_group(-1)                          = ?
Process 1485 detached

Module                  Size  Used by
yenta_socket 33164 0 - Live 0xffffffff88073000
rsrc_nonstatic 17152 1 yenta_socket, Live 0xffffffff8806d000
pcmcia 49688 0 - Live 0xffffffff8805f000
pcmcia_core 49572 3 yenta_socket,rsrc_nonstatic,pcmcia, Live
0xffffffff88051000
fuse 57008 0 - Live 0xffffffff88042000
aufs 146864 0 - Live 0xffffffff8801d000
squashfs 48528 1 - Live 0xffffffff88010000 (F)
sqlzma 8836 1 squashfs, Live 0xffffffff8800c000
unlzma 8960 1 sqlzma, Live 0xffffffff88008000
loop 24964 2 - Live 0xffffffff88000000

 

---------------------------------------------------------------------- 
 vda - 11-14-07 23:10  
---------------------------------------------------------------------- 
But this is not the output of "mount -o loop,ro /usr.lzm /usr"!

You have shown strace output of
"mount -n -o noatime,users,suid,dev,exec,ro /dev/hda /mnt/hda"
which seems to fail because /dev/hda doesn't contain a filesystem known to
your kernel.

What will be interesting to see is strace of a case where busybox mount
fails, but "standard" (util-linux's?) mount succeeds. Seeing both straces
will be very useful for bug hunting. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-13-07 16:50  thesame        New Issue                                    
11-13-07 16:50  thesame        Status                   new => assigned     
11-13-07 16:50  thesame        Assigned To               => BusyBox         
11-13-07 16:54  thesame        Note Added: 0002912                          
11-13-07 16:54  thesame        Issue Monitored: thesame                     
11-13-07 16:54  thesame        Issue End Monitor: thesame                    
11-13-07 18:55  vda            Note Added: 0002913                          
11-13-07 18:55  vda            Status                   assigned => feedback
11-14-07 04:47  thesame        Note Added: 0002915                          
11-14-07 06:54  thesame        Note Added: 0002916                          
11-14-07 06:58  thesame        Note Edited: 0002916                         
11-14-07 23:10  vda            Note Added: 0002918                          
======================================================================




More information about the busybox-cvs mailing list