[Bug 183729] Re: compat: utmp not cleared on tty logout
Launchpad has imported 30 comments from the remote bug at https://bugzilla.redhat.com/show_bug.cgi?id=470004. If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. On 2008-11-05T07:49:18+00:00 Michal wrote: Description of problem: If user switches to terminal (Ctrl+Alt+Fx) use it and then exits, this terminal stays listed in sessions to switch to Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1.switch to terminal (Ctrl+Alt+F2) 2.enter username and password 3.logout 4.kde->switch user Actual results: "user: TTY login (vt2)" is listed even if session has been already terminated Expected results: only active sessions are listed Additional info: if you repeat above steps, you can achieve "user: TTY login (vt2)" to be listed twice (three times, four...) Reply at: https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/183729/comments/9 On 2008-11-05T13:55:13+00:00 Rex wrote: Confirmed. Interesting, I wonder by what method kde uses to determine users logged into tty's... either that's broken or console logins are. "last" gives interesting results for me: rdieter1 tty2 ... Wed nov 5 08:52 gone - no logout except, I *did* logout. Reply at: https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/183729/comments/10 On 2008-11-07T17:45:28+00:00 Rex wrote: OK, looks like tty logins never finish logging out. For me, ALT-F2 goto console, login... do stuff... logout... stuck, no login: prompt Now, who to blame for this? :) Reply at: https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/183729/comments/11 On 2008-11-07T17:46:45+00:00 Rex wrote: bouncing over to util-linux-ng (owner of login), in hopes of some insight. Reply at: https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/183729/comments/12 On 2008-11-25T17:50:35+00:00 Rex wrote: Interesting, I can't reproduce anymore, how about you? Reply at: https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/183729/comments/13 On 2008-11-26T04:48:14+00:00 Bug wrote: This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle. Changing version to '10'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Reply at: https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/183729/comments/14 On 2008-11-26T09:29:26+00:00 Michal wrote: I'm in work now, where I have kde 4.1.3 packages from updates-testing and it doesn't work for me. Still the "same" problem. I think there is (maybe) one difference: If I try to switch user via "start"->Switch user and select tty console, it starts new session with kdm as if I select "start new session". If I try to switch via screen saver lock or via kdm, it "works" as usual. I don't know if this is new change or if it was working this way already. I can test also on system updated without updates-testing today later if you want. Reply at: https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/183729/comments/15 On 2009-01-30T14:57:39+00:00 Rex wrote: I take back comment #4, console logins are still not registerring logout, 'last' still reports only 'gone - no logout' Reply at: https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/183729/comments/16 On 2009-03-19T13:19:46+00:00 Karel wrote: It seems that /sbin/init from upstart does not care about utmp at all. (Note that mingetty(8) and login(1) can create a new utmp entry on systems where init(8) is broken, but init(8) has to set the entry to DEAD_PROCESS state when user logout and login process has exited). See utmp man page: The first entries ever created result from init(8) processing inittab(5). Before an entry is processed, though, init(8) cleans up utmp by setting ut_type to DEAD_PROCESS, clearing ut_user, ut_host, and ut_time with null bytes for each record which ut_type is not DEAD_PROCESS or RUN_LVL and where no process with PID ut_pid exists. If no empty record with the needed ut_id can be found, init(8) creates a new one. It sets ut_id from the inittab, ut_pid and ut_time to the current values, and ut_type to INIT_PROCESS. mingetty(8) (or agetty(8)) locates the
[Bug 183729] Re: compat: utmp not cleared on tty logout
Are you sure this is fixed? I'm seeing this exact bug in Trusty. Logging out of a TTY doesn't lower the number of users in uptime, w, etc. Now, Vivid switched to systemd, so if the bug is really in upstart, it may not be worth wasting time here. But, Trusty is an LTS... so, I don't know. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/183729 Title: compat: utmp not cleared on tty logout To manage notifications about this bug go to: https://bugs.launchpad.net/upstart/+bug/183729/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
> This fix will be ported to 0.6 series? No, sorry. If this is a blocking bug for you, I recommend upgrading to 12.04 LTS. -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in Ubuntu. https://bugs.launchpad.net/bugs/183729 Title: compat: utmp not cleared on tty logout To manage notifications about this bug go to: https://bugs.launchpad.net/upstart/+bug/183729/+subscriptions -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
This fix will be ported to 0.6 series? On my company, we have more then 50 servers using Ubuntu 10.04 LTS that are affect by this bug. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/183729 Title: compat: utmp not cleared on tty logout To manage notifications about this bug go to: https://bugs.launchpad.net/upstart/+bug/183729/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
** Changed in: upstart (Ubuntu) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in Ubuntu. https://bugs.launchpad.net/bugs/183729 Title: compat: utmp not cleared on tty logout To manage notifications about this bug go to: https://bugs.launchpad.net/upstart/+bug/183729/+subscriptions -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
Since this both has patch(es) and instructions to replicate the error/problem, I will mark this as Confirmed in upstart(Ubuntu). Thank you! ** Changed in: upstart (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/183729 Title: compat: utmp not cleared on tty logout To manage notifications about this bug go to: https://bugs.launchpad.net/upstart/+bug/183729/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
** Tags added: patch -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in ubuntu. https://bugs.launchpad.net/bugs/183729 Title: compat: utmp not cleared on tty logout -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
** Changed in: upstart (Ubuntu) Status: Invalid => New ** Changed in: upstart (Ubuntu) Importance: Low => Undecided -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in ubuntu. https://bugs.launchpad.net/bugs/183729 Title: compat: utmp not cleared on tty logout -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
** Changed in: upstart Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in ubuntu. https://bugs.launchpad.net/bugs/183729 Title: compat: utmp not cleared on tty logout -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
** Changed in: upstart Milestone: None => 1.0 -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in ubuntu. https://bugs.launchpad.net/bugs/183729 Title: compat: utmp not cleared on tty logout -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
** Changed in: upstart Status: Triaged => Fix Committed ** Changed in: upstart Assignee: (unassigned) => Petr Lautrbach (plautrba) ** Changed in: upstart Milestone: None => 0.6.8 -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in ubuntu. https://bugs.launchpad.net/bugs/183729 Title: compat: utmp not cleared on tty logout -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
Found the cause of the stray login that was shown on startup, it was unrelated to Petr's patch or upstart itself in any way. So please ignore the first part of comment #17. -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
With Petr's patch in comment #15: On boot issue still displays one user logged in. This is cleared by the first users logout. Could be a leftover from the previous shutdown/reboot that got not cleared up the right way, but i am only guessing here... I would love to see proper utmp and wtmp record handling in upstart would get some love in upstart soon. -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
Petr's patch in comment #15 fixes the problem for me. agetty displays logged on users as expected in issue outputs. -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
If we assume that *getty takes care about setting INIT_PROCESS/LOGIN_PROCESS itself, we need just set DEAD_PROCESS for dead processes with pid in utmp table and log it into wtmp. Init goes through the utmp table, tries to find entry with dead process pid and sets it to DEAD_PROCESS. There is no need to create/set up "utmp" stanza. Test covers utmp table with 2 entries and with 2 situation - process is in LOGIN_PROCESS or USER_PROCESS. ** Patch added: "set DEAD_PROCESS for died proccess with pid in utmp table" http://launchpadlibrarian.net/45013300/upstart-utmp-set-DEAD_PROCESS.patch -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
For sanity's sake, I'm closing the Ubuntu tasks for upstream Upstart bugs. I've experimented with having both, but it is just making bugs hard to find now. Will use the policy whereby bugs on the Ubuntu package exist in the Ubuntu packaging or patches only, any bugs in the Upstart code are Upstream bugs. ** Changed in: upstart (Ubuntu) Status: Triaged => Invalid -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
** Changed in: kdebase-workspace (Ubuntu) Status: New => Invalid -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
** Also affects: kdebase-workspace (Ubuntu) Importance: Undecided Status: New -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to kdebase-workspace in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
I can appreciate that this is tasked to be fixed, but I feel that it is important enough that the issue should have been addressed a year ago. Do not take this as reproach. I understand that most of the software in the open source community is privately developed by the individuals in the community. I just would like it fixed. -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
Hi Petr, I received the assignment, thanks very much! Sorry, I haven't dropped this; here's a quick review of the code, and thoughts on merging it with 0.6 0.6.x have a util/utmp.c already for reading and writing runlevel and reboot records, it feels like these process records should go in there as well - but then that'd mean having utmp.c shared between init/ and util/ and there's no directory for that yet (it's not appropriate to go into libnih) Why the __GLIBC__ check? Unless I'm mistaken, the gettimeofday() and assign would work in either case. In general I've tried to avoid #ifdef in the Upstart code. Should use the utmpx.h functions rather than utmp.h? Thoughts on the utmp stanza, firstly we should check the length of this at parse time rather than silently truncating. Also given instance jobs we probably want to expand environment variables here so you can do: utmp $ID For things like a single getty job, that wouldn't be sufficient since you'd want the ids to match the getty ids. That'd mean supporting shell-style replacements in expansion (which we don't do yet) utmp ${TTY#tty} Should init not always set DEAD_PROCESS for any pid it's supervised, whether or not it created the utmp entry in the first place? Problem there of course is that we don't know the ut_id of them I guess, so we'd have to iterate the entire utmp file every time? paths.h defines a WTMP macro, this shouldn't be necessary since _PATH_WTMP is already defined in utmp.h (Arguably a few of those things in paths.h should go away and be replaced by things from like _PATH_CONSOLE, _PATH_DEVNULL, _PATH_BSHELL, etc.) Missing tests, should check for a utmp record being written, failing to write, etc. (possible by calling utmpname() in the test) - it should be ok for wtmp to fail at any time, so the test is safe. Should check for the entries being cleared too. One thing that the manpage isn't quite clear about is what happens when you create an INIT_PROCESS entry but search for a USER_PROCESS entry to delete, as you've done there - I think this will still find it, but a test would help us be sure. -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
** Branch linked: lp:~plautrba/upstart/utmp-stanza -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
** Bug watch added: Red Hat Bugzilla #470004 https://bugzilla.redhat.com/show_bug.cgi?id=470004 ** Also affects: upstart (Fedora) via https://bugzilla.redhat.com/show_bug.cgi?id=470004 Importance: Unknown Status: Unknown -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
** Changed in: upstart (Fedora) Status: Unknown => In Progress -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
I've just sent copyright assignment in accordance with ContributingCode -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 183729] Re: compat: utmp not cleared on tty logout
Petr: that's pretty much how I was thinking it should be solved. Would you be willing to assign copyright for that to Canonical so I can apply it to the source? ** Summary changed: - utmp not cleared on tty logout + compat: utmp not cleared on tty logout ** Changed in: upstart Milestone: 0.5-later => None -- compat: utmp not cleared on tty logout https://bugs.launchpad.net/bugs/183729 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs