NetBSD Problem Report #33680
From martin@aprisoft.de Fri Jun 9 17:21:13 2006
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id BA99563B863
for <gnats-bugs@gnats.NetBSD.org>; Fri, 9 Jun 2006 17:21:13 +0000 (UTC)
Message-Id: <20060609172107.748E5AF5824@emmas.aprisoft.de>
Date: Fri, 9 Jun 2006 19:21:07 +0200 (CEST)
From: martin@aprisoft.de
Reply-To: martin@aprisoft.de
To: gnats-bugs@NetBSD.org
Subject: xlib error on sparc64
X-Send-Pr-Version: 3.95
>Number: 33680
>Category: xsrc
>Synopsis: xlib error on sparc64
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: xsrc-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 09 17:25:00 +0000 2006
>Closed-Date: Tue Jun 20 12:45:16 +0000 2006
>Last-Modified: Tue Jun 20 13:10:02 +0000 2006
>Originator: Martin Husemann
>Release: NetBSD 3.99.21
>Organization:
>Environment:
System: NetBSD nelly.aprisoft.de 3.99.21 NetBSD 3.99.21 (NELLY) #3: Fri Jun 9 18:21:02 CEST 2006 martin@nelly.aprisoft.de:/usr/src/sys/arch/sparc64/compile/NELLY sparc64
Architecture: sparc64
Machine: sparc64
>Description:
Copy & paste sometimes kills X apps on sparc64.
>How-To-Repeat:
I can reproduce it reliably when doing:
run rxvt (from pkgsrc) with display over network on some other machine
mark some text via the left mouse button
rigth-click somewhere (inside the rxvt) after releasing the left button
with a very short delay rxvt will die: rxvt: XError: Request: 18 . 0, Error: 2
>Fix:
n/a
>Release-Note:
>Audit-Trail:
From: Matthias Scheler <tron@NetBSD.org>
To: Martin Husemann <martin@aprisoft.de>
Cc: NetBSD GNATS <gnats-bugs@NetBSD.org>
Subject: Re: xsrc/33680: xlib error on sparc64
Date: Fri, 9 Jun 2006 20:17:47 +0100
On Fri, Jun 09, 2006 at 05:25:00PM +0000, martin@aprisoft.de wrote:
> I can reproduce it reliably when doing:
>
> run rxvt (from pkgsrc) with display over network on some other machine
> mark some text via the left mouse button
> rigth-click somewhere (inside the rxvt) after releasing the left button
>
> with a very short delay rxvt will die: rxvt: XError: Request: 18 . 0, Error: 2
What makes you sure that this is not a bug in "rxvt"?
Kind regards
--
Matthias Scheler http://scheler.de/~matthias/
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: xsrc/33680: xlib error on sparc64
Date: Fri, 9 Jun 2006 21:40:31 +0200
On Fri, Jun 09, 2006 at 07:20:08PM +0000, Matthias Scheler wrote:
> What makes you sure that this is not a bug in "rxvt"?
Nothing. But this sounds like a X protocol error, and an application should
not be able to cause this.
Martin
From: Matthias Scheler <tron@NetBSD.org>
To: Martin Husemann <martin@aprisoft.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: xsrc/33680: xlib error on sparc64
Date: Fri, 9 Jun 2006 21:13:26 +0100
On Fri, Jun 09, 2006 at 07:45:02PM +0000, Martin Husemann wrote:
> The following reply was made to PR xsrc/33680; it has been noted by GNATS.
>
> From: Martin Husemann <martin@duskware.de>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: xsrc/33680: xlib error on sparc64
> Date: Fri, 9 Jun 2006 21:40:31 +0200
>
> On Fri, Jun 09, 2006 at 07:20:08PM +0000, Matthias Scheler wrote:
> > What makes you sure that this is not a bug in "rxvt"?
>
> Nothing. But this sounds like a X protocol error, and an application should
> not be able to cause this.
There are ways for an application to cause this. Besides bypassing Xlib
it could also use X11 from thread without proper locking and thereby
corrupt Xlib's internal queue.
Kind regards
--
Matthias Scheler http://scheler.de/~matthias/
From: Martin Husemann <martin@duskware.de>
To: Michael Lorenz <macallan@NetBSD.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: xsrc/33680: xlib error on sparc64
Date: Sat, 17 Jun 2006 23:02:48 +0200
I traced this a bit further: the client does a XChangeProperty() with
format=32 (which, quite funny but that's how it is documented) means "long".
Now the server decodes the request with format = 64, and returns BadValue.
Can I make the server dump the whole request packet somehow? Or the client
libx11 before sending it?
Martin
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: xsrc/33680: xlib error on sparc64
Date: Mon, 19 Jun 2006 17:14:54 +0200
I've been pointed at pkgsrc/x11/xmon and it says:
............REQUEST: ChangeProperty
sequence number: 0107
mode: Replace
request length: 000a
window: WIN 01800014
property: ATM 0000011c
type: <ATOM>
format: 20
length of data: 00000004
data: 00 00 01 72 00 00 00 1f 00 00 01 8c 00 00 01 8d
(this is with xmon running on an i386 that also runs the server)
Martin
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: xsrc/33680: xlib error on sparc64
Date: Mon, 19 Jun 2006 17:23:28 +0200
Actually (and not suprising after this results) I get the same X error
with an i386 client too.
Martin
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: xsrc/33680: xlib error on sparc64
Date: Mon, 19 Jun 2006 17:30:21 +0200
The data atoms in this dump are: TARGETS, STRING, TEXT, COMPOUND_TEXT
State-Changed-From-To: open->closed
State-Changed-By: martin@netbsd.org
State-Changed-When: Tue, 20 Jun 2006 12:45:16 +0000
State-Changed-Why:
Duh, I was looking at the wrong part of the xmon dump - it is a simple
application bug, as Tron insisted ;-)
From: Martin Husemann <martin@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/33680 CVS commit: pkgsrc/x11/rxvt
Date: Tue, 20 Jun 2006 13:07:20 +0000 (UTC)
Module Name: pkgsrc
Committed By: martin
Date: Tue Jun 20 13:07:20 UTC 2006
Modified Files:
pkgsrc/x11/rxvt: distinfo
Added Files:
pkgsrc/x11/rxvt/patches: patch-al
Log Message:
In XChangeProperty(), format = 32 means long - no matter how many bits
long has. The format value furthermore is not arbitrary, but needs to
be 8, 16 or 32. So don't pass Atom32 instead of long, or some sizeof()
calculation as format, hardcode the value and make sure the arg is
properly aligned.
Fixes PR 33680 (old problem), and an alignement related crash with gcc4
on sparc64.
To generate a diff of this commit:
cvs rdiff -r1.19 -r1.20 pkgsrc/x11/rxvt/distinfo
cvs rdiff -r0 -r1.1 pkgsrc/x11/rxvt/patches/patch-al
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.