This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 163528 - /dev/tty won't open during blocking /dev/ttyS1 open
/dev/tty won't open during blocking /dev/ttyS1 open
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Baron
Brian Brock
:
Depends On:
Blocks: 156322
  Show dependency treegraph
 
Reported: 2005-07-18 12:47 EDT by karl malbrain
Modified: 2013-03-06 00:58 EST (History)
2 users (show)

See Also:
Fixed In Version: RHSA-2005-514
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-05 09:43:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description karl malbrain 2005-07-18 12:47:34 EDT
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 18:05:14 EDT
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 09:43:12 EDT
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

Note You need to log in before you can comment on or make changes to this bug.