[ConsoleKit] Active VT tracking can fail at startup

Ray Strode halfline at gmail.com
Thu Sep 2 11:45:47 PDT 2010


Hi,

On Thu, Sep 2, 2010 at 2:30 PM, Leen Besselink
<consolekit at consolejunkie.net> wrote:

>> This morning I did some more testing, when it fails, it did not find any
>> console_fd, it just returns 3.
>>
>> Because that is the last value of fd from the loop at the end of
>> ck_get_a_console_fd
>
> I've been testing and trying to figure out what is going on with some other users
> at the Ubuntu bugreport related to this.
>
> And I can positively say, that which is mentioned above is what is going on.
>
> At times on startup none of the checks in ck_get_a_console_fd work, it just returns 3
> as a result because that is what was used in the last loop.
>
> If however there is a loop which retries this, every so often, then it works.
>
> Then when you have a working console_fd you can use it to call the ioctl as many times
> and in as many threads you like.
>
> What do you propose we do to fix this ?
But if you look at that function it should never get to the loop, right?

That loop is weird fallback code that probably shouldn't be there at
all.  If it's getting there,
then the line:

 fd = open_a_console ("/dev/tty0")

is failing.  Your next step is to figure out why that line is failing.

--Ray


More information about the ConsoleKit mailing list