On Tuesday, January 28, 2014 09:37:36 PM Craig Small wrote: > tags 736628 help > tags 736628 upstream > > On Mon, Jan 27, 2014 at 09:08:56AM -0800, Daniel Schepler wrote: > > (gdb) p disks > > $1 = (struct disk_stat **) 0x7fffffffeb08 > > (gdb) p *disks > > $2 = (struct disk_stat *) 0x0 > > (gdb) p cDisk > > The problem seems to be that a partition is found before the disk > appears. More specifically, the partition needs to be before *any* > disk. (A different but related bug is that the library assumes > all partitions appear immediately after the disk line). > > So: sda, sda1, sda2 = ok > sda1,sda2,sda = crash > sr0, sda1, sda2 = ok, but sda1 is "linked" to sr0 > > The problem now is, under what conditions do these odd > /proc/diskstats occur and what interpretation should > vmstat make of the situation? Ignore the partitions? > Raise an error? re-map the disk->partition links > after reading the file?
I just did a bit more debugging using strace, and found that this happens just before the crash: access("/sys/block/sda", F_OK) = -1 ENOENT (No such file or directory) --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Segmentation fault In fact, it looks like pbuilder doesn't mount /sys, and I can get vmstat to work by hand mounting it: root@frobozz:/# vmstat -p sda1 Segmentation fault root@frobozz:/# mount -t sysfs sysfs /sys root@frobozz:/# vmstat -p sda1 sda1 reads read sectors writes requested writes 727293 24757690 278900 32422536 root@frobozz:/# umount /sys root@frobozz:/# vmstat -p sda1 Segmentation fault -- Daniel Schepler -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org