Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 434802

Summary: xenkbd can deadlock virtual keyboard on resume
Product: Red Hat Enterprise Linux 5 Reporter: Markus Armbruster <armbru>
Component: kernel-xenAssignee: Markus Armbruster <armbru>
Status: CLOSED DUPLICATE QA Contact: Martin Jenner <mjenner>
Severity: high Docs Contact:
Priority: high    
Version: 5.1CC: xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-21 16:45:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 434800, 434806, 448753, 451807    
Attachments:
Description Flags
Proposed fix none

Description Markus Armbruster 2008-02-25 16:23:01 UTC
Description of problem:
xenkbd_resume() fails to reinitialize the shared page.  If the driver resumes
with a full ring buffer, it deadlocks: the frontend won't drain the ring buffer
until notified through the event channel, and the backend won't notify while the
ring buffer is full.

How reproducible:
Haven't tried.

Additional info:
Upstream fix: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/90fbf541d772

Comment 1 Markus Armbruster 2008-02-26 14:17:44 UTC
It should be possible to trigger the bug by moving the mouse in the guest's
virtual screen during save.

You need to reinitialize the device to get it unstuck.  Reboot works.  Maybe
driver unbind / bind could also work, but when I tried it, the device
reinitialized as /class/input/input2, and X was not happy.

Comment 2 Markus Armbruster 2008-02-26 14:18:52 UTC
Clarification: rebooting the *guest* works.  No need to reboot the host.

Comment 3 Markus Armbruster 2008-02-26 15:11:13 UTC
Created attachment 295929 [details]
Proposed fix

Addresses bug 434800 and bug 434806 as well.

XS upstream fixed bug 434802 in
http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev=415
That fix clears just the defined members of the shared page.  My patch clears
the whole shared page, both on probe and resume.  Makes more sense, and matches
the framebuffer device's behavior.

Comment 4 RHEL Program Management 2008-06-09 21:58:43 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Markus Armbruster 2008-07-21 16:26:28 UTC
The patch in comment#3 also addresses bug 451807.

Comment 7 Markus Armbruster 2008-07-21 16:45:39 UTC
The proposed fix has been committed as a fix for bug 434800.  Turning this one
into a duplicate of 434800 to keep things simple and sane.

*** This bug has been marked as a duplicate of 434800 ***