Bug#508834: grub-common: grub-probe is painfully slow to execute due to excessive ioctl(BLKFLSBUF)

Max Bowsher maxb at f2s.com
Mon Dec 15 20:42:55 UTC 2008


Package: grub-common
Version: 1.96+20080724-12
Severity: important

Hi,
For me, update-grub is _painfully_ slow to execute, taking 10-30minutes!
I've tracked this to its use of grub-probe. An example grub-probe
command, such as:

grub-probe --device-map=/boot/grub/device.map --device /dev/sda3 --target=fs_uuid

takes something like 10 minutes to execute. Analysis with strace shows
almost all the time is spent in ioctl(BLKFLSBUF), which is executed
over and over again - 59 times for the command above.
Running with -v shows that grub-probe is re-opening the partition
devices repeatedly. In the command above, after opening all the
partitions in my system a few times (why, when specifically asked about
one?), it proceeded to open /dev/sda3 31 times before finally returning
the requested UUID.

I'm selecting this as severity=important, since the immediate
manifestation of the bug is that any attempt to install/upgrade a kernel
package seems to hang when it invokes update-grub.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing'), (100, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.25-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash





More information about the Pkg-grub-devel mailing list