Bug 500750 - Console lock-up in race for tty1 on runlevel 5 to 3 transition
Console lock-up in race for tty1 on runlevel 5 to 3 transition
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-13 18:35 EDT by Allen Kistler
Modified: 2014-03-16 23:18 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-28 08:32:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/var/log/messages on X exit (52 bytes, text/plain)
2009-05-13 18:35 EDT, Allen Kistler
no flags Details

  None (edit)
Description Allen Kistler 2009-05-13 18:35:37 EDT
Created attachment 343879 [details]
/var/log/messages on X exit

Description of problem:
"telinit 3" from inside gnome-terminal kills the console, leaving the power button and ACPI the only option to get anywhere.  Basically the screen blanks like it's going into text mode, but it stays blank, and A-C-Fn (or A-Fn) doesn't switch to tty[2-6].  In /var/log/messages, mingetty on tty1 complains about invalid characters, dies, and respawns.

Version-Release number of selected component (if applicable):
initscripts-8.95-1

How reproducible:
Always

Steps to Reproduce:
1. Start machine at runlevel 5
2. Login and open gnome-terminal
3. Run "telinit 3" as root in gnome-terminal

Actual results:
Console becomes unresponsive after appearing to switch to text mode.

Expected results:
Login prompt appears and allows login.

Additional info:

I'm setting the component as initscripts because that seems to me the only reasonable place to insert anything to avoid the race.  (e.g., /etc/event.d/tty1)  I suppose it's possible to rewrite mingetty to test if something owns the terminal, sleep, and exit, but I don't see that happening.  It's mingetty, not yourhopesanddreamsgetty.

Excerpted from Bug 499272 ...

===
From  Bill Nottingham 2009-05-13 16:30:26 EDT
---
In fact, I suspect that case is:

- runlevel 5 is exited
- prefdm is killed
- gdm starts shutting down the sesssion, X.org, etc.
- runlevel 3 starts
- runlevel 3 setup finishes
- mingetty is started on tty1
- X.org finishes exiting

Which is a race that could have happened irrespective of whatever gdm is doing
at session close, and probably could have happened/can happen in F-10.

===
From  Ray Strode 2009-05-13 16:39:31 EDT
---
so my guess what's happening for you is:

init 3 causes upstart to send SIGTERM gdm
gdm sends SIGTERM to gdm-simple-slave
gdm-simple-slave sends SIGTERM to Xorg

and somewhere along the line we aren't doing a waitpid() so then upstart starts
a getty on the vt X is using and all hell breaks loose.
---
Comment 1 Allen Kistler 2009-05-13 20:51:08 EDT
If I stick the following in /etc/event.d/tty1, the bug seems to go away.

pre-start script
        # wait if something (i.e., X) already owns tty1
        while [ `/bin/ps -t tty1 2> /dev/null | /usr/bin/wc -l` -gt 1 ] ; do
          /bin/sleep 0.1
        done
end script
Comment 2 Allen Kistler 2009-05-28 02:40:34 EDT
A slightly more elegant version of the script in Comment 1:

pre-start script
        # wait if something (i.e., X) already owns tty1
        while ( /bin/ps -t tty1 &> /dev/null ) ; do
          /bin/sleep 0.1
        done
end script
Comment 3 Bug Zapper 2009-06-09 11:47:26 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Bug Zapper 2010-04-27 10:19:23 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Bug Zapper 2010-06-28 08:32:18 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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