Comment 51 for bug 1276705

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote :

Pierre, would you give me a hand? I proposed the final patch but
I'm unable to prove that SIGKILL sent by systemd-udevd's 30 seconds
timeout is the trigger of this problem, for I don't have a real
machine which takes very long time upon initialization.

According to https://lkml.org/lkml/2014/3/18/396 , I assume that the
probe did not hang but Oleg assumes that the probe did hang and the
SIGKILL wakes up from the hung.

To test whether the probe did actually hang, I think we can ignore
the SIGKILL sent by systemd-udevd process, by applying the patch
shown below on a kernel without the final patch and booting with
rootdelay=45 . If the machine boots fine, we can assert that the
SIGKILL is not needed for waking up from the hung.

---------- patch start ----------
diff --git a/kernel/signal.c b/kernel/signal.c
index 52f881d..49359cb 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1051,6 +1051,7 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
  int override_rlimit;
  int ret = 0, result;

+ WARN_ON(sig == SIGKILL);
  assert_spin_locked(&t->sighand->siglock);

  result = TRACE_SIGNAL_IGNORED;
@@ -2915,6 +2916,10 @@ SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)
  info.si_code = SI_USER;
  info.si_pid = task_tgid_vnr(current);
  info.si_uid = from_kuid_munged(current_user_ns(), current_uid());
+ if (sig == SIGKILL && !strcmp(current->comm, "systemd-udevd")) {
+ printk(KERN_WARNING "Ignored SIGKILL by systemd-udevd\n");
+ return -ESRCH;
+ }

  return kill_something_info(sig, &info, pid);
 }
---------- patch end ----------