chvt sometimes hangs, causing hibernation to fail

Bug #1351564 reported by Yann Salmon
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
kbd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This is probably in relation with bug #1350220, which deals with a failure in hibernation. It appears that this is caused by chvt not terminating a some points in the hibernation scripts. Yet I do not know whether the scripts or chvt are to blame.

When I initiate an hibernation on my computer, the following frequently happens (about 50% of the time) :

1. screen goes black (normal) ;
2. instead of showing the progress of the writing of RAM to disk in console mode, the screen remains black ;
3. the screensaver prompt for login appears ;
4. after returning to desktop, I see that the network card is not functioning.

Further debugging (PM_DEBUG=true) shows that the blocking point lies in 99video and is "chvt 63". I tried to hibernate with --quirk-no-chvt. This allows the script 99video to terminate (because it does not try a chvt 63) and the hibernation process itself to engage. However, my hibernation module, /usr/lib/pm-utils/module.d/hibernate, does a chvt 63 too, which is not controlled by the --quirk-no-chvt.

So I experienced again a return to desktop with a chvt process not progressing. I killed it and hibernation took place, without any visual clue. On booting the system again, thaw took place correctly but the system was not usable because I did not get access to a console (graphical or text). Indeed, the pm-suspend.log shows that chvt 8 did not return.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: kbd 1.15.5-1ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-32.57~ppa1-generic-tuxonice 3.13.11.4
Uname: Linux 3.13.0-32-generic-tuxonice x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Sat Aug 2 09:52:13 2014
InstallationDate: Installed on 2014-07-18 (14 days ago)
InstallationMedia: Xubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
SourcePackage: kbd
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Yann Salmon (yannsalmon) wrote :
Revision history for this message
Yann Salmon (yannsalmon) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kbd (Ubuntu):
status: New → Confirmed
Revision history for this message
Malcolm Scott (malcscott) wrote :

chvt makes two ioctl calls, one to change the VT and one to wait for the new VT to become active. There's a race condition here; if something changes the VT back before the second ioctl, chvt will block indefinitely (or until something else changes to the correct VT).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.