init script resets isig flag in an incorrect manner

Bug #626723 reported by Jamie Strandboge
66
This bug affects 12 people
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Fix Released
High
Chuck Short
Maverick
Fix Released
High
Chuck Short
coreutils (Ubuntu)
Invalid
Undecided
Unassigned
Maverick
Invalid
Undecided
Unassigned
plymouth (Ubuntu)
Invalid
Undecided
Unassigned
Maverick
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: gdm

When I boot an up to date maverick laptop, I am presented with the gdm screen. If I press enter or click on a user, gdm restarts. After it restarts I am able to login normally. This happens every time.

X is starting on the correct tty (tty7), and getty does not seem to be involved.

After X has quit, some text of the form: “^]88888888888888;◆◆◆◆◆^]8888;◆◆◆◆◆^\◆” is seen on tty7.

X is getting sent SIGQUIT when the user presses <enter>.

****************** PLEASE TRY THIS WORKAROUND ************************

open up /etc/init.d/apache2 in a text editor with root powers:
gksu gedit /etc/init.d/apache2

Then comment out the call to stty sane like this:

#stty sane

Save and reboot.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gdm 2.30.5-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.35-19.28-generic 2.6.35.3
Uname: Linux 2.6.35-19-generic x86_64
Architecture: amd64
Date: Mon Aug 30 05:12:05 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427.1)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: gdm

Related branches

Revision history for this message
Jamie Strandboge (jdstrand) wrote :
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Attached are /var/log/gdm/*log and /var/log/gdm/*.1 files.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the log has

Backtrace:
0: /usr/bin/X (xorg_backtrace+0x28) [0x4a1008]
1: /usr/bin/X (0x400000+0x60fcd) [0x460fcd]
2: /lib/libpthread.so.0 (0x7f38e9a4e000+0xfb40) [0x7f38e9a5db40]
3: /lib/libc.so.6 (__select+0x13) [0x7f38e8a792a3]
4: /usr/bin/X (WaitForSomething+0x1ba) [0x45b3da]
5: /usr/bin/X (0x400000+0x2bfd2) [0x42bfd2]
6: /usr/bin/X (0x400000+0x2184b) [0x42184b]
7: /lib/libc.so.6 (__libc_start_main+0xfe) [0x7f38e89b8d8e]
8: /usr/bin/X (0x400000+0x213d9) [0x4213d9]

Caught signal 3 (Quit). Server aborting

reassign to xorg-xserver

affects: gdm (Ubuntu) → xorg-server (Ubuntu)
Bryce Harrington (bryce)
Changed in xorg-server (Ubuntu):
status: New → Confirmed
Revision history for this message
sublime (sublime) wrote :

This doesn't seem to be a xorg-server issue but rather gdm. If I startx as a normal user, X doesn't crash. At the moment it has been running fine for over 24 hours. If I start gdm instead it will restart periodically.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could be an interaction with plymouth on system start

Revision history for this message
Sebastien Bacher (seb128) wrote :

Jamie, could you switch to vt1 and see if there is your password on any input there? Seems similar to the plymouth interaction issue we had previous cycle

Revision history for this message
Sebastien Bacher (seb128) wrote :

the gdm buglists has recent bugs which are similar...

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I do not have any unexpected test on vt1. From IRC:
11:12 < jdstrand> pitti: I do have /var/run/gdm/firstserver.stamp
11:14 < jdstrand> seb128: tty8
11:14 < jdstrand> $ sudo lsof -p 4093 | grep tty
11:14 < jdstrand> Xorg 4093 root 7u CHR 4,8 0t0 4616 /dev/tty8

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Ok, I rebooted and dug around a bit.

When I boot up, when gdm starts I go to vt1 and see it initially starts on tty7:
$ ps auxww | grep [/]usr/bin/X
root 1329 0.4 0.4 135052 17908 tty7 Ss+ 11:19 0:00 /usr/bin/X :0 -nr -verbose -auth /var/run/gdm/auth-for-gdm-hUHdva/database -nolisten tcp vt7
$ sudo lsof -p 1329 | grep tty
Xorg 1329 root 6u CHR 4,7 0t0 4611 /dev/tty7

If I go to vt7, I see the gdm prompt. When I try to login with gdm, gdm restarts on tty8:
$ ps auxww | grep [/]usr/bin/X
root 3759 4.9 0.8 153928 33828 tty8 Ss+ 11:22 0:16 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-eigZMv/database -nolisten tcp
$ sudo lsof -p 3759 | grep tty
Xorg 3759 root 7r CHR 4,8 0t0 4612 /dev/tty8

If I now go to vt7, I see boot messages like:
* Starting Commun Unix Printing System: cupsd [OK]

But after all the boot messages, the last thing I see is (leading space intended):
 * Checking battery state...
^]88888888888888;◆◆◆◆◆^]8888;◆◆◆◆◆^\

Changed in xorg-server (Ubuntu Maverick):
importance: Undecided → High
assignee: nobody → Chris Halse Rogers (raof)
Revision history for this message
k3nt-1 (dugauthier) wrote :

I face the same problem.
A few remarks and addition:
- My battery is old and does not retain charge anymore
- The characters after "checking battery state" are random (So I suspect a memory corruption in one component)
- It does not crash directly on log on every time. I once had the time to start Firefox and open a few tabs before it crashed

This makes me wonder if this is really related to GDM or maybe only to a battery monitoring service.

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 626723] Re: gdm restarts on initial login

For me the "crash" happens after I enter the password to unlock my
keyring. I can wait it will continue to work normally, but as soon as
I hit enter to submit password to unlock the keyring the crash
happens.

ps. I'm using auto-login.

Revision history for this message
sublime (sublime) wrote : Re: gdm restarts on initial login

X has still not crashed/restarted since I started it from the vt2:
root 3025 1.3 2.2 90136 75824 tty8 Ss+ Aug30 62:11 /usr/bin/X -nolisten tcp :0 -auth /tmp/serverauth.v2SzL2ZoHy

Again, problem seems to be w/ GDM not xserver:
ii gdm 2.30.5-0ubuntu2 GNOME Display Manager

Revision history for this message
Brice (brice-boucard) wrote :

Could that be the same issue related here : https://bugs.launchpad.net/ubuntu/+bug/625902 ?

Revision history for this message
k3nt-1 (dugauthier) wrote :

Yes, 625902 is definitely a duplicate of this one (or vice versa). I marked it as such.

As for the bug, I install from Maverick Beta from DVD on another computer and I face the same problem.

Both computers I use are HP laptops. One 32 bits and the other in 64.

Revision history for this message
e.m.fields (emfields) wrote :

Same problem here.
System: I installed Ubuntu 10.04 Server edition, added "ubuntu-desktop" package, and upgraded to Maverick 10.10.

Problem:
On bootup: GDM screen appears. Select name, hit enter. GDM restarts. Select name a second time, enter password, logs in normally.

- fields

Revision history for this message
k3nt-1 (dugauthier) wrote :

Just started my PC this morning and I have been working more than 20 minutes without a crash. Only missing stuff is the battery monitor applet in my top panel.
I didn't remove it myself, so it has maybe just failed to start for one reason or another.
I'll try to unplug my PC see if it causes xorg to crash and will report back here when it's done.

Revision history for this message
k3nt-1 (dugauthier) wrote :

This started the battery monitor applet without crashing my PC.
I really can't find any reproducible steps for the crash to happen...

Revision history for this message
Chris Halse Rogers (raof) wrote :

This seems to be a re-appearance of the bad Plymouth/X interaction we hit in Lucid. People report that it seems to have started with the recent xorg-server upload, of xserver-xorg-core 1.9.0-0ubuntu1, but I can't see any VT-handling related changes in the server that might trigger this.

It looks like bug #534861 may need to be re-opened.

Revision history for this message
Chris Halse Rogers (raof) wrote : Re: Pressing <enter> at GDM screen crashes X

I can reproduce this locally.

Moving this bug to plymouth; it was the culprit in Lucid.

summary: - gdm restarts on initial login
+ Pressing <enter> at GDM screen crashes X
description: updated
affects: xorg-server (Ubuntu Maverick) → plymouth (Ubuntu Maverick)
Changed in plymouth (Ubuntu Maverick):
assignee: Chris Halse Rogers (raof) → nobody
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

I am moving over from bug #625239, which was actually a duplicate of this one, but now that bug has been re-titled to reflect another somewhat-similar bug. Triaging, since I think this is quite similar to the one in the Lucid cycle, and enough information is available from both the bugs for a dev to fix.

Changed in plymouth (Ubuntu Maverick):
status: Confirmed → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue started happening to quite some users again it seems but neither plymouth nor gdm changes recently and it seems gdm is starting on the right vt still, it probably needs debugging from somebody who understand plymouth if that's not an xorg one

Changed in plymouth (Ubuntu Maverick):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I'm not sure if I'm seeing the same thing, but in my case X is starting on tty2 alongside getty

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 626723] Re: Pressing <enter> at GDM screen crashes X

On Mon, Sep 06, 2010 at 08:14:34AM -0000, Bilal Akhtar wrote:
> I am moving over from bug #625239, which was actually a duplicate of
> this one, but now that bug has been re-titled to reflect another
> somewhat-similar bug. Triaging, since I think this is quite similar to
> the one in the Lucid cycle, and enough information is available from
> both the bugs for a dev to fix.

The one in the Lucid cycle was a bug in plymouth, and the plymouth code has
*not changed* since Lucid.

Can someone please do a test downgrade to the Lucid version of gdm, with
everything else at maverick versions, and see whether it's reproducible
then?

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Revision history for this message
auxbuss (launchpad-auxbuss) wrote : Re: Pressing <enter> at GDM screen crashes X

Can you give me a pointer as to how to do that. I'm technical, so terse instructions should do.

Revision history for this message
CyberConan (cyberconan) wrote :

This bug affect xsession started by kdm too. I'm using kubuntu maverick beta.

Revision history for this message
Natim (site-remy) wrote :

I still have the bug and I am willing to try a fix.

We can find the gdm lucid packet here : http://packages.ubuntu.com/lucid/gdm

Revision history for this message
Natim (site-remy) wrote :

To install it : sudo sudo dpkg -i --force-downgrade gdm_2.30.0-0ubuntu5_i386.deb

Revision history for this message
auxbuss (launchpad-auxbuss) wrote :

Hmm I prefer to stay with aptitude, so this should work:

$ sudo aptitude install <pkgname>=<version>
and perhaps
$ sudo aptitude hold <pkgname>

So, now I need to know the package name and source, since I presume the required package comes out of the lucid repos.

Currently,
$ aptitude versions gdm
i 2.30.5-0ubuntu2 maverick 500

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

In my bugfixes ppa, I have tried a hack to fix this bug. Its building right now, I will test it before telling you people to use it, since it could cause unexpected results right now.

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Nope, my PPA hack didn't work. This was using the same process that fixed the problem in Lucid, that is, prevent plymouth from setting the terminal to unbuffered input. Since the lucid fix had done most of it, I disabled the remaining calls, but it didn't fix it. I suppose the problem is different this time.

Revision history for this message
Chris Halse Rogers (raof) wrote :

@Chris Coulson: There's a related bug #625239 about X being started on the wrong VT. You probably find that X crashes when you press enter after about 5 minutes?

Revision history for this message
Chris Halse Rogers (raof) wrote :

Downgrading gdm to the version in lucid-updates does not affect my ability to reproduce this bug, neither does downgrading Xorg to 1.8.99.905.

If plymouth hasn't changed in Maverick, is upstart a possible candidate? That's in the plymouth/gdm/X transition path.

Revision history for this message
Natim (site-remy) wrote :

Same thing for me `Downgrading gdm to the version in lucid-updates does not affect my ability to reproduce this bug`

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

RAOF: How can Upstart come in between? I don't think it registers keypresses, does it?

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Has bug #554172 's workaround applied for Upstart got to do something with this bug?

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Looking at what the other distros have been facing, I came to this
http://www.spinics.net/linux/lists/xorg/msg45959.html

Which init script is actually doing that?

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

From what I am seeing after grepping so much, I find out that its Apache which resets the isig flag so that everything gets SIGQUIT on enter. Is everyone over here having Apache2 installed?

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

VIOLA! EUREKA! Commenting out the call to stty sane in /etc/init.d/apache2 worked like magic for me!!!! I know the problem now! It doesn't affect Plymouth or X or GDM or Linux or Upstart, but Apache! I am going to propose a patch.

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

So THIS is the culprit, an apache upload that matches the day when we began to experience this:
  * debian/apache2.2-common.apache2.init: Add stty sane so that users will get a
    password prompt when using apache-ssl. (LP: #582963)

description: updated
Revision history for this message
Andrius Štikonas (stikonas) wrote : Re: [Bug 626723] Re: Pressing <enter> at GDM screen crashes X

2010/9/8 Bilal Akhtar <email address hidden>

> >From what I am seeing after grepping so much, I find out that its Apache
> which resets the isig flag so that everything gets SIGQUIT on enter. Is
> everyone over here having Apache2 installed?
>
> --
> Pressing <enter> at GDM screen crashes X
> https://bugs.launchpad.net/bugs/626723
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Yes, I have Apache.

Changed in plymouth (Ubuntu Maverick):
assignee: Canonical Foundations Team (canonical-foundations) → nobody
importance: High → Undecided
status: Triaged → Invalid
Changed in apache2 (Ubuntu Maverick):
assignee: nobody → Bilal Akhtar (bilalakhtar)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Natim (site-remy) wrote : Re: Pressing <enter> at GDM screen crashes X

I have also apache installed.

summary: - Pressing <enter> at GDM screen crashes X
+ init script resets isig flag in an incorrect manner
Revision history for this message
auxbuss (launchpad-auxbuss) wrote :

Yup, apache installed here too.

Nice find, Bilal.

Revision history for this message
auxbuss (launchpad-auxbuss) wrote :

Oh, and btw, it's voilà. Viola is a big violin, and the female protagonist in the Patrick Ness trilogy Chaos Walking ;)

Right, off to confirm your test findings.

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

So I have to get a way to fix this bug without disrupting bug #582963 , of which this bug is a regression.

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

It would be better to allow Chuck to look into this one.

Changed in apache2 (Ubuntu Maverick):
assignee: Bilal Akhtar (bilalakhtar) → Chuck Short (zulcss)
Thierry Carrez (ttx)
tags: added: server-mrs
Changed in apache2 (Ubuntu Maverick):
milestone: none → ubuntu-10.10
Revision history for this message
Dave Walker (davewalker) wrote :

Opening a task against coreutils, as stty really seems to be culprit. It would be unfortunate if an issue the Desktop area is seeing is resolved by breaking the server area. Fixing stty to 'do the right thing' would seem the best path, but undoubtedly more complicated.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Fwiw, I also have apache2 installed.

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

This bug was fixed in the package apache2 - 2.2.16-1ubuntu3

---------------
apache2 (2.2.16-1ubuntu3) maverick; urgency=low

  * Revert "stty sane" to unbreak apache starting, this will have to be
    fixed a different way. (LP: #626723)
 -- Chuck Short <email address hidden> Wed, 08 Sep 2010 08:33:17 -0400

Changed in apache2 (Ubuntu Maverick):
status: In Progress → Fix Released
Revision history for this message
Robbie Williamson (robbiew) wrote :

Scott will take a look at this today.

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Dave,
The problem is NOT with stty. The problem is, the apache2 init script was calling stty with the 'sane' option, which, according to the manpage, is equivalent to:
cread -ignbrk brkint -inlcr -igncr icrnl -iutf8 -ixoff -iuclc -ixany imaxbel opost -olcuc
              -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe
              echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

Which is a large number of args. Hence, the right way to fix would be to get apache to run it with only the required args. Well, due to this bug, the stty change has been reverted and 'fixed for the meantime'.

Changed in coreutils (Ubuntu Maverick):
status: New → Invalid
Revision history for this message
Robbie Williamson (robbiew) wrote :

whoops...helps to RELOAD the bug before commenting :/. Scott *won't* look at this bug, because it's fixed! :)

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Robbie just pointed me as this bug, so I'm glad to see it's got a fix.

Just wanted to confirm that while some of our issues in Lucid *were* plymouth/X interaction issues, we discovered that many of them were - as debugged above - caused by the isig flag being reapplied to /dev/console.

We had to patch a few different things, including Upstart, which all felt they had the right to reset /dev/console. If apache is doing "stty sane", that is almost certainly the culprit - anything doing that is going to cause issues because the console is *not* supposed to ever be sane (it's graphical at all points)

Revision history for this message
auxbuss (launchpad-auxbuss) wrote :

Just rebooted and the problem has gone.

Revision history for this message
Lars Kumbier (derlars) wrote :

commenting out fixed it - yay!

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote : Re: [Bug 626723] Re: init script resets isig flag in an incorrect manner

On Wed, 2010-09-08 at 18:15 +0000, derLars wrote:
> commenting out fixed it - yay!

Updating your system should also fix it now.

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Dunno why this was marked duplicate; Though the symptoms of this bug were the same as the other, the problem was completely different, and the affected package, the fix, etc were all different. Hence, this isn't a dup.

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.