bug: blkid hangs forever with partition type mdraid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, 

I'm using util-linux-ng version 2.15 compiled from sources with
internal libblkid enabled, --with-fsprobe=builtin. 
For test purpose I've created and assembled two partitions as an 
level 1 software-raid. 

Blkid from e2fsprogs reports these partition as follows:

#:> blkid /dev/sda7
/dev/sda7: UUID="c193d159-1fd4-1a4b-4037-f3433e016f3d" TYPE="mdraid"

The blkid binary build from the util-linux-ng sources just hangs 
forever with 100% cpu load with the same command. To exclude any 
linker/library problems I've created a static binary, a strace with 
the same call as above is below.
Running the same command as a normal user and not root works, probably
because there's no write access to /dev/sda7 than.
Other partition types than mdraid are working, even with write access. 
See the output, created as normal user, below for the types I have
available and also tested.

Complete build log of util-linux-ng is available from [1].

Thanks and regards
Juergen

[1] http://jue.li/tmp/util-linux-ng-2.15-config.log


==> run as root or user with write access

#> strace ./blkid.static /dev/sda7
execve("./blkid.static", ["./blkid.static", "/dev/sda7"], [/* 36 vars
*/]) = 0
uname({sys="Linux", node="jue", ...})   = 0
brk(0)                                  = 0x80d6000
brk(0x80d6cb0)                          = 0x80d6cb0
set_thread_area({entry_number:-1 -> 6, base_addr:0x80d6830,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
brk(0x80f7cb0)                          = 0x80f7cb0
brk(0x80f8000)                          = 0x80f8000
getuid32()                              = 0
geteuid32()                             = 0
getgid32()                              = 0
getegid32()                             = 0
prctl(0x3, 0, 0, 0, 0)                  = 1
getuid32()                              = 0
geteuid32()                             = 0
getgid32()                              = 0
getegid32()                             = 0
prctl(0x3, 0, 0, 0, 0)                  = 1
open("/etc/blkid.conf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file
or directory)
brk(0x80f7000)                          = 0x80f7000
open("/etc/blkid.tab", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1399, ...}) = 0
fcntl64(3, F_GETFL)                     = 0x8000 (flags
O_RDONLY|O_LARGEFILE)
fstat64(3, {st_mode=S_IFREG|0644, st_size=1399, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb80d0000
_llseek(3, 0, [0], SEEK_CUR)            = 0
read(3, "<device DEVNO=\"0x0801\" TIME=\"1242"..., 4096) = 1399
access("/dev/sda1", F_OK)               = 0
access("/dev/sda2", F_OK)               = 0
access("/dev/sda3", F_OK)               = 0
access("/dev/sda5", F_OK)               = 0
access("/dev/sda6", F_OK)               = 0
access("/dev/sda7", F_OK)               = 0
access("/dev/sda8", F_OK)               = 0
access("/dev/sda9", F_OK)               = 0
access("/dev/sda10", F_OK)              = 0
access("/dev/sda11", F_OK)              = 0
access("/dev/sda12", F_OK)              = 0
access("/dev/md0", F_OK)                = 0
read(3, ""..., 4096)                    = 0
close(3)                                = 0
munmap(0xb80d0000, 4096)                = 0
time(NULL)                              = 1242308376
stat64("/dev/sda7", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 7), ...})
= 0
open("/dev/sda7", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 7), ...}) = 0
uname({sys="Linux", node="jue", ...})   = 0
ioctl(3, BLKGETSIZE64, 0x80d7cbc)       = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3,
"XFSB\0\0\20\0\0\0\0\0\0%JP\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0002"...,
69632) = 69632
_llseek(3, 10010034176, [10010034176], SEEK_SET) = 0
read(3,
"\374N+\251\0\0\0\0Z\0\0\0\0\0\0\0\0\0\0\0\301\223\321Y\"^\254F\1\0\0\0@"...,
64) = 64



==> run as user without write access

$:> ./blkid.static
/dev/sda1: UUID="06e42969-4921-4730-a41c-821f9d77a4f9" TYPE="xfs" 
/dev/sda2: UUID="672ae0cd-4c8c-460a-97fc-03f1e72fd2d6" TYPE="xfs" 
/dev/sda3: UUID="01345298-41a7-4180-8463-c46141323f59" TYPE="jfs" 
/dev/sda5: TYPE="swap" UUID="e43447df-e972-4e80-b6da-0c4385308de4" 
/dev/sda6: UUID="01637b47-7597-4b1c-9a01-fae5e9cf8b1e" TYPE="xfs" 
/dev/sda7: UUID="c193d159-1fd4-1a4b-4037-f3433e016f3d" TYPE="mdraid" 
/dev/sda8: UUID="c193d159-1fd4-1a4b-4037-f3433e016f3d" TYPE="mdraid" 
/dev/sda9: UUID="6112d739-cb37-4cfe-a993-57b5a11e4414" TYPE="ext3" 
/dev/sda10: UUID="512cdc40-3e36-42dd-86e1-1c855eda895b" TYPE="jfs" 
/dev/sda11: UUID="e42e8680-0a99-47f2-924f-056075a3f0e9" TYPE="jfs" 
/dev/sda12: UUID="71fb1d3d-090b-42a4-8168-34a738cec852" TYPE="jfs" 
/dev/md0: UUID="32033fe5-e35e-4dd2-b7df-9fec0941c07d" TYPE="xfs" 


-- 
Juergen Daubert  |  mailto:jue@xxxxxx  
Korb, Germany    |  http://jue.li/crux

--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux