emacs -nw freezes with 100% CPU with glib 2.31

Bug #902043 reported by Anders Kaseorg on 2011-12-09
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNU Emacs
emacs23 (Ubuntu)

Bug Description

After glib2.0 2.31.2 was uploaded to precise, ‘emacs -nw’ freezes at startup, going into an infinite loop at 100% CPU usage. A backtrace starts as follows:

#0 xg_select (max_fds=4, rfds=0x7fffd264a5b0, wfds=0x0, efds=0x0,
    timeout=0x7fffd264a800) at xgselect.c:58
#1 0x000000000059cd8e in wait_reading_process_output (time_limit=1,
    microsecs=996270, read_kbd=<optimized out>, do_display=1,
    wait_for_cell=11690546, wait_proc=0x0, just_wait_proc=0) at process.c:4981
#2 0x00000000004f0309 in kbd_buffer_get_event (end_time=0x7fffd264aca0,
    used_mouse_menu=0x0, kbp=<synthetic pointer>) at keyboard.c:4177
#3 read_char (commandflag=0, nmaps=0, maps=0x0, prev_event=11690642,
    used_mouse_menu=0x0, end_time=0x7fffd264aca0) at keyboard.c:3081

which matches a known upstream bug: http://debbugs.gnu.org/9754 . Downgrading to libglib2.0-0 2.30.1-2ubuntu1 makes the problem disappear.

Anders Kaseorg (andersk) wrote :

Here’s a debdiff with the patch from Fedora. I’m testing it in my PPA; I’ll post the results once it builds.

The attachment "emacs23_23.3+1-1ubuntu6_lp902043.debdiff" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Launchpad Janitor (janitor) wrote :

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

Changed in emacs23 (Ubuntu):
status: New → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package emacs23 - 23.3+1-1ubuntu7

emacs23 (23.3+1-1ubuntu7) precise; urgency=low

  * debian/patches/emacs-xgselect.patch: Initialize xgselect in
    function xg_select when gfds_size == 0. Fixes 100% CPU startup
    freeze with glib 2.31. (LP: #902043)
 -- Anders Kaseorg <email address hidden> Fri, 09 Dec 2011 02:17:48 -0500

Changed in emacs23 (Ubuntu):
status: Confirmed → Fix Released
Bryce Harrington (bryce) wrote :

Hi Anders, thanks for fixing this bug. Seems the PPAs are backed up, your package still hasn't built. However, I verified it builds on i386 in pbuilder.

I upgraded to glib 2.31 but was unable to reproduce the bug. However looking at the patch the error looks pretty obvious and the patch looks sane, so I've gone ahead and uploaded it.

Anders Kaseorg (andersk) wrote :

Yeah, that fixed it. Thanks.

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

Other bug subscribers

Remote bug watches

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