Ticket #1167 (new defect)

Opened 9 years ago

Last modified 8 years ago

lightdm's upstart script sometimes errors out, resulting in low-graphics-mode warning.

Reported by: jdreed Owned by:
Priority: high Milestone: Upstream Utopia
Component: -- Keywords:
Cc: Fixed in version: debathena-lightdm-config 1.9
Upstream bug:  LP:1111537

Description

When a reboot is triggered, a race condition sometimes results in the "low graphics mode" dialog being displayed for a short time between when lightdm shuts down and a reboot is initiated. This is annoying, but not a show stopper.

Change History

comment:1 follow-up: ↓ 2 Changed 9 years ago by jdreed

This is because we're calling reboot in the session cleanup script, which I bet is totally unsupported. Something, somewhere, is causing lightdm to exit with status 1. It's unclear if this is the cleanup script, or some combination of upstart signals being emitted, or what, and debugging this is hard.

What does work as a workaround is changing the failsafe-x upstart job to not start if /var/run/reboot-required exists. We should consider doing this. (And frankly, it's the right answer anyway. If your machine wants to reboot, and X fails to start, you should probably go reboot and see if it's still broken. I suspect I can't convince upstream of that, though.) We could also just plain DEB_REMOVE_FILES /etc/init/failsafe-x.conf, but I'm not convinced that's the right answer.

One other option I think I want is for the cleanup script to not actually call reboot, and instead have the greeter check for that file and ask lightdm to reboot, which will happen gracefully, and even allow us to throw up a dialog saying "This workstation has experienced an error and will reboot in 10 seconds." or some such. This will hopefully solve some of our reboot issues, since I've never seen a shutdown from the greeter fail for anything other than actual shutdown failures (like OpenAFS panics or something)

comment:2 in reply to: ↑ 1 Changed 9 years ago by kaduk

Replying to jdreed:

This is because we're calling reboot in the session cleanup script, which I bet is totally unsupported. Something, somewhere, is causing lightdm to exit with status 1. It's unclear if this is the cleanup script, or some combination of upstart signals being emitted, or what, and debugging this is hard.

I see this warning on my -cluster VM when I use the 'shutdown' button from the greeter. I don't think that's in our code...

comment:3 Changed 9 years ago by jdreed

  • Priority changed from normal to high

Bumping priority, this is more widespread than we thought. I heard from hotline that a lot of machines in the cluster end up in this state, and I found one in 66 the other day that was completely unresponsive to anything else while this was running. It's unclear to me whether we want to DEB_REMOVE_FILES the upstart job, or divert it to not run when /var/run/reboot_required exists, or what.

I vaguely wonder if we we want to pass --verbose on the grub command line so that we can get a better idea of what's going on.

My current theory is that "traditional" init scripts are doing something that makes upstart think some step has failed.

comment:4 Changed 9 years ago by jdreed

OK, found it. the post-stop script of lightdm's upstart job calls initctl emit desktop-shutdown, except that appears to fail sometimes, and because upstart scripts are run with set -e, the whole thing fails. Adding ||: to the end of that line eliminates the warning for me.

I'll file an upstream bug, but this is so poorly reproducible that I'm not optimistic. We should consider doing something ourselves, though I'm not sure what. Diverting the job seems wrong. And OTOH, we vaguely want some sort of functionality here, it would be clever if cluster machines could display a "I'm trying to shut down, if you see this message for more than a minute, reboot me".

comment:5 Changed 9 years ago by jdreed

Amusingly enough, fixing this seems to also make shutdowns less likely to hang on my VM. I didn't think a non-zero exit status in a post-stop script to take down all of upstart, but who knows.

comment:6 Changed 8 years ago by jdreed

  • Status changed from new to committed
  • Upstream bug set to LP:1111537

I've filed  LP:1111537, but I fully expect that to be closed as WONTFIX.

Committed in r25807.

comment:7 Changed 8 years ago by jdreed

  • Status changed from committed to development
  • Fixed in version set to debathena-lightdm-config 1.9

comment:8 Changed 8 years ago by jdreed

  • Status changed from development to proposed

comment:9 Changed 8 years ago by jdreed

  • Status changed from proposed to new
  • Milestone changed from Current Semester to Upstream Utopia
  • Summary changed from low-graphics-mode warning triggered during a reboot to lightdm's upstart script sometimes errors out, resulting in low-graphics-mode warning.

Fixed. Re-milestoning as upstream to track LP bug.

Note: See TracTickets for help on using tickets.