Bug 163528

Summary: /dev/tty won't open during blocking /dev/ttyS1 open
Product: Red Hat Enterprise Linux 4 Reporter: karl malbrain <malbrain>
Component: kernelAssignee: Jason Baron <jbaron>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: knoel, poelstra
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2005-514 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-05 13:43:12 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: 156322    

Description karl malbrain 2005-07-18 16:47:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
One of the Red Hat patches to 2.6.9 moves the tty_sem to encompass uart_open in tty_io.c.  After issuing a "blocking" uart_open (wait for carrier detect on the modem) ALL subsequent opens to any /dev/tty device are blocking on the tty_sem semaphore which is being held during the sleep cycle in uart_open that's waiting for carrier-detect from the modem.

This behaviour was introduced in the Red Hat "bits" patch.  The tty_sem semaphore cannot be held during the call to uart_open.

karl m

Version-Release number of selected component (if applicable):
kernel 2.6.9-11

How reproducible:
Always

Steps to Reproduce:
1. Issue a blocking open to /dev/ttyS1 with CLOCAL cleared and w/o O_NDELAY.
2. Start a shell prompt (this will open /dev/tty)
3. The open of /dev/tty will hang on tty_sem.
  

Actual Results:  Unable to start new sessions or open other major-device 5 inodes.

Expected Results:  The subsequent opens should succeed immediately, rather than block.

Additional info:

Whoever "cleaned up" tty_io.c in the kernel in "2.6.10-ac-selected-bits-patch" made an assumption that the underlying device driver open would not sleep with the semaphore held open.

Comment 1 Jason Baron 2005-07-22 22:05:14 UTC
This issue has been addressed in our laest builds of U2. Please see:
http://people.redhat.com/~jbaron/rhel4/ for a test kernel.

Comment 7 Red Hat Bugzilla 2005-10-05 13:43:12 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-514.html