NetBSD Problem Report #8548
Received: (qmail 2344 invoked from network); 4 Oct 1999 13:44:08 -0000
Message-Id: <199910041344.JAA08913@cowboy-burt.mcmahill.net>
Date: Mon, 4 Oct 1999 09:44:02 -0400 (EDT)
From: mcmahill@mtl.mit.edu
Reply-To: mcmahill@mtl.mit.edu
To: gnats-bugs@gnats.netbsd.org
Subject: Xsun core dumps
X-Send-Pr-Version: 3.95
>Number: 8548
>Category: xsrc
>Synopsis: Xsun core dumps
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: xsrc-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 04 06:50:01 +0000 1999
>Closed-Date: Sat Apr 24 09:50:13 +0000 2004
>Last-Modified: Sat Apr 24 09:50:13 +0000 2004
>Originator: Dan McMahill
>Release: 1.4.1
>Organization:
>Environment:
System: NetBSD cowboy-burt 1.4.1 NetBSD 1.4.1 (COWBOY-BURT) #1: Sat Oct 2 21:08:08 EDT 1999 dan@cowboy-burt:/amd/dinah-moe/export/src/sys/arch/sparc/compile/COWBOY-BURT sparc
>Description:
Xsun dumps core.
>How-To-Repeat:
run the program 'scilab' (available as math/scilab in the packages collection).
At the scilab prompt, enter:
stacksize(2000000); t=linspace(0,10,400000); plot(t,sin(t));
Xsun will crash. This only happens when plotting with a lot of points (400,000
in this case). For example,
t=linspace(0,10,40000); plot(t,sin(t));
which only does 40,000 points does not crash.
It doesn't matter if scilab is running locally or not. For example, if I run scilab
on a remote machine with the display set back to my NetBSD-1.4.1/sparc, it still crashes
Xsun. Also, I've tried this on a NetBSD-1.4.1/mac68k machine (display set to the mac)
and Xmac68k does _not_ crash.
>Fix:
none yet.
>Release-Note:
>Audit-Trail:
From: mcmahill@mtl.mit.edu
To: gnats-bugs@gnats.netbsd.org
Cc: Subject: xsrc/8548
Date: Sat, 16 Oct 1999 22:31:39 -0400 (EDT)
I noticed that the original scilab command to crash Xsun doesn't always do
it. If the first command doesn't crash Xsun, then also do the following
from the scilab prompt (after the original command):
xset("window",1);
xselect();
plot(t,cos(t));
I have managed to build Xsun with debugging info. To do this, from
/usr/src/xsrc, apply the following patch:
--- xc/config/cf/NetBSD.cf.orig Fri Jun 4 06:21:21 1999
+++ xc/config/cf/NetBSD.cf Sat Oct 16 10:48:51 1999
@@ -217,4 +217,9 @@
# define PexDynamicModule NO
# define XieDynamicModule NO
+/* DAN added this line */
+#ifdef OptimizedCDebugFlags
+#undef OptimizedCDebugFlags
+#endif
+# define OptimizedCDebugFlags -O2 -g
#endif
then from /usr/src/xsrc/xc,
make World
running Xsun under the debugger shows:
(gdb) set args :0
(gdb) run
Starting program: /usr/src/xsrc/xc/programs/Xserver/Xsun :0
Program received signal SIGSEGV, Segmentation fault.
0xd6264 in miBSPolylines (pDrawable=0x0, pGC=0x0, mode=0, npt=0,
pptInit=0x0)
at mibstore.c:1693
1693 copyPoints(pptInit, pptCopy, npt, mode);
(gdb) bt
#0 0xd6264 in miBSPolylines (pDrawable=0x0, pGC=0x0, mode=0, npt=0,
pptInit=0x0) at mibstore.c:1693
Error accessing memory address 0x38: Invalid argument.
don't know what the deal is with the 'bt' having problems. Also haven't
been able to track down what the bug is, but thought I'd add this
additional info in case anyone else could use it.
-Dan
From: Dan McMahill <mcmahill@mtl.mit.edu>
To: gnats-bugs@netbsd.org
Cc: Subject: xsrc/8548
Date: Thu, 6 Jan 2000 08:46:23 -0500 (EST)
I have also tried removing the -O2 to see if
1) bt works better in the debugger
2) Xsun works better (maybe an optimization bug?)
and the result is
1) Xsun no longer crashes (yay)
2) Xsun no longer works right :(
When I run Xsun that is compiled without -O or -O2, it starts and sort of
works, but the screen is messed up. Visually it looks like pixels that
should be written to one part of the screen end up getting written to
another part of a screen. I can pull up windows and see parts of them,
but other parts dont look right and when I move one around I get weird
artifacts that show up on other parts of the screen (and stay there). Its
a bit hard to describe any better with words.
-Dan
Date: Thu, 6 Jan 2000 14:47:27 +0000 (GMT)
From: David Brownlee <abs@netbsd.org>
Subject: Re: 8548 (Xsun Dumps core ..)
On Thu, 6 Jan 2000 mcmahill@mtl.mit.edu wrote:
| oops, and apologies for not adding the answer about -O and -O2 sooner to
| the PR. When I tried that I got:
|
No worries - ccing this to gnats-bugs so the thread should be
added to the PR.
| I have also tried removing the -O2 to see if
| 1) bt works better in the debugger
| 2) Xsun works better (maybe an optimization bug?)
|
| and the result is
| 1) Xsun no longer crashes (yay)
| 2) Xsun no longer works right :(
|
| When I run Xsun that is compiled without -O or -O2, it starts and sort of
| works, but the screen is messed up. Visually it looks like pixels that
| should be written to one part of the screen end up getting written to
| another part of a screen. I can pull up windows and see parts of them,
| but other parts dont look right and when I move one around I get weird
| artifacts that show up on other parts of the screen (and stay there). Its
| a bit hard to describe any better with words.
I know its a pain, but would it be possible to try compiling
different parts of Xsun with and without optimisation (maybe
libraries one way, and Xsun theother), to try to tack down which
files are affected?
David/absolute
Date: Tue, 11 Jan 2000 21:04:27 +1100 (EST)
From: Graham Jenkins <c714553@vus415.telstra.com.au>
Subject: Re: 8548 (Xsun Dumps core ..)
| I know its a pain, but would it be possible to try compiling
| different parts of Xsun with and without optimisation (maybe
| libraries one way, and Xsun theother), to try to tack down which
| files are affected?
Guys, did we get anywhere with this one yet? I can do some testing
if someone supplies me with binaries - or perhaps even compile if I
can find the source for Xsun.
Is is likely that the OpenBSD version of Xsun would execute OK
on NetBSD 1.4.1?
G.
Date: Tue, 11 Jan 2000 18:08:48 -0500 (EST)
From: Brad Spencer <brad@anduin.eldar.org>
Subject: Re: 8548 (Xsun Dumps core ..)
> I know its a pain, but would it be possible to try compiling
> different parts of Xsun with and without optimisation (maybe
> libraries one way, and Xsun theother), to try to tack down which
> files are affected?
Guys, did we get anywhere with this one yet? I can do some testing
if someone supplies me with binaries - or perhaps even compile if I
can find the source for Xsun.
Is is likely that the OpenBSD version of Xsun would execute OK
on NetBSD 1.4.1?
G.
I don't know about the Sparc ports, but the last time I tried an
OpenBSD/i386 binary on a NetBSD/i386-current system, it dropped core with
an unimplemented system call. A quick look at the syscalls.master files
between the two systems would seem to indicate that the some of the system
calls have different system call numbers, or are unimplemented. Further,
it appears that an OpenBSD binary looks like a NetBSD binary, at least
'file' was confused, and comparing the magic databases between a NetBSD
and an older 2.0ish OpenBSD system indicated that all that changed was the
strings that the magic numbers mapped to.
Brad Spencer - brad@anduin.eldar.org http://anduin.eldar.org
[finger brad@anduin.eldar.org for PGP public key]
Date: Sun, 16 Jan 2000 13:21:48 +0000 (GMT)
From: David Brownlee <abs@netbsd.org>
Subject: RE: port-sparc/8548 (Xsun Dumps core ..)
On Wed, 12 Jan 2000, Jenkins, Graham K [IBM GSA] wrote:
| Is it of any use if I send either or both of you an ordinary Xsun core dump
| which I captured this afternoon?
Probably not :(
I'm going to see if I can dig up enough space on my sparc10 to
try compiling up the latest -release NetBSD/sparc tools and
the latest NetBSD xsrc to see if the problem is still present.
(This may take some time :/
David/absolute
Date: Sun, 16 Jan 2000 23:47:51 +0000 (GMT)
From: David Brownlee <abs@netbsd.org>
Subject: RE: port-sparc/8548 (Xsun Dumps core ..)
Ha - I'm unlikely to have anything fixed unless the answer
drops out of the sky :)
My sparc10 is running a release kernel and is chewing through
updating the userland inc compiler, after which it starts on
the latest xsrc. (I don't really want to leap to ELF and -current
on it right now :)
David/absolute
Date: Mon, 17 Jan 2000 18:56:07 -0500 (EST)
From: mcmahill@mtl.mit.edu
Subject: port-sparc/8548
hmm. most interesting.
---------- Forwarded message ----------
Date: Tue, 18 Jan 2000 09:43:15 +1100 (EST)
From: Graham Jenkins <c714553@vus415.telstra.com.au>
To: abs@netbsd.org
Cc: mcmahill@mtl.mit.edu, port-sparc@netbsd.org
Subject: Re: Source for Xsun
> Random, random, random thought - what happens if you 'unlimit'
> before running the X server? (I don't expect it to fix it, but
> its a hunch :)
David, you should have random thoughts more often! This particular one
seems to have solved my immediate problem. I tried hard to break it this
morning, and couldn't. Does this indicate something that now needs to be
done to 'Xsun' .. or what ?
'unlimit' is not actually available to me under 'ksh' so I used the following
code segment:
for P in d s l m n p ; do
ulimit -$P `ulimit -H$P`
done
diff ulimit.before ulimit.after
3,4c3,4
< data(kbytes) 65536
< stack(kbytes) 512
---
> data(kbytes) 262144
> stack(kbytes) 262144
7,9c7,9
< locked memory(kbytes) 4350
< process(processes) 80
< nofiles(descriptors) 64
---
> locked memory(kbytes) 13052
> process(processes) 532
> nofiles(descriptors) 1772
State-Changed-From-To: open->analyzed
State-Changed-By: fair
State-Changed-When: Thu Jan 20 00:17:59 PST 2000
State-Changed-Why:
temporary work-around found - raise RAM limits.
State-Changed-From-To: analyzed->closed
State-Changed-By: pk
State-Changed-When: Sat Apr 24 09:46:38 UTC 2004
State-Changed-Why:
Default stack size limit has been increased from 512K -> 2M a while back.
(Future releases may increase the default limit to 8M).
>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.