NetBSD Problem Report #43844

From bad@bsd.de  Mon Sep  6 21:31:14 2010
Return-Path: <bad@bsd.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id D5F4363BC49
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  6 Sep 2010 21:31:14 +0000 (UTC)
Message-Id: <20100906213142.C6C9F85@limiting-factor.k.bsd.de>
Date: Mon,  6 Sep 2010 23:31:42 +0200 (MEST)
From: bad@bsd.de
Reply-To: bad@bsd.de
To: gnats-bugs@gnats.NetBSD.org
Subject: Xorg locks up running xkbcomp from the server
X-Send-Pr-Version: 3.95

>Number:         43844
>Category:       xsrc
>Synopsis:       Xorg deadlocks running xkbcomp from the server
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 06 21:35:00 +0000 2010
>Originator:     Christoph Badura
>Release:        NetBSD 5.0_STABLE/ netbsd-5 xsrc as of 2010-04-03
>Organization:
netbsd bozotic software test labs
>Environment:
System: NetBSD limiting-factor 5.0_STABLE NetBSD 5.0_STABLE (nervous-energy) #28: Sun Apr 4 18:51:42 UTC 2010 root@youll-thank-me-later:/m/obj/m/src/sys/arch/i386/compile/nervous-energy i386
Architecture: i386
Machine: i386
>Description:

The X server often deadlocks shortly after starting soffice.
A prerequisite is using "xconsole" or "xterm -C" to redirect console output
to a window.

The first time soffice displays one of the drop-down menues from the menubar
it queries the X server for the keyboard layout to determine the menu
accelerators.  This causes the Xorg server to spawn xkbcomp and wait for
it to finish.  xkbcomp's stderr is connected to /dev/console.  If xkbcomp
outputs warning messages, xconsole/"xterm -C" will wait indefinitely
for the X server to render the output.  If xkbcomp outputs enough warning
messages, it will become blocked because the pty input queue for /dev/console
will have TTYHOG(1024) waiting to be read.  At this point Xorg, xkbcomp,
xconsole/"xterm -C" will be deadlocked waiting for each other to make
progress.

Killing the xkbcomp process and its parent shell is one way to break the lock.
But this can't be done from the graphics console as VT switching (CTL-ALT-Fn)
doesn't work because the X server is blocked waiting for xkbcomp to terminate.

On my system the xkbcomp warning messages look like this:

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Duplicate shape name
>                   Using last definition
> Warning:          Duplicate shape name
>                   Using last definition
...
> Warning:          Multiple doodads named ""
>                   Using first definition
> Warning:          Multiple doodads named ""
>                   Using first definition
> Warning:          Multiple doodads named ""
>                   Usi

My xorg.conf has the following keyoard configuration statements:

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option      "XkbLayout" "us,de,mn"
	Option      "XKbOptions" "grp:alt_shift_toggle"
EndSection

Bernd Ernesti reported the problem in the following message:
http://mail-index.netbsd.org/tech-x11/2010/04/02/msg000752.html

As of yesterday the Xorg server in the upstream repository still spawned
xkbcomp.

>How-To-Repeat:

xconsole &
soffice
# move mouse over "File" label in menu bar.

>Fix:

running "setxkbcomp" without arguments before starting soffice (e.g. from
.xinitrc) makes the problem go away.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.