[5014] in testers
Got it! (Re: console Sun logins)
daemon@ATHENA.MIT.EDU (Mitchell E Berger)
Tue Jul 17 04:07:44 2001
Message-Id: <200107170807.EAA01989@byte-me.mit.edu>
To: Mitchell E Berger <mitchb@MIT.EDU>
cc: testers@MIT.EDU
In-Reply-To: Your message of "Sun, 15 Jul 2001 07:01:18 EDT."
<200107151101.HAA20924@byte-me.mit.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Tue, 17 Jul 2001 04:07:41 -0400
From: Mitchell E Berger <mitchb@MIT.EDU>
> I don't intend to debug inside panel and my guess is it's
> not worth it to and we don't have time. However, it's a bug, it's annoying,
> and now we have all the details someone that wants to investigate the problem
> further should need.
Or so I thought... I noticed last night that undocumented-feature wasn't
exhibiting the bug and theorized that it was actually a race condition.
Rebuilding dm with a 20 second sleep at the beginning of main() caused the bug
to stop existing, so it is a race condition (isn't everything with dm?).
Working on spy-hunter, I noticed that reactivate was running much longer
during Gnome logouts than Dash logouts (I noticed this while using AUI too,
but didn't make much of it then). Hacking lots of debug messages into
reactivate revealed that cleanup was taking a while and punting stuff that
isn't usually there. Doing a ps -ef at the beginning of reactivate showed
that I had the following running at reactivate time:
mitchb 4898 4897 0 01:11:58 ? 0:00 panel-wrapper
mitchb 4897 1 0 01:11:58 ? 0:00 /bin/athena/tcsh -f
/usr/athena/lib/init/xsession
Indeed, with the non-sleepy dm, killing panel-wrapper before typing 'logout'
prevents the buggy Ctrl-P behavior. Additionally, as expected from reading
the panel-wrapper code, clicking panel's exit button rather than typing
'logout' prevents the bug. Empirical evidence indicates that the tcsh running
my xsession doesn't survive long enough for cleanup to hit it.
At this point, now that we understand the problem, I think we should fix it.
I'm not certain what the best way to do this is. Here are the possibilities
I've come up with:
1) Have dm run reactivate before it goes about its business opening the
console, ttys, etc.
2) Modify the logout shell alias to kill panel-wrapper if it's running (it's
only needed to confirm button-based logouts, and if you type 'logout', there's
no going back anyway).
3) Modify the logout shell alias to kill panel, so wrapper will ask for
confirmation and die appropriately.
4) Have dm run cleanup before it goes about its business opening the console,
ttys, etc.
5) Something more clever that hasn't occurred to me.
I think #1 will be duplicating work because if we were to remove running
reactivate from xlogin, it wouldn't get run after a cancelled login that got
tickets and prompted the user about a homedir, but the user decided not to
proceed (I could be completely wrong here - does dm get respawned in those
cases?). I think #3 might not be a great idea because it would remove the
ability to quickly logout through a terminal window without further
interaction. I favor option #2, possibly through use of a pid file or
environment variable similar to $XSESSION.
Oh, and by the way, I have a sneaking suspicion that fixing this correctly
(which means not letting reactivate do the work for us - i.e. not #1) may
result in the issue of reactivate sending wslogger "Non-empty session record"
being fixed as well. Let me know if that's an unfounded hope.
Mitch
P.S. Did anything I didn't catch change in the last packs build? vim is
lately exiting with the prompt frequently not at the beginning of the line, at
least on Sparcs. This isn't a huge issue, though.