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 706859

Summary: [REF] Add file lock to xenconsole
Product: Red Hat Enterprise Linux 5 Reporter: Yufang Zhang <yuzhang>
Component: xenAssignee: Xen Maintainance List <xen-maint>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.7CC: jzheng, leiwang, mrezanin, pcao, qwan, xen-maint, yuzhang, yuzhou
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: xen-3.0.3-133.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 05:55:10 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: 699611    

Description Yufang Zhang 2011-05-23 09:35:21 UTC
Description of problem:
Attach console to a guest which already has console attached would cause race contention, so that both consoles of the guest would get stuck. It would make sense to add a file lock to prevent access to console of a guest when the guest already has a console attached, either in xend or in xenconsole. 

Version-Release number of selected component (if applicable):
xen-3.0.3-131.el5

How reproducible:
Always.

Steps to Reproduce:
1. Start a pv guest and attach console to the guest via xm console.
2. In another terminal, attach the console to the same guest via xm console.
3.
  
Actual results:
The both consoles get stuck, and print strange outputs.

Expected results:
xend or xenconsole should prevent attaching console to a guest which already has a console attached. A warning should be printed so that customers could know that it is not a supported behaviour.

Additional info:
Upstream also have such issues, although they support multiple consoles for pv guest. When you attach the same console(with the same console id) more than once, the consoles would get stuck.

Comment 5 Yuyu Zhou 2011-11-30 06:41:41 UTC
reproduce the bug on xen-3.0.3-132.el5 and verify the bug on xen-3.0.3-135.el5.

Steps:
1. Start a pv guest and attach console to the guest via xm console.
2. In another terminal, attach the console to the same guest via xm console.

On xen-3.0.3-132.el5, the both consoles get stuck, and print strange outputs.

On xen-3.0.3-135.el5, the second console can not be attached, and proper message show in second termimal:
# xm con 11
Another console has already been attached to guest
The first console still works fine.

So change this bug to VERIFIED.

Comment 6 errata-xmlrpc 2012-02-21 05:55:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0160.html