<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>197104</bug_id>
          
          <creation_ts>2007-10-26 03:51 0000</creation_ts>
          <short_desc>x11-base/xorg-server-1.3 and 1.4 consumes 100% CPU, locking the keyboard, apparently triggered by opening an OpenOffice pulldown menu</short_desc>
          <delta_ts>2008-05-05 21:21:41 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Server</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>https://bugs.freedesktop.org/show_bug.cgi?id=10525</bug_file_loc>
          
          <keywords>Inclusion</keywords>
          <priority>P2</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>smw@alcor.concordia.ca</reporter>
          <assigned_to>x11@gentoo.org</assigned_to>
          <cc>cems@cemshost.com.br</cc>
    
    <cc>tetromino@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>smw@alcor.concordia.ca</who>
            <bug_when>2007-10-26 03:51:02 0000</bug_when>
            <thetext>Details are available here:
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/152992
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/135878
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=433131
https://bugs.freedesktop.org/show_bug.cgi?id=10525
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411287
http://qa.openoffice.org/issues/show_bug.cgi?id=75578

The summary is of the symptoms is that the keyboard occasionally locks up completely, with no response even to NumLock or CapsLock.  The mouse pointer tracks, but mouse button events are ignored.  The only way to recover the system from the console is to reset or power cycle, but the system itself is still up and will respond to ssh connections.  Underneath, the X server is consuming 100% of the CPU.  The triggering event is usually an attempt to open a menu in any of the OpenOffice applications, but I&apos;ve personally seen the same condition triggered by GoogleEarth and Dosemu.

There seems to be no commonality of hardware (at least x86 and amd64), distribution (I&apos;m on Gentoo, but bug reports are common on Debian, Ubuntu and Suse among others), Xorg server version (I&apos;ve personally witnessed at least x11-base/xorg-server-1.1.1-r4 through 1.3.0.0-r1), video card (at least Nvidia and Intel), kernel version (in my case from 2.6.19.something through 2.6.22.1, the most recent vanilla-sources kernel at the moment) or anything else I can think of offhand.

This is almost certainly an upstream problem.  A patch is available here:
http://cvs.fedora.redhat.com/viewcvs/devel/xorg-x11-server/xserver-1.3.0-xkb-and-loathing.patch?view=markup
...but this patch is not incorporated into the upstream release of version 1.4, at least not as of this writing (2007/10/25).

Basically I&apos;m just requesting that this patch or something like it be incorporated into the next ebuild for x11-base/xorg-server

Reproducible: Sometimes

Steps to Reproduce:
Basically the only way I&apos;ve found to reproduce this is to keep using OpenOffice.  The length of time may vary (from a low of a few hours to a high of about three weeks of using OpenOffice 3-4 times per week), but sooner or later the system will lock up when clicking on a pulldown menu in OpenOffice.

Actual Results:  
As above, the system will enter the state in which the X server is consuming all available CPU cycles and the keyboard is completely unresponsive.

Some people have reported that their systems returned to normal eventually with no intervention (where &quot;eventually&quot; is on the order of 5-30 minutes), but in my experience if the machine hangs at night, it will still be hung until the next morning when I can log into it remotely.

Expected Results:  
The system shouldn&apos;t lock up this way. :-)

My personal configuration is an Asus P5B-VM motherboard with an Intel Core 2 Q6600 CPU, onboard Intel X3000 (965G) graphics, 4 Gb of memory, 32-bit (x86) Gentoo with vanilla-sources kernel 2.6.22.1.  However, as described above, the problem appears not to be specific to any of these details; the same problem has been reported on systems that vary in all of the above respects.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tetromino@gmail.com</who>
            <bug_when>2007-11-07 04:58:29 0000</bug_when>
            <thetext>Same issue here, in both openoffice and openoffice-bin. Opening any openoffice menu has a 25% chance of freezing X.

Portage 2.1.3.19 (default-linux/amd64/2007.0/desktop, gcc-4.2.2, glibc-2.6.1-r0, 2.6.22-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r8 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dberkholz@gentoo.org</who>
            <bug_when>2007-11-07 07:21:56 0000</bug_when>
            <thetext>It&apos;s on master branch, but it hasn&apos;t yet 1.4 branch yet. I asked ajax about that, and I&apos;m waiting to hear back.

commit a5b8053606d6e786cdcf6734f271acc05f9cc588
Author: Adam Jackson &lt;ajax@benzedrine.nwnk.net&gt;
Date:   Tue Sep 11 11:37:06 2007 -0400

    Ignore - not just block - SIGALRM around Popen()/Pclose().
    
    Because our &quot;popen&quot; implementation uses stdio, and because nobody&apos;s stdio
    library is capable of surviving signals, we need to make absolutely sure
    that we hide the SIGALRM from the smart scheduler.  Otherwise, when you
    open a menu in openoffice, and it recompiles XKB to deal with the
    accelerators, and you popen xkbcomp because we suck, then the scheduler
    will tell you you&apos;re taking forever doing something stupid, and the
    wait() code will get confused, and input will hang and your CPU usage
    slams to 100%.  Down, not across.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dberkholz@gentoo.org</who>
            <bug_when>2007-12-14 07:59:44 0000</bug_when>
            <thetext>Should be fixed in 1.4.0.90, please reopen if it&apos;s not.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cems@cemshost.com.br</who>
            <bug_when>2008-04-14 22:49:10 0000</bug_when>
            <thetext>I added this in /etc/portage/package.keywords:
# bugs
# xorg-1.3.0.0-r5
x11-base/xorg-server
x11-libs/pixman
x11-libs/libXrender
x11-proto/renderproto
media-libs/mesa
x11-libs/xtrans
x11-drivers/xf86-input-keyboard
# not asked by portage but required
x11-drivers/xf86-input-mouse
x11-drivers/xf86-video-ati

emerge --sync and emerge -u xorg-server
revdep-rebuild -i -p shows only gobby which fails to compile (another bug)

The behaviour is the same as 1.3.0.0-r5: I can run X, alone, but starting gdm, xdm or slim locks the keyboard, mouse and X (100% CPU) cannot be killed.

Portage 2.1.4.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r3 i686)
=================================================================
System uname: 2.6.24-gentoo-r3 i686 AMD Athlon(tm) XP 2600+
Timestamp of tree: Mon, 14 Apr 2008 20:04:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.3.5-r3, 2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS=&quot;x86&quot;
CBUILD=&quot;i686-pc-linux-gnu&quot;
CFLAGS=&quot;-march=athlon-xp -O2 -pipe -fomit-frame-pointer&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d&quot;
CXXFLAGS=&quot;-march=athlon-xp -O2 -pipe -fomit-frame-pointer&quot;
DISTDIR=&quot;/mnt/sata/portage/distfiles&quot;
FEATURES=&quot;ccache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch&quot;
GENTOO_MIRRORS=&quot;http://www.gtlib.gatech.edu/pub/gentoo http://mirror.datapipe.net/gentoo http://gentoo.mirrors.pair.com/&quot;
LANG=&quot;en_US.utf8&quot;
LC_ALL=&quot;en_US.utf8&quot;
LINGUAS=&quot;en&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/mnt/sata/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/mnt/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;3dnow 3dnowext 7zip X acpi alsa apache2 bash-completion berkdb bluetooth branding bzip2 bzlib cairo cddb cdr cli cracklib crypt cups dbus divx4linux djvu dri dvd dvdr dvdread emboss esd evo fam firefox flac foomaticdb fortran gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 hal iconv innodb isdnlog javascript jpeg jpeg2k kdeenablefinal kdexdeltas keyring lcms libnotify logrotate mad matroska midi mmx mmx2 mmxext mng mp3 mpeg msn mudflap ncurses network-cron nls nptl nptlonly nsplugin offensive ogg opengl openmp oscar pam pcre pdf perl php png ppds pppd python qt3support qt4 quicktime readline reflection rtc ruby samba sasl sdl session spl sse ssl startup-notification svg tcpd threads truetype unicode v4l v4l2 vhosts vim-syntax vorbis win32codecs x86 xinetd xml xorg xosd xprint xv xvid xvmc yv12 zlib&quot; ALSA_CARDS=&quot;ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci&quot; ALSA_PCM_PLUGINS=&quot;adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol&quot; APACHE2_MODULES=&quot;actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias&quot; APACHE2_MPMS=&quot;worker&quot; ELIBC=&quot;glibc&quot; INPUT_DEVICES=&quot;keyboard mouse evdev&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; LINGUAS=&quot;en&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;radeon&quot;
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

I&apos;ll try recompile everything with stable version
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solafidefarms@gmail.com</who>
            <bug_when>2008-05-04 03:52:46 0000</bug_when>
            <thetext>Created an attachment (id=151747)
patch using sigaction instead of signal (no glibc-only extensions)

Type sighandler_t and function signal() are glibc extensions and as such do not work on systems without glibc (for instance, Darwin/OS X). This patch uses POSIX signal-handling functions and structs instead, for cross-platform compatibility.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solafidefarms@gmail.com</who>
            <bug_when>2008-05-04 03:57:43 0000</bug_when>
            <thetext>(In reply to comment #5)
&gt; Created an attachment (id=151747) [edit]
&gt; patch using sigaction instead of signal (no glibc-only extensions)
&gt; 
&gt; Type sighandler_t and function signal() are glibc extensions and as such do not
&gt; work on systems without glibc (for instance, Darwin/OS X). This patch uses
&gt; POSIX signal-handling functions and structs instead, for cross-platform
&gt; compatibility.
&gt; 
Apologies for not knowing where to put this patch/the correct format/etc. It&apos;s Adam Jackson&apos;s patch, updated to use the POSIX sighandlers instead.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cems@cemshost.com.br</who>
            <bug_when>2008-05-04 13:57:46 0000</bug_when>
            <thetext>I forgot to mention that rebuilding system/world worked for me. But that takes a loooong time!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dberkholz@gentoo.org</who>
            <bug_when>2008-05-05 21:21:41 0000</bug_when>
            <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; Created an attachment (id=151747) [edit]
&gt; &gt; patch using sigaction instead of signal (no glibc-only extensions)
&gt; &gt; 
&gt; &gt; Type sighandler_t and function signal() are glibc extensions and as such do not
&gt; &gt; work on systems without glibc (for instance, Darwin/OS X). This patch uses
&gt; &gt; POSIX signal-handling functions and structs instead, for cross-platform
&gt; &gt; compatibility.
&gt; &gt; 
&gt; Apologies for not knowing where to put this patch/the correct format/etc. It&apos;s
&gt; Adam Jackson&apos;s patch, updated to use the POSIX sighandlers instead.

It needs to go upstream to bugs.freedesktop.org in the xorg product. You can get the latest copy of the xserver source to patch against by running `git clone git://anongit.freedesktop.org/git/xorg/xserver`.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>151747</attachid>
            <date>2008-05-04 03:52 0000</date>
            <desc>patch using sigaction instead of signal (no glibc-only extensions)</desc>
            <filename>1.4-dont-hang-openoffice.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">VGl0bGUgICAgICAgOiB4MTEtYmFzZS94b3JnLXNlcnZlci0xLjMgYW5kIDEuNCBjb25zdW1lcyAx
MDAlIENQVSwgbG9ja2luZyB0aGUga2UKeWJvYXJkLCBhcHBhcmVudGx5IHR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jb21tYW5k
LCBjaGFyICp0eXBlKQogCXJldHVybiBOVUxMOwogICAgIH0KIAorICAgIC8qIElnbm9yZSB0aGUg
c21hcnQgc2NoZWR1bGVyIHdoaWxlIHRoaXMgaXMgZ29pbmcgb24gKi8KKyAgICBzaWdhY3Rpb24o
U0lHQUxSTSwgU0lHX0lHTiwgb2xkX2FsYXJtKTsKKwogICAgIHN3aXRjaCAocGlkID0gZm9yaygp
KSB7CiAgICAgY2FzZSAtMTogCS8qIGVycm9yICovCiAJY2xvc2UocGRlc1swXSk7CiAJY2xvc2Uo
cGRlc1sxXSk7CiAJeGZyZWUoY3VyKTsKKwlzaWdhY3Rpb24oU0lHQUxSTSwgb2xkX2FsYXJtLCBO
VUxMKTsKIAlyZXR1cm4gTlVMTDsKICAgICBjYXNlIDA6CS8qIGNoaWxkICovCiAJaWYgKHNldGdp
ZChnZXRnaWQoKSkgPT0gLTEpCkBAIC0xOTIxLDYgKzE5MjcsOCBAQCBQY2xvc2UocG9pbnRlciBp
b3ApCiAgICAgLyogYWxsb3cgRUlOVFIgYWdhaW4gKi8KICAgICBPc1JlbGVhc2VTaWduYWxzICgp
OwogICAgIAorICAgIHNpZ2FjdGlvbihTSUdBTFJNLCBvbGRfYWxhcm0sTlVMTCk7CisKICAgICBy
ZXR1cm4gcGlkID09IC0xID8gLTEgOiBwc3RhdDsKIH0KIAo=
</data>        

          </attachment>
    </bug>

</bugzilla>