[Bug 1527645] Re: grub-mkconfig hangs (due to acting on closed handle?)
Steve Langasek
steve.langasek at canonical.com
Fri Dec 18 17:34:14 UTC 2015
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 17818
pipe([3, 4]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fe3556d7a10) = 17819
close(4) = 0
read(3,
This is the standard usage of pipe. pipe opens two connected file
descriptors, and returns these fds in the array that's the argument to
pipe. The process then forks, the parent closes one, the child closes
the other, and they talk across this pipe.
Since you are only stracing the grub-mkconfig process, and not following
forks ('strace -ff'), this trace doesn't show us what's actually
hanging.
grub-mkconfig, btw, is a shell script, so it's probably better to debug
it using 'sh -x /usr/sbin/grub-mkconfig' instead.
** Package changed: grub (Ubuntu) => grub2 (Ubuntu)
** Changed in: grub2 (Ubuntu)
Status: New => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1527645
Title:
grub-mkconfig hangs (due to acting on closed handle?)
Status in grub2 package in Ubuntu:
Incomplete
Bug description:
Calling "grub-mkconfig -o /boot/grub/grub.cfg" hangs. I came across
this when running "apt-get upgrade", during the kernel post install
step, where it hangs on this line in the log:
run-parts: executing /etc/kernel/postinst.d/zz-update-grub
3.19.0-41-generic /boot/vmlinuz-3.19.0-41-generic
I ran strace on calling grub-mkconfig. I'll attach the output, but
here's a summary of the output. To my untrained eye, it looks like
grub-mkconfig is calling pipe() and read() on a closed handle.
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
... snip ...
read(3, "/dev/mapper/ubuntu--vg-root\n", 128) = 28
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=17818, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn() = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 17818
pipe([3, 4]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fe3556d7a10) = 17819
close(4) = 0
read(3,
^
|
NOTE: THE PROCESS HANGS THERE
NOTE: AFTER KILLING THE PROCESS, THE LINE CONTINUES THERE
|
v
read(3, 0x7ffddd6b62e0, 128) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=16554, si_uid=0} ---
+++ killed by SIGTERM +++
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here are the package versions on hand as determined by "apt-cache
policy grub grub-pc grub-efi"
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
grub:
Installed: (none)
Candidate: 0.97-29ubuntu66
Version table:
0.97-29ubuntu66 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
grub-pc:
Installed: 2.02~beta2-9ubuntu1.6
Candidate: 2.02~beta2-9ubuntu1.6
Version table:
*** 2.02~beta2-9ubuntu1.6 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
100 /var/lib/dpkg/status
2.02~beta2-9 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
grub-efi:
Installed: (none)
Candidate: 2.02~beta2-9ubuntu1.6
Version table:
2.02~beta2-9ubuntu1.6 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
2.02~beta2-9 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is similar to what happened to me in bug #1510563 about a month
ago.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1527645/+subscriptions
More information about the foundations-bugs
mailing list