VT_WAITACTIVE does not work well with a multiseat setup

Bug #997483 reported by Jesse Sung on 2012-05-10
60
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Light Display Manager
Undecided
Unassigned
lightdm (Ubuntu)
Undecided
Unassigned

Bug Description

Related to the fix introduced in bug #851612 .

Saw this in lightdm.log (system call interrupted because of ctrl-alt-del pressed):
[+2.97s] DEBUG: New display ready, switching to it
[+2.97s] DEBUG: Activating VT 8
[+77.56s] WARNING: Error using VT_WAITACTIVE 8 on /dev/console: Interrupted system call
[+77.56s] DEBUG: Got signal 15 from process 1
[+77.56s] DEBUG: Caught Terminated signal, shutting down

And in x-1-greeter.log:
[+0.48s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.48s] DEBUG: Loading user /org/freedesktop/Accounts/User1001
[+0.50s] DEBUG: Loading user /org/freedesktop/Accounts/User1000
[+50.56s] WARNING: Error getting session list from org.freedesktop.DisplayManager: Timeout was reached

On vt7, unity-greeter would get stuck after password input.
On vt8, unity-greeter appears after that "getting session list timeout", which is about a minute later than vt7, and does not have a password input field.

lightdm blocked by VT_WAITACTIVE may be the cause...

Tested with lightdm 1.2.0-0ubuntu2 in precise.

Related branches

Anthony (craigslistamc) wrote :

Confirmed in Xubuntu 12.04 with a multiseat setup exactly as Jesse Sung reported. Both seats get a greater, but neither has the password input field.

Is there a workaround?

Anthony (craigslistamc) wrote :
Download full text (3.4 KiB)

Figured i might as well provide lightdm.log

[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.2.1, UID=0 PID=1342
[+0.00s] DEBUG: Loaded configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: Registered seat module xlocal
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Loading seat Seat:0
[+0.00s] DEBUG: Starting seat
[+0.00s] DEBUG: Starting new display for greeter
[+0.00s] DEBUG: Starting local X display
[+0.19s] DEBUG: X server :0 will replace Plymouth
[+0.21s] DEBUG: Using VT 7
[+0.21s] DEBUG: Activating VT 7
[+0.21s] DEBUG: Logging to /var/log/lightdm/x-0.log
[+0.21s] DEBUG: Writing X server authority to /var/run/lightdm/root/:0
[+0.21s] DEBUG: Launching X Server
[+0.21s] DEBUG: Launching process 1370: /usr/bin/X :0 -sharevts :0 -config xorg_seat0.conf -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none
[+0.21s] DEBUG: Waiting for ready signal from X server :0
[+0.21s] DEBUG: Loading seat Seat:1
[+0.21s] DEBUG: Starting seat
[+0.21s] DEBUG: Starting new display for greeter
[+0.21s] DEBUG: Starting local X display
[+0.21s] DEBUG: Using VT 8
[+0.21s] DEBUG: Activating VT 8
[+2.72s] WARNING: Error using VT_WAITACTIVE 8 on /dev/console: Interrupted system call
[+2.72s] DEBUG: Logging to /var/log/lightdm/x-1.log
[+2.72s] DEBUG: Writing X server authority to /var/run/lightdm/root/:1
[+2.72s] DEBUG: Launching X Server
[+2.72s] DEBUG: Launching process 1624: /usr/bin/X :1 -sharevts :1 -config xorg_seat1.conf -auth /var/run/lightdm/root/:1 -nolisten tcp vt8 -novtswitch
[+2.72s] DEBUG: Waiting for ready signal from X server :1
[+2.72s] DEBUG: Got signal 10 from process 1370
[+2.72s] DEBUG: Got signal from X server :0
[+2.72s] DEBUG: Stopping Plymouth, X server is ready
[+2.74s] DEBUG: Connecting to XServer :0
[+2.74s] DEBUG: Starting greeter
[+2.74s] DEBUG: Started session 1628 with service 'lightdm', username 'lightdm'
[+2.74s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+2.74s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+2.74s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat1
[+2.78s] DEBUG: Process 1624 exited with return value 1
[+2.78s] DEBUG: X server stopped
[+2.78s] DEBUG: Removing X server authority /var/run/lightdm/root/:1
[+2.78s] DEBUG: Releasing VT 8
[+2.78s] DEBUG: Display server stopped
[+2.78s] DEBUG: Stopping display
[+2.78s] DEBUG: Display stopped
[+2.78s] DEBUG: Stopping X local seat, failed to start a display
[+2.78s] DEBUG: Stopping seat
[+2.78s] DEBUG: Seat stopped
[+2.78s] DEBUG: Required seat has stopped
[+2.78s] DEBUG: Stopping display manager
[+2.78s] DEBUG: Stopping seat
[+2.78s] DEBUG: Stopping display
[+2.78s] DEBUG: Session 1628: Sending SIGTERM
[+2.78s] DEBUG: Greeter closed communication channel
[+2.78s] DEBUG: Session 1628 terminated with signal 15
[+2.78s] DEBUG: Session 1628 failed during authentication
[+2.78s] DEBUG: Greeter quit
[+2.78s] DEBUG: Sending signal 15 to process 1370
[+3.10s] DEBUG: Process 1370 exited with return value 0
[+3.10s] DEBUG: X server stopped
[+3.10s]...

Read more...

Anthony (craigslistamc) wrote :

After som digging, it looks like this is a related bug:
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/976124

Also would like to mention that Robert Ancell is assignend both of these bugs (4 and 5 months old atm), but the importance for them is undecided and both are at the bottom of his list. https://bugs.launchpad.net/~robert-ancell/+assignedbugs

Richard Hansen (rhansen) on 2012-11-25
tags: added: multiseat
Richard Hansen (rhansen) wrote :

LightDM currently assigns each seat a different VT, and each seat tries to switch to its own VT when starting X. If I understand correctly, these switches compete with each other, causing the problem.

The proper solution is to have only the primary seat switch VTs, then have all other seats share that VT. LightDM doesn't currently support this, but I have some changes to LightDM in progress to add more complete multiseat support. If you are using Ubuntu, please try installing the version of LightDM in my PPA (<https://launchpad.net/~a7x/+archive/multiseat>):

    sudo apt-add-repository ppa:a7x/multiseat
    sudo apt-get update
    sudo apt-get upgrade

More complete instructions can be found by visiting the PPA page.

Changed in lightdm:
assignee: nobody → a7x (a7x)
Changed in lightdm (Ubuntu):
assignee: Robert Ancell (robert-ancell) → a7x (a7x)
Changed in lightdm:
status: New → In Progress
Changed in lightdm (Ubuntu):
status: Confirmed → In Progress
Jesse Sung (wenchien) wrote :

Sorry, since I don't have a multiseat setup any more, we'll need other's help to do the test.

tags: added: precise
Alex Perez (aperez-6) wrote :

I appear to still be having this problem in 16.04/Xenial

Aditya (meta1729) wrote :

Yup, still present in 16.04.2 Xubuntu. Couldn't log in due to this. Returns back to the login screen. After restarting lightdm.service from another tty, I could log in.

Jonathan Marler (marler8997) wrote :

This bug is happening on my machine, Ubuntu 16.04 LTS

Mikko Rantalainen (mira) wrote :

Happening here, too, randomly after return from S3 (Ubuntu 16.04.3 LTS).

$ uname -a
Linux desktop 4.10.0-38-lowlatency #42~16.04.1-Ubuntu SMP PREEMPT Tue Oct 10 17:35:28 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Using integrated intel graphics on i5-3570K.

Mikko Rantalainen (mira) wrote :

It seems to be that the problem occurs after this:

** (lightdm:1153): WARNING **: Error using VT_WAITACTIVE 7 on /dev/tty0: Interrupted system call

(The console number depends on luck, of course.)

I would guess that whatever code is emitting that error message is not handling the situation correctly. In case of "Interrupted system call" I would guess the correct way to handle the problem is to repeat the system call. I think the code instead emits this error and proceeds blindly forward.

dino99 (9d9) wrote :

Latest 'assigned' for that report have never done the job; removing him to get a real fix chance.

Changed in lightdm (Ubuntu):
assignee: Richard Hansen (rhansen) → nobody
Changed in lightdm:
assignee: Richard Hansen (rhansen) → nobody
Changed in lightdm (Ubuntu):
status: In Progress → Confirmed
Changed in lightdm:
status: In Progress → Confirmed
dino99 (9d9) wrote :

Possibly fixed, and may need an SRU for older releases

lightdm (1.21.4-0ubuntu1) zesty; urgency=medium

  * New upstream release:
    - Use power management functions from ConsoleKit2 if available.
    - Correctly pass return value from sessions to LightDM.
    - Retry VT_WAITACTIVE if we get EINTR.
    - Ignore SIGHUP by default.
    - Use SA_RESTART with SIGPIPE.
    - liblightdm-qt: Use liblightdm-gobject power methods instead of
      re-implementing in Qt.
  * debian/liblightdm-qt-3-0.symbols:
  * debian/liblightdm-qt5-3-0.symbols:
    - Add symbols files for C++ libraries

 -- Robert Ancell <email address hidden> Mon, 13 Feb 2017 16:31:48 +1300

Changed in lightdm (Ubuntu):
status: Confirmed → Incomplete
Changed in lightdm:
status: Confirmed → Incomplete
Mikko Rantalainen (mira) wrote :

Should it be safe to install ligthdm package from zesty to xenial to test if it fixes the issue? (https://packages.ubuntu.com/zesty/lightdm version 1.22.0-0ubuntu2.1)

Launchpad Janitor (janitor) wrote :

[Expired for lightdm (Ubuntu) because there has been no activity for 60 days.]

Changed in lightdm (Ubuntu):
status: Incomplete → Expired
dino99 (9d9) on 2018-03-21
Changed in lightdm:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions