Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 163528 - /dev/tty won't open during blocking /dev/ttyS1 open
Summary: /dev/tty won't open during blocking /dev/ttyS1 open
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: i386
OS: Linux
Target Milestone: ---
: ---
Assignee: Jason Baron
QA Contact: Brian Brock
Depends On:
Blocks: 156322
TreeView+ depends on / blocked
Reported: 2005-07-18 16:47 UTC by karl malbrain
Modified: 2013-03-06 05:58 UTC (History)
2 users (show)

Fixed In Version: RHSA-2005-514
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-10-05 13:43:12 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:514 qe-ready SHIPPED_LIVE Important: Updated kernel packages available for Red Hat Enterprise Linux 4 Update 2 2005-10-05 04:00:00 UTC

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:

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: 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.

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