Activity log for bug #544139

Date Who What changed Old value New value Message
2010-03-22 12:55:21 Chris Coulson bug added bug
2010-03-22 12:55:42 Chris Coulson consolekit (Ubuntu): importance Undecided High
2010-03-22 12:55:42 Chris Coulson consolekit (Ubuntu): status New Triaged
2010-03-22 12:58:20 Chris Coulson description Binary package hint: consolekit A few times over the last couple of days, I've noticed some weird consolekit issues where it doesn't correctly determine which VT is active, causing a lot of things to break (eg, disk mounting, rebooting, suspending etc). The issue is solved by rebooting. When it fails, I get a lot of messages in my daemon.log when consolekit starts: WARNING: Error waiting for native console 5 activation: Invalid argument This occurs because the following call fails with EINVAL: ioctl (console_fd, VT_WAITACTIVE, num); I discussed this with Scott on #ubuntu-desktop, and here is the log: <chrisccoulson> Keybuk - i mentioned a consolekit issue last week, and your name was mentioned there <chrisccoulson> that might have been what you remember <Keybuk> can you remember more about what you mentioned? <chrisccoulson> Keybuk - a couple of times when I booted last week, consolekit was unable to determine what the active VT was <chrisccoulson> and it was throwing out errors like this: <chrisccoulson> WARNING: Error waiting for native console 5 activation: Invalid argument <Keybuk> right <Keybuk> but why is consolekit using that ioctl? <Keybuk> that's only used when you switch VT <chrisccoulson> Keybuk - it spawns a thread for each VT, which waits for it to become active <chrisccoulson> so it can track where the active one is <Keybuk> ok <Keybuk> it'll fail with -EINVAL for a short period during boot <Keybuk> does it correctly back-off from that, and restart the thread again later? <Keybuk> (if it goes into an infinite loop, that's not good either) <chrisccoulson> Keybuk - no, that's probably the issue really. once it has failed, it just gives up <chrisccoulson> so, we probably need to fix consolekit then? <Keybuk> yeah <Keybuk> we caused X to have the same bug <chrisccoulson> ah, ok. that makes sense. and that explains why i can't recreate it all the time <Keybuk> you get -EINVAL from VT_WAITACTIVE in a very specific condition <Keybuk> the current foreground VT is in KD_GRAPHICS mode, but also VT_AUTO <Keybuk> ie. it's been left with painted graphics ... but no process running on it <Keybuk> since it's in graphics mode, the kernel prohibits VT switches <Keybuk> can you guess when that condition is true? <chrisccoulson> do you know how long it's in that condition for? <Keybuk> chrisccoulson: however long the X server takes to start ;-) <Keybuk> couple of seconds usually <chrisccoulson> oh, right. that seems obvious now :) <chrisccoulson> Keybuk - so the window is quite large then (and I think consolekit is activated after GDM starts isn't it?) <chrisccoulson> i think gdm is the first thing to use it anyway <Keybuk> chrisccoulson: gdm activates it <chrisccoulson> yeah, i thought so <chrisccoulson> thanks <Keybuk> which means it's activated "before X starts or while X is starting" <Keybuk> ie. exactly in that window <Keybuk> chrisccoulson: so, on the VT_WAITACTIVE+VT_AUTO thing ... you could kinda argue it's a kernel bug <Keybuk> because the kernel bug should deal with that case on its own <Keybuk> but the kernel guys will tell you that the whole VT_* stuff is a mess, and they'd rather leave it alone <chrisccoulson> yeah, it might be easier to work around it in consolekit for now <Keybuk> exactly Binary package hint: consolekit A few times over the last couple of days, I've noticed some weird consolekit issues where it doesn't correctly determine which VT is active, causing a lot of things to break (eg, disk mounting, rebooting, suspending etc). The issue is solved by rebooting. When it fails, I get a lot of messages in my daemon.log when consolekit starts: WARNING: Error waiting for native console 5 activation: Invalid argument This occurs because the following call fails with EINVAL: ioctl (console_fd, VT_WAITACTIVE, num); I discussed this with Scott on #ubuntu-desktop. To summarize, there is a window between GDM starting and the X server coming up where the ioctl that consolekit does on the VT's will fail. Unfortunately, consolekit starts around the time of this window. Here is the log: <chrisccoulson> Keybuk - i mentioned a consolekit issue last week, and your name was mentioned there <chrisccoulson> that might have been what you remember <Keybuk> can you remember more about what you mentioned? <chrisccoulson> Keybuk - a couple of times when I booted last week, consolekit was unable to determine what the active VT was <chrisccoulson> and it was throwing out errors like this: <chrisccoulson> WARNING: Error waiting for native console 5 activation: Invalid argument <Keybuk> right <Keybuk> but why is consolekit using that ioctl? <Keybuk> that's only used when you switch VT <chrisccoulson> Keybuk - it spawns a thread for each VT, which waits for it to become active <chrisccoulson> so it can track where the active one is <Keybuk> ok <Keybuk> it'll fail with -EINVAL for a short period during boot <Keybuk> does it correctly back-off from that, and restart the thread again later? <Keybuk> (if it goes into an infinite loop, that's not good either) <chrisccoulson> Keybuk - no, that's probably the issue really. once it has failed, it just gives up <chrisccoulson> so, we probably need to fix consolekit then? <Keybuk> yeah <Keybuk> we caused X to have the same bug <chrisccoulson> ah, ok. that makes sense. and that explains why i can't recreate it all the time <Keybuk> you get -EINVAL from VT_WAITACTIVE in a very specific condition <Keybuk> the current foreground VT is in KD_GRAPHICS mode, but also VT_AUTO <Keybuk> ie. it's been left with painted graphics ... but no process running on it <Keybuk> since it's in graphics mode, the kernel prohibits VT switches <Keybuk> can you guess when that condition is true? <chrisccoulson> do you know how long it's in that condition for? <Keybuk> chrisccoulson: however long the X server takes to start ;-) <Keybuk> couple of seconds usually <chrisccoulson> oh, right. that seems obvious now :) <chrisccoulson> Keybuk - so the window is quite large then (and I think consolekit is activated after GDM starts isn't it?) <chrisccoulson> i think gdm is the first thing to use it anyway <Keybuk> chrisccoulson: gdm activates it <chrisccoulson> yeah, i thought so <chrisccoulson> thanks <Keybuk> which means it's activated "before X starts or while X is starting" <Keybuk> ie. exactly in that window <Keybuk> chrisccoulson: so, on the VT_WAITACTIVE+VT_AUTO thing ... you could kinda argue it's a kernel bug <Keybuk> because the kernel bug should deal with that case on its own <Keybuk> but the kernel guys will tell you that the whole VT_* stuff is a mess, and they'd rather leave it alone <chrisccoulson> yeah, it might be easier to work around it in consolekit for now <Keybuk> exactly
2010-03-24 16:48:20 Martin Pitt nominated for series Ubuntu Lucid
2010-03-24 16:48:20 Martin Pitt bug task added consolekit (Ubuntu Lucid)
2010-07-10 03:34:18 Damien bug added subscriber Damien
2010-07-10 04:21:31 Damien bug added subscriber DD
2010-07-10 05:47:01 Damien nominated for series Ubuntu Maverick
2010-07-11 00:49:11 John Edwards bug added subscriber John Edwards
2010-07-12 09:23:50 Damien removed subscriber Damien
2010-07-12 09:23:51 Damien removed subscriber Damien
2010-07-12 09:50:49 Damien bug added subscriber Damien
2010-07-12 17:51:24 Miguel Rodríguez bug added subscriber Miguel Rodríguez
2010-07-16 05:31:55 Tony McConnell bug added subscriber Tony McConnell
2010-07-20 02:33:40 Damien bug task added gdm
2010-08-01 10:25:54 rkk102 removed subscriber rkk102
2010-08-05 15:53:07 OC bug added subscriber OC
2010-08-06 11:09:46 OC attachment added syslog_boot.tar.gz http://launchpadlibrarian.net/53161187/syslog_boot.tar.gz
2010-08-07 09:59:10 Marcus Carlson bug added subscriber Marcus Carlson
2010-08-07 10:08:02 Julian Wiedmann removed subscriber Julian Wiedmann
2010-08-16 08:33:44 skorqa attachment added 20100816_fail_01.tar.gz https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1492941/+files/20100816_fail_01.tar.gz
2010-08-16 08:34:26 skorqa attachment added 20100816_fail_02.tar.gz https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1492942/+files/20100816_fail_02.tar.gz
2010-08-16 08:35:20 skorqa attachment added 20100816_ok_08.tar.gz https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1492943/+files/20100816_ok_08.tar.gz
2010-08-16 08:36:13 skorqa attachment added 20100816_ok_09.tar.gz https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1492944/+files/20100816_ok_09.tar.gz
2010-08-16 08:37:09 skorqa attachment added 20100816_ok_11_upstart-proposed.tar.gz https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1492947/+files/20100816_ok_11_upstart-proposed.tar.gz
2010-08-17 06:34:52 skorqa attachment added 20100817_fail_13_upstart-proposed.tar.gz https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1494691/+files/20100817_fail_13_upstart-proposed.tar.gz
2010-08-18 10:39:18 Chris Coulson consolekit (Ubuntu Lucid): assignee Chris Coulson (chrisccoulson)
2010-08-18 10:40:04 Chris Coulson consolekit (Ubuntu Lucid): milestone ubuntu-10.04.2
2010-08-19 19:57:13 Robbie Williamson bug task added consolekit (Ubuntu Maverick)
2010-08-20 22:07:01 Colin Watson attachment added consolekit_0.4.1-4ubuntu1~ppa1.debdiff https://bugs.edge.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1505887/+files/consolekit_0.4.1-4ubuntu1%7Eppa1.debdiff
2010-08-20 22:42:39 Colin Watson bug watch added https://bugzilla.gnome.org/show_bug.cgi?id=593996
2010-08-21 16:35:13 Brian Murray bug added subscriber Ubuntu Review Team
2010-08-21 16:35:19 Brian Murray tags patch
2010-08-23 01:56:16 Damien attachment added lsof-broken.txt https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1511936/+files/lsof-broken.txt
2010-08-23 08:40:43 DarkM removed subscriber DarkM
2010-08-24 02:23:39 Damien attachment added cc.log https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1514607/+files/cc.log
2010-08-25 09:19:56 Henrik Persson bug added subscriber Henrik Persson
2010-08-25 16:26:45 Lennie bug added subscriber Lennie
2010-08-26 08:54:28 Damien attachment added good-log-120.txt https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1519982/+files/good-log-120.txt
2010-08-26 08:55:25 Damien attachment added last-good-full.txt https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1519983/+files/last-good-full.txt
2010-08-26 16:26:52 Felix Krohn bug added subscriber Felix Krohn
2010-08-27 10:33:50 Felix Krohn removed subscriber Felix Krohn
2010-08-31 09:10:21 Damien consolekit (Ubuntu Lucid): status Triaged In Progress
2010-09-01 09:58:10 Damien attachment added ck_vt_delay.png https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1534027/+files/ck_vt_delay.png
2010-09-09 06:53:57 Joergen Andreasen bug added subscriber Joergen Andreasen
2010-09-30 13:52:26 Colin Watson consolekit (Ubuntu Maverick): assignee Colin Watson (cjwatson)
2010-09-30 13:52:30 Colin Watson consolekit (Ubuntu Maverick): milestone ubuntu-10.10
2010-09-30 13:52:33 Colin Watson consolekit (Ubuntu Lucid): assignee Chris Coulson (chrisccoulson) Colin Watson (cjwatson)
2010-09-30 13:52:39 Colin Watson consolekit (Ubuntu Maverick): status Triaged In Progress
2010-10-01 06:58:03 Launchpad Janitor consolekit (Ubuntu Maverick): status In Progress Fix Released
2010-10-05 16:20:32 Dave Gilbert bug added subscriber Dave Gilbert
2010-11-10 12:25:22 Colin Watson attachment added lucid-proposed patch https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1728928/+files/consolekit_0.4.1-3ubuntu2.debdiff
2010-11-10 12:26:21 Colin Watson description Binary package hint: consolekit A few times over the last couple of days, I've noticed some weird consolekit issues where it doesn't correctly determine which VT is active, causing a lot of things to break (eg, disk mounting, rebooting, suspending etc). The issue is solved by rebooting. When it fails, I get a lot of messages in my daemon.log when consolekit starts: WARNING: Error waiting for native console 5 activation: Invalid argument This occurs because the following call fails with EINVAL: ioctl (console_fd, VT_WAITACTIVE, num); I discussed this with Scott on #ubuntu-desktop. To summarize, there is a window between GDM starting and the X server coming up where the ioctl that consolekit does on the VT's will fail. Unfortunately, consolekit starts around the time of this window. Here is the log: <chrisccoulson> Keybuk - i mentioned a consolekit issue last week, and your name was mentioned there <chrisccoulson> that might have been what you remember <Keybuk> can you remember more about what you mentioned? <chrisccoulson> Keybuk - a couple of times when I booted last week, consolekit was unable to determine what the active VT was <chrisccoulson> and it was throwing out errors like this: <chrisccoulson> WARNING: Error waiting for native console 5 activation: Invalid argument <Keybuk> right <Keybuk> but why is consolekit using that ioctl? <Keybuk> that's only used when you switch VT <chrisccoulson> Keybuk - it spawns a thread for each VT, which waits for it to become active <chrisccoulson> so it can track where the active one is <Keybuk> ok <Keybuk> it'll fail with -EINVAL for a short period during boot <Keybuk> does it correctly back-off from that, and restart the thread again later? <Keybuk> (if it goes into an infinite loop, that's not good either) <chrisccoulson> Keybuk - no, that's probably the issue really. once it has failed, it just gives up <chrisccoulson> so, we probably need to fix consolekit then? <Keybuk> yeah <Keybuk> we caused X to have the same bug <chrisccoulson> ah, ok. that makes sense. and that explains why i can't recreate it all the time <Keybuk> you get -EINVAL from VT_WAITACTIVE in a very specific condition <Keybuk> the current foreground VT is in KD_GRAPHICS mode, but also VT_AUTO <Keybuk> ie. it's been left with painted graphics ... but no process running on it <Keybuk> since it's in graphics mode, the kernel prohibits VT switches <Keybuk> can you guess when that condition is true? <chrisccoulson> do you know how long it's in that condition for? <Keybuk> chrisccoulson: however long the X server takes to start ;-) <Keybuk> couple of seconds usually <chrisccoulson> oh, right. that seems obvious now :) <chrisccoulson> Keybuk - so the window is quite large then (and I think consolekit is activated after GDM starts isn't it?) <chrisccoulson> i think gdm is the first thing to use it anyway <Keybuk> chrisccoulson: gdm activates it <chrisccoulson> yeah, i thought so <chrisccoulson> thanks <Keybuk> which means it's activated "before X starts or while X is starting" <Keybuk> ie. exactly in that window <Keybuk> chrisccoulson: so, on the VT_WAITACTIVE+VT_AUTO thing ... you could kinda argue it's a kernel bug <Keybuk> because the kernel bug should deal with that case on its own <Keybuk> but the kernel guys will tell you that the whole VT_* stuff is a mess, and they'd rather leave it alone <chrisccoulson> yeah, it might be easier to work around it in consolekit for now <Keybuk> exactly Impact: ConsoleKit sometimes fails to determine which VT is active, breaking many parts of the system. For example, any dialog that requires PolicyKit authentication cannot be unlocked. Development branch: Fixed in https://launchpad.net/ubuntu/+source/consolekit/0.4.1-4ubuntu1 by retrying console opens if they return EIO. Patch: https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/+attachment/1728928/+files/consolekit_0.4.1-3ubuntu2.debdiff TEST CASE: Unfortunately, this bug is not uniformly reproducible, and may take many reboot attempts or even not be reproducible at all on any given system. If it is reproducible, then you can either try unlocking an administration dialog such as System -> Administration -> Time and Date (which will fail with a broken version), or (quicker) check for the string "Error waiting for native console" in /var/log/daemon.log. A successful fix will always permit a user with administrative privileges to unlock administrative dialogs. Regression potential: When it breaks (not necessarily every time), consolekit is effectively completely broken. The test case should be sufficient to ensure that it is working properly. Original description follows (note that the discussion about why EINVAL was being returned does not correspond to the end result of investigating this bug, but is preserved here for the record): Binary package hint: consolekit A few times over the last couple of days, I've noticed some weird consolekit issues where it doesn't correctly determine which VT is active, causing a lot of things to break (eg, disk mounting, rebooting, suspending etc). The issue is solved by rebooting. When it fails, I get a lot of messages in my daemon.log when consolekit starts: WARNING: Error waiting for native console 5 activation: Invalid argument This occurs because the following call fails with EINVAL: ioctl (console_fd, VT_WAITACTIVE, num); I discussed this with Scott on #ubuntu-desktop. To summarize, there is a window between GDM starting and the X server coming up where the ioctl that consolekit does on the VT's will fail. Unfortunately, consolekit starts around the time of this window. Here is the log: <chrisccoulson> Keybuk - i mentioned a consolekit issue last week, and your name was mentioned there <chrisccoulson> that might have been what you remember <Keybuk> can you remember more about what you mentioned? <chrisccoulson> Keybuk - a couple of times when I booted last week, consolekit was unable to determine what the active VT was <chrisccoulson> and it was throwing out errors like this: <chrisccoulson> WARNING: Error waiting for native console 5 activation: Invalid argument <Keybuk> right <Keybuk> but why is consolekit using that ioctl? <Keybuk> that's only used when you switch VT <chrisccoulson> Keybuk - it spawns a thread for each VT, which waits for it to become active <chrisccoulson> so it can track where the active one is <Keybuk> ok <Keybuk> it'll fail with -EINVAL for a short period during boot <Keybuk> does it correctly back-off from that, and restart the thread again later? <Keybuk> (if it goes into an infinite loop, that's not good either) <chrisccoulson> Keybuk - no, that's probably the issue really. once it has failed, it just gives up <chrisccoulson> so, we probably need to fix consolekit then? <Keybuk> yeah <Keybuk> we caused X to have the same bug <chrisccoulson> ah, ok. that makes sense. and that explains why i can't recreate it all the time <Keybuk> you get -EINVAL from VT_WAITACTIVE in a very specific condition <Keybuk> the current foreground VT is in KD_GRAPHICS mode, but also VT_AUTO <Keybuk> ie. it's been left with painted graphics ... but no process running on it <Keybuk> since it's in graphics mode, the kernel prohibits VT switches <Keybuk> can you guess when that condition is true? <chrisccoulson> do you know how long it's in that condition for? <Keybuk> chrisccoulson: however long the X server takes to start ;-) <Keybuk> couple of seconds usually <chrisccoulson> oh, right. that seems obvious now :) <chrisccoulson> Keybuk - so the window is quite large then (and I think consolekit is activated after GDM starts isn't it?) <chrisccoulson> i think gdm is the first thing to use it anyway <Keybuk> chrisccoulson: gdm activates it <chrisccoulson> yeah, i thought so <chrisccoulson> thanks <Keybuk> which means it's activated "before X starts or while X is starting" <Keybuk> ie. exactly in that window <Keybuk> chrisccoulson: so, on the VT_WAITACTIVE+VT_AUTO thing ... you could kinda argue it's a kernel bug <Keybuk> because the kernel bug should deal with that case on its own <Keybuk> but the kernel guys will tell you that the whole VT_* stuff is a mess, and they'd rather leave it alone <chrisccoulson> yeah, it might be easier to work around it in consolekit for now <Keybuk> exactly
2010-11-12 15:15:23 Martin Pitt consolekit (Ubuntu Lucid): status In Progress Fix Committed
2010-11-12 15:15:26 Martin Pitt bug added subscriber Ubuntu Stable Release Updates Team
2010-11-12 15:15:30 Martin Pitt bug added subscriber SRU Verification
2010-11-12 15:15:37 Martin Pitt tags patch patch verification-needed
2010-11-20 17:02:10 Martin Pitt affects gdm consolekit
2010-11-20 17:05:15 Martin Pitt bug watch added http://bugs.freedesktop.org/show_bug.cgi?id=31790
2010-11-20 17:05:15 Martin Pitt consolekit: importance Undecided Unknown
2010-11-20 17:05:15 Martin Pitt consolekit: status New Unknown
2010-11-20 17:05:15 Martin Pitt consolekit: remote watch freedesktop.org Bugzilla #31790
2010-12-18 16:38:01 ingo bug added subscriber ingo
2011-01-17 20:24:35 Launchpad Janitor branch linked lp:ubuntu/consolekit
2011-01-17 20:30:53 Launchpad Janitor branch linked lp:ubuntu/lucid-proposed/consolekit
2011-01-24 12:06:00 Bug Watch Updater consolekit: status Unknown Confirmed
2011-01-29 14:38:03 DSiekiera bug added subscriber D. Siekiera
2011-02-01 09:15:20 Jean-Baptiste Lallement tags patch verification-needed patch verification-done
2011-02-01 11:22:39 Launchpad Janitor consolekit (Ubuntu Lucid): status Fix Committed Fix Released
2011-02-04 22:23:55 Bug Watch Updater consolekit: importance Unknown Medium
2011-02-05 10:50:41 Henrik Persson removed subscriber Henrik Persson
2011-09-17 15:31:41 Arto Vuori bug added subscriber Arto Vuori