qemu exits with -11 when connecting to a port redirect before the service starts listening
A message that is not in the archive (sent off-list or not yet received): [email protected]
inline voidinsque(void *a, void *b)
{
register struct quehead *element = (struct quehead *) a;
register struct quehead *head = (struct quehead *) b;
element->qh_link = head->qh_link;(line 27 is the last line)
(gdb) p *element
Cannot access memory at address 0x0
(gdb) p a
$3 = (void *) 0x0
This is called from here in slirp/if.c:
/* If there are more packets for this session, re-queue them */
if (ifm->ifs_next != /* ifm->ifs_prev != */ ifm) {
insque(ifm->ifs_next, ifqt);
ifs_remque(ifm);
}It sounds like ifm expects its last element to have ifm->ifs_next = ifm, but it's actually == NULL.
I don't see any changes to this file likely to have introduced the regression, looking further up the stack.
** Also affects: qemu
Importance: Undecided
Status: New
Signature · 28 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/932539 Title: qemu exits with -11 when connecting to a port redirect before the service starts listening Status in QEMU: New Status in “qemu-kvm” package in Ubuntu: Confirmed Bug description: This was detected initially as a crash in the auto upgrade tester. The code of the upgrade tester basically spawns a kvm instance in the background with a port redirect from localhost:54322 to tcp:22 in the VM, then wait for that port to allow for a ssh connection before continuing the upgrade testing. In the past (Oneiric), all worked well but since Precise, we now get qemu exitting with -11 at every single test :( A quick reproducer is: - start a VM that has openssh-server installed with: -net user,hostfwd=tcp::54322-:22 - immediately start "ssh -p 54322 127.0.0.1" before the VM starts booting (BIOS/GRUB state) Then wait for sshd to start in the VM and qemu will exit with -11. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/932539/+subscriptions
Reproduced with uptodate qemu.git:
./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -drive file=../../delme.img -m 512 -vnc :1 -net nic,model=virtio -net user,hostfwd=tcp::2222-:22 [... immediately ssh -p 2222 localhost in another terminal, then wait while VM starts to boot ...]
Segmentation fault (core dumped)
Signature · 28 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/932539 Title: qemu exits with -11 when connecting to a port redirect before the service starts listening Status in QEMU: New Status in “qemu-kvm” package in Ubuntu: Confirmed Bug description: This was detected initially as a crash in the auto upgrade tester. The code of the upgrade tester basically spawns a kvm instance in the background with a port redirect from localhost:54322 to tcp:22 in the VM, then wait for that port to allow for a ssh connection before continuing the upgrade testing. In the past (Oneiric), all worked well but since Precise, we now get qemu exitting with -11 at every single test :( A quick reproducer is: - start a VM that has openssh-server installed with: -net user,hostfwd=tcp::54322-:22 - immediately start "ssh -p 54322 127.0.0.1" before the VM starts booting (BIOS/GRUB state) Then wait for sshd to start in the VM and qemu will exit with -11. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/932539/+subscriptions
I was thinking 1ab74cea060d776b19857c3babc64d729bbdba5c might have introduced it, but at that commit it doesn't happen.
Signature · 28 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/932539 Title: qemu exits with -11 when connecting to a port redirect before the service starts listening Status in QEMU: New Status in “qemu-kvm” package in Ubuntu: Confirmed Bug description: This was detected initially as a crash in the auto upgrade tester. The code of the upgrade tester basically spawns a kvm instance in the background with a port redirect from localhost:54322 to tcp:22 in the VM, then wait for that port to allow for a ssh connection before continuing the upgrade testing. In the past (Oneiric), all worked well but since Precise, we now get qemu exitting with -11 at every single test :( A quick reproducer is: - start a VM that has openssh-server installed with: -net user,hostfwd=tcp::54322-:22 - immediately start "ssh -p 54322 127.0.0.1" before the VM starts booting (BIOS/GRUB state) Then wait for sshd to start in the VM and qemu will exit with -11. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/932539/+subscriptions
Oddly, a bisect suggests this was introduced by
commit e3a110b527f749a2acec079c261f4481aadd3edc:
slirp: Only start packet expiration for delayed ones
which seems rather innocent.
Signature · 28 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/932539 Title: qemu exits with -11 when connecting to a port redirect before the service starts listening Status in QEMU: New Status in “qemu-kvm” package in Ubuntu: Confirmed Bug description: This was detected initially as a crash in the auto upgrade tester. The code of the upgrade tester basically spawns a kvm instance in the background with a port redirect from localhost:54322 to tcp:22 in the VM, then wait for that port to allow for a ssh connection before continuing the upgrade testing. In the past (Oneiric), all worked well but since Precise, we now get qemu exitting with -11 at every single test :( A quick reproducer is: - start a VM that has openssh-server installed with: -net user,hostfwd=tcp::54322-:22 - immediately start "ssh -p 54322 127.0.0.1" before the VM starts booting (BIOS/GRUB state) Then wait for sshd to start in the VM and qemu will exit with -11. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/932539/+subscriptions
** Changed in: qemu
Status: New => Confirmed
Signature · 28 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/932539 Title: qemu exits with -11 when connecting to a port redirect before the service starts listening Status in QEMU: Confirmed Status in “qemu-kvm” package in Ubuntu: Confirmed Bug description: This was detected initially as a crash in the auto upgrade tester. The code of the upgrade tester basically spawns a kvm instance in the background with a port redirect from localhost:54322 to tcp:22 in the VM, then wait for that port to allow for a ssh connection before continuing the upgrade testing. In the past (Oneiric), all worked well but since Precise, we now get qemu exitting with -11 at every single test :( A quick reproducer is: - start a VM that has openssh-server installed with: -net user,hostfwd=tcp::54322-:22 - immediately start "ssh -p 54322 127.0.0.1" before the VM starts booting (BIOS/GRUB state) Then wait for sshd to start in the VM and qemu will exit with -11. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/932539/+subscriptions
(cherrypicked the slirp/if.c patches from upstream, which fixed the problem for me. Pushing the resulting package)
Signature · 28 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/932539 Title: qemu exits with -11 when connecting to a port redirect before the service starts listening Status in QEMU: Fix Released Status in “qemu-kvm” package in Ubuntu: Fix Released Bug description: This was detected initially as a crash in the auto upgrade tester. The code of the upgrade tester basically spawns a kvm instance in the background with a port redirect from localhost:54322 to tcp:22 in the VM, then wait for that port to allow for a ssh connection before continuing the upgrade testing. In the past (Oneiric), all worked well but since Precise, we now get qemu exitting with -11 at every single test :( A quick reproducer is: - start a VM that has openssh-server installed with: -net user,hostfwd=tcp::54322-:22 - immediately start "ssh -p 54322 127.0.0.1" before the VM starts booting (BIOS/GRUB state) Then wait for sshd to start in the VM and qemu will exit with -11. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/932539/+subscriptions
This appears to be fixed upstream.
** Changed in: qemu
Status: Confirmed => Fix Released
Signature · 28 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/932539 Title: qemu exits with -11 when connecting to a port redirect before the service starts listening Status in QEMU: Fix Released Status in “qemu-kvm” package in Ubuntu: Fix Released Bug description: This was detected initially as a crash in the auto upgrade tester. The code of the upgrade tester basically spawns a kvm instance in the background with a port redirect from localhost:54322 to tcp:22 in the VM, then wait for that port to allow for a ssh connection before continuing the upgrade testing. In the past (Oneiric), all worked well but since Precise, we now get qemu exitting with -11 at every single test :( A quick reproducer is: - start a VM that has openssh-server installed with: -net user,hostfwd=tcp::54322-:22 - immediately start "ssh -p 54322 127.0.0.1" before the VM starts booting (BIOS/GRUB state) Then wait for sshd to start in the VM and qemu will exit with -11. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/932539/+subscriptions
This bug was fixed in the package qemu-kvm - 1.0+noroms-0ubuntu8
---------------
qemu-kvm (1.0+noroms-0ubuntu8) precise; urgency=low
* debian/patches/slirp-*: fix bad exit with -11 when connecting to a port redirect before the service starts listening. (LP: #932539)
-- Serge Hallyn <[email protected]> Fri, 16 Mar 2012 16:34:05 -0500
** Changed in: qemu-kvm (Ubuntu)
Status: Confirmed => Fix Released
Signature · 28 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/932539 Title: qemu exits with -11 when connecting to a port redirect before the service starts listening Status in QEMU: Fix Released Status in “qemu-kvm” package in Ubuntu: Fix Released Bug description: This was detected initially as a crash in the auto upgrade tester. The code of the upgrade tester basically spawns a kvm instance in the background with a port redirect from localhost:54322 to tcp:22 in the VM, then wait for that port to allow for a ssh connection before continuing the upgrade testing. In the past (Oneiric), all worked well but since Precise, we now get qemu exitting with -11 at every single test :( A quick reproducer is: - start a VM that has openssh-server installed with: -net user,hostfwd=tcp::54322-:22 - immediately start "ssh -p 54322 127.0.0.1" before the VM starts booting (BIOS/GRUB state) Then wait for sshd to start in the VM and qemu will exit with -11. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/932539/+subscriptions