[Pkg-shadow-devel] Bug#255323: marked as done (/dev/ttyxx: already in use)

Debian Bug Tracking System owner@bugs.debian.org
Thu, 23 Jun 2005 10:48:25 -0700


Your message dated Thu, 23 Jun 2005 18:27:15 +0200
with message-id <20050623162715.GB14024@mykerinos.kheops.frmug.org>
and subject line [Pkg-shadow-devel] Bug#255323: #255323: Why is this bug assigned to login?
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 20 Jun 2004 09:16:01 +0000
>From neo@horse21.net Sun Jun 20 02:16:01 2004
Return-path: <neo@horse21.net>
Received: from master.debian.org [146.82.138.7] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BbyQj-0006iR-00; Sun, 20 Jun 2004 02:16:01 -0700
Received: from (mx.horse21.net) [213.234.225.115] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BbyQi-0001W1-00; Sun, 20 Jun 2004 04:16:00 -0500
Received: from [80.71.36.57] (helo=[192.168.4.132])
	by mx.horse21.net with asmtp(neo at horse21.net)
	id 1BbyQh-0003Si-Hy for <bugs@debian.org>
	from <neo@horse21.net>; Sun, 20 Jun 2004 13:16:00 +0400
Message-ID: <40D55609.3030203@horse21.net>
Date: Sun, 20 Jun 2004 13:16:57 +0400
From: Dmitriy <neo@horse21.net>
User-Agent: Mozilla Thunderbird 0.6 (X11/20040605)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: bugs@debian.org
Subject: /dev/ttyxx: already in use
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Delivered-To: bugs@debian.org
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.5 required=4.0 tests=BAYES_10,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: login
Version: 1:4.0.3-28.4
Severity: Normal

As I remember this bug was closed and archived, but It remains.
So here you can find an explanation of this bug...

===============

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

===============
Statement about putting /dev/ttyX into /etc/inittab really really helps.

Please fix it.
Thanx.


---------------------------------------
Received: (at 255323-done) by bugs.debian.org; 23 Jun 2005 17:43:57 +0000
>From bubulle@kheops.frmug.org Thu Jun 23 10:43:57 2005
Return-path: <bubulle@kheops.frmug.org>
Received: from perrier.eu.org (kheops.perrier.eu.org) [81.56.227.253] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DlVk5-0000K9-00; Thu, 23 Jun 2005 10:43:57 -0700
Received: from localhost (localhost [127.0.0.1])
	by kheops.perrier.eu.org (Postfix) with ESMTP id 3D2714F975;
	Thu, 23 Jun 2005 19:43:26 +0200 (CEST)
Received: from kheops.perrier.eu.org ([127.0.0.1])
	by localhost (kheops [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 07504-01; Thu, 23 Jun 2005 19:43:23 +0200 (CEST)
Received: from mykerinos.kheops.frmug.org (mykerinos.kheops.frmug.org [192.168.1.3])
	by kheops.perrier.eu.org (Postfix) with ESMTP id 14F084F978;
	Thu, 23 Jun 2005 19:43:19 +0200 (CEST)
Received: by mykerinos.kheops.frmug.org (Postfix, from userid 7426)
	id E6B7123234; Thu, 23 Jun 2005 18:27:15 +0200 (CEST)
Date: Thu, 23 Jun 2005 18:27:15 +0200
From: Christian Perrier <bubulle@debian.org>
To: =?utf-8?B?0JTQvNC40YLRgNC40Lk=?= <neo@horse21.net>,
	255323-done@bugs.debian.org
Subject: Re: [Pkg-shadow-devel] Bug#255323: #255323: Why is this bug assigned to login?
Message-ID: <20050623162715.GB14024@mykerinos.kheops.frmug.org>
References: <20050620212022.GU10860@mykerinos.kheops.frmug.org> <42BA6106.6070303@horse21.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <42BA6106.6070303@horse21.net>
User-Agent: Mutt/1.5.9i
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at kheops.frmug.org
Content-Transfer-Encoding: quoted-printable
Delivered-To: 255323-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Quoting =D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9 (neo@horse21.net):
> Christian Perrier =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
>=20
> >Bug #255323 is assigned to login but talks about agetty ? Could you
> >explain me why you assigned this bug to the login package, while
> >agetty is part of the util-linux package?
> >
> >Neither me nor the hadow co-maintainers can really see why we have to
> >deal with this bug, actually...:)
> >=20
> >
> It does not matter already. The bug was fixed :)))
> Wish you luck!


OK. One less bug, then..:-)