Skip to contentSkip to conversation

signal mask not reset on exec

Qemu-devel John Sullivan 2 participants 3 messages Oct 4, 2012 – Nov 8, 2017

lore
Share & tools
lore
#0 lore raw

Public bug reported:

Seen in qemu-1.0 under 12.04, but AFAICT from current git it hasn't changed.

./main-loop.c:qemu_signal_init blocks SIGALRM so it can be handled via signalfd.

./net/tap.c:launch_script does not reset the signal mask before the execv() call, and signal masks are inherited. So the script is run with SIGALRM blocked (as can be seen in /proc/$$/status, "SigBlk:
0000000000002000"). One reasonable example of where this bites is an interface up script that calls ping with a timeout to give things a chance to settle down before continuing, but abort if this doesn't happen within a reasonable time). Since ping uses SIGALRM for the timeout, this now never terminates.

qemu-0.14 didn't block SIGALRM, so such scripts worked fine there.

** Affects: qemu
Importance: Undecided
Status: New

Signature · 30 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1061778

Title:
  signal mask not reset on exec

Status in QEMU:
  New

Bug description:
  Seen in qemu-1.0 under 12.04, but AFAICT from current git it hasn't
  changed.

  ./main-loop.c:qemu_signal_init blocks SIGALRM so it can be handled via
  signalfd.

  ./net/tap.c:launch_script does not reset the signal mask before the
  execv() call, and signal masks are inherited. So the script is run
  with SIGALRM blocked (as can be seen in /proc/$$/status, "SigBlk:
  0000000000002000"). One reasonable example of where this bites is an
  interface up script that calls ping with a timeout to give things a
  chance to settle down before continuing, but abort if this doesn't
  happen within a reasonable time). Since ping uses SIGALRM for the
  timeout, this now never terminates.

  qemu-0.14 didn't block SIGALRM, so such scripts worked fine there.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1061778/+subscriptions
#1 lore raw

Triaging old bug tickets... can you still reproduce this issue with the latest version of QEMU? Or could we close this ticket nowadays?

** Changed in: qemu
Status: New => Incomplete

Signature · 30 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1061778

Title:
  signal mask not reset on exec

Status in QEMU:
  Incomplete

Bug description:
  Seen in qemu-1.0 under 12.04, but AFAICT from current git it hasn't
  changed.

  ./main-loop.c:qemu_signal_init blocks SIGALRM so it can be handled via
  signalfd.

  ./net/tap.c:launch_script does not reset the signal mask before the
  execv() call, and signal masks are inherited. So the script is run
  with SIGALRM blocked (as can be seen in /proc/$$/status, "SigBlk:
  0000000000002000"). One reasonable example of where this bites is an
  interface up script that calls ping with a timeout to give things a
  chance to settle down before continuing, but abort if this doesn't
  happen within a reasonable time). Since ping uses SIGALRM for the
  timeout, this now never terminates.

  qemu-0.14 didn't block SIGALRM, so such scripts worked fine there.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1061778/+subscriptions
#2 lore raw
In reply to John Sullivan

[Expired for QEMU because there has been no activity for 60 days.]

** Changed in: qemu
Status: Incomplete => Expired

Signature · 30 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1061778

Title:
  signal mask not reset on exec

Status in QEMU:
  Expired

Bug description:
  Seen in qemu-1.0 under 12.04, but AFAICT from current git it hasn't
  changed.

  ./main-loop.c:qemu_signal_init blocks SIGALRM so it can be handled via
  signalfd.

  ./net/tap.c:launch_script does not reset the signal mask before the
  execv() call, and signal masks are inherited. So the script is run
  with SIGALRM blocked (as can be seen in /proc/$$/status, "SigBlk:
  0000000000002000"). One reasonable example of where this bites is an
  interface up script that calls ping with a timeout to give things a
  chance to settle down before continuing, but abort if this doesn't
  happen within a reasonable time). Since ping uses SIGALRM for the
  timeout, this now never terminates.

  qemu-0.14 didn't block SIGALRM, so such scripts worked fine there.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1061778/+subscriptions