From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: Chris Wedgwood <cw@f00f.org>
Cc: koke@amedias.org, linux-kernel@vger.kernel.org
Subject: Re: strange delays on console logouts (tty != 1)
Date: Sun, 2 May 2004 01:24:48 +0200 [thread overview]
Message-ID: <20040501232448.GA4707@vana.vc.cvut.cz> (raw)
In-Reply-To: <20040501214617.GA6446@taniwha.stupidest.org>
On Sat, May 01, 2004 at 02:46:17PM -0700, Chris Wedgwood wrote:
> On Fri, Apr 30, 2004 at 09:53:51PM +0200, Jorge Bernal wrote:
>
> I'm not sure who is to blame here, it looks like some tty's get into a
> state that either init or the getty doesn't like and don't want to
> come unstuck easily (stty sane > /dev/tty<foo> sometimes helps).
>
> I need to get an init working as pid != 1 with debugging so I can
> figure out what init thinks here. I've just been so short of time.
I do not think that it is init...
If I did analysis correct, problem is that:
(1) agetty (at least from util-linux 2.12 from current debian unstable)
opens /dev/console and calls VT_OPENQRY to find first unopened VT. I have
no idea why it does this, especially as it causes problems when more than
one agetty is started simultaneously. I cannot believe that there is
no better way how to detect whether tty is in use or not (as comment
in the agetty suggests). Even spawning fuser /dev/ttyX looks less racy
to me. This race between different agetty starting in parallel is reason
why some gettys are missing after bootup. As they all use 10 sec timeout it
takes some time until all my 24 gettys come up.
(2) tty hangup is scheduled for work_queue.
(3) when you have bad luck then scheduled hangup work runs AFTER newly
created agetty calls VT_OPENQRY, and you get an error that ttyX is already
in use...
When I just put /dev/ttyX instead of ttyX into /etc/inittab, problem
disappears (as then VT_OPENQRY code in agetty is not triggered) and
everything works as it should - except 'w', so I just disabled OPENQRY
code in agetty instead as final solution.
I think that we should concentrate on how is it possible that init can
spawn agetty and agetty can parse whole /var/run/utmp, open /dev/console
and issue VT_OPENQRY before work scheduled before init was even notified
is done. It looks to me like that someone schedules some job on the
workqueue although that job apparently deserves its own kernel thread
due to time it takes.
Best regards,
Petr Vandrovec
next prev parent reply other threads:[~2004-05-01 23:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-30 19:53 Jorge Bernal
2004-05-01 21:46 ` Chris Wedgwood
2004-05-01 23:24 ` Petr Vandrovec [this message]
2004-05-01 23:44 ` Chris Wedgwood
2004-05-02 0:36 ` Petr Vandrovec
2004-05-02 0:45 ` Chris Wedgwood
2004-05-02 13:54 ` Andries Brouwer
2004-05-02 1:03 ` Andrew Morton
2004-05-02 8:00 ` Russell King
2004-05-02 8:13 ` Andrew Morton
2004-05-02 8:17 ` Russell King
2004-05-02 9:37 ` Russell King
2004-05-02 10:17 ` Russell King
2004-05-02 12:01 ` Petr Vandrovec
2004-05-02 17:53 ` Chris Wedgwood
2004-05-02 18:01 ` Russell King
2004-05-02 18:04 ` Russell King
2004-05-02 18:19 ` Chris Wedgwood
2004-05-01 22:20 ` Chris Wedgwood
2004-05-02 0:26 ` Jorge Bernal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040501232448.GA4707@vana.vc.cvut.cz \
--to=vandrove@vc.cvut.cz \
--cc=cw@f00f.org \
--cc=koke@amedias.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®