Segfault event notifier because of race condition

Bug #1640382 reported by Seyeong Kim
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Invalid
Undecided
Unassigned
Icehouse
Fix Committed
Medium
Unassigned
qemu (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Fix Released
Medium
Seyeong Kim

Bug Description

[Impact]

Sometimes instance get crashed with segfault on event notifier

gdb traceback is below[1]

trying to do SRU with below commits[2][3]

[Testcase]

I can't provide the step to reproduce this issue

but provided gdb backtrace for this.

[Regeression Potential]

Above patch is merged on 2014, and it's quite simple patch.

[Other Info]

related link attached

[1] http://pastebin.ubuntu.com/23449623/

[2] http://git.qemu.org/?p=qemu.git;a=commit;h=924fe1293c3e7a3c787bbdfb351e7f168caee3e9
[3] http://git.qemu.org/?p=qemu.git;a=commit;h=df54f5efed9b3be7f40e14113cc1f13f5889e644 ( cherrypicked commit )

Seyeong Kim (seyeongkim)
tags: added: openstack sts
Seyeong Kim (seyeongkim)
Changed in qemu (Ubuntu Trusty):
status: New → In Progress
assignee: nobody → Seyeong Kim (xtrusia)
Seyeong Kim (seyeongkim)
Changed in qemu (Ubuntu):
status: New → Invalid
Changed in qemu (Ubuntu Xenial):
status: New → Invalid
Seyeong Kim (seyeongkim)
tags: added: sts-sponsor sts-sru
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

rebased and reuploaded

Mathew Hodson (mhodson)
Changed in qemu (Ubuntu):
status: Invalid → Fix Released
importance: Undecided → Medium
Changed in qemu (Ubuntu Trusty):
importance: Undecided → Medium
no longer affects: qemu (Ubuntu Xenial)
Revision history for this message
Brian Murray (brian-murray) wrote :

Given that there is no test case in the description, an alternative way to verify the fix would be to find an crash report in the Error Tracker matching the same race condition and watching to ensure that the new package version does not appear in the bucket for that crash. Could you review crashes here to find one that matches?

https://errors.ubuntu.com/?release=Ubuntu 14.04&package=qemu

You might try changing the period from day to month or year.

Revision history for this message
Seyeong Kim (seyeongkim) wrote :

Hey Brian

I couldn't find any similar bug on erros.ubuntu.com

but I found LP bug which forwarded 1 step then this.

https://bugs.launchpad.net/cloud-archive/+bug/1587039

does it worth testing above LP bug for this issue as well? ( or mark duplicate after testing )

Need advice

Thanks a lot

Revision history for this message
Seyeong Kim (seyeongkim) wrote :

It seems that [1] commit introduces [2] ( which is happened in 2.1 as amad ali said )

and patch [3] is fixing [2]

I think this needs combinded patch but not sure.

[1] http://git.qemu.org/?p=qemu.git;a=commit;h=924fe1293c3e7a3c787bbdfb351e7f168caee3e9
[2] https://bugs.launchpad.net/cloud-archive/+bug/1587039
[3] http://git.qemu.org/?p=qemu.git;a=commit;h=e8d3b1a25f284cdf9705b7cf0412281cc9ee3a36

Revision history for this message
Seyeong Kim (seyeongkim) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

seems there is already an upload in the SRU queue waiting for review
https://launchpad.net/ubuntu/trusty/+queue?queue_state=1&queue_text=qemu

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Per discussion with Seyeong Kim this should also apply to Ubuntu Cloud Archive Kilo.
This has the first but lacks the second fix.
He can work that out with the UCA Team.

Changed in cloud-archive:
status: New → Confirmed
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

Hello seb128

I asked SRU only one commit at first,

but I found this raises bug 1587039(after browsing this symptom), then now I'm asking to sponsor or sru new debdiff.

the patch in the queue needs to be NAck and be changed to latest one if is ok.

I asked cpaelzer guide this and he commented to https://bugs.launchpad.net/cloud-archive/+bug/1587039 about this.

Would you mind if you nack this and change patch?

Thanks a lot

Revision history for this message
Seyeong Kim (seyeongkim) wrote :

oh and uca kilo has fixes.

uca icehouse needs this

Revision history for this message
Robie Basak (racb) wrote :

Rejected from the Trusty queue as requested. I don't see another upload to replace it though. Note for the future: you don't need to wait for a rejection before uploading a replacement; just make it clear to the SRU team which needs to be rejected and which you need to keep. See https://launchpad.net/ubuntu/trusty/+queue?queue_state=1 for the current queue.

Revision history for this message
Seyeong Kim (seyeongkim) wrote :
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Seyeong, or anyone else affected,

Accepted qemu into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qemu/2.0.0+dfsg-2ubuntu1.31 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in qemu (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Robie Basak (racb) wrote :

Unsubscribed ~ubuntu-sponsors.

Revision history for this message
Seyeong Kim (seyeongkim) wrote :

ii qemu 2.0.0+dfsg-2ubuntu1.31 amd64 fast processor emulator
ii qemu-keymaps 2.0.0+dfsg-2ubuntu1.31 all QEMU keyboard maps
ii qemu-system 2.0.0+dfsg-2ubuntu1.31 amd64 QEMU full system emulation binaries
ii qemu-system-arm 2.0.0+dfsg-2ubuntu1.31 amd64 QEMU full system emulation binaries (arm)
ii qemu-system-common 2.0.0+dfsg-2ubuntu1.31 amd64 QEMU full system emulation binaries (common files)
ii qemu-system-mips 2.0.0+dfsg-2ubuntu1.31 amd64 QEMU full system emulation binaries (mips)
ii qemu-system-misc 2.0.0+dfsg-2ubuntu1.31 amd64 QEMU full system emulation binaries (miscelaneous)
ii qemu-system-ppc 2.0.0+dfsg-2ubuntu1.31 amd64 QEMU full system emulation binaries (ppc)
ii qemu-system-sparc 2.0.0+dfsg-2ubuntu1.31 amd64 QEMU full system emulation binaries (sparc)
ii qemu-system-x86 2.0.0+dfsg-2ubuntu1.31 amd64 QEMU full system emulation binaries (x86)
ii qemu-user 2.0.0+dfsg-2ubuntu1.31 amd64 QEMU user mode emulation binaries
ii qemu-utils 2.0.0+dfsg-2ubuntu1.31 amd64 QEMU utilities

tags: added: verification-done
removed: verification-needed
Changed in cloud-archive:
status: Confirmed → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu - 2.0.0+dfsg-2ubuntu1.31

---------------
qemu (2.0.0+dfsg-2ubuntu1.31) trusty; urgency=medium

  * aio: fix qemu_bh_schedule() bh->ctx race condition (LP: #1640382)
    - d/p/0001-aio-fix-qemu_bh_schedule-bh-ctx-race-condition.patch
  * aio: strengthen memory barriers for bottom half scheduling
    (LP: #1587039)
    - d/p/0002-aio-strengthen-memory-barriers-for-bottom-half-sched.patch

 -- Seyeong Kim <email address hidden> Thu, 24 Nov 2016 10:44:55 +0100

Changed in qemu (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for qemu has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Louis Bouchard (louis)
tags: added: sts-sru-done
removed: sts-sru
Dan Streetman (ddstreet)
tags: removed: sts-sponsor
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.