Subject: Re: Xkernel/sun: bad system call
To: Olaf Seibert <rhialto@polderland.nl>
From: Bill Studenmund <wrstuden@zembu.com>
List: current-users
Date: 06/06/2000 14:54:35
On Tue, 6 Jun 2000, Olaf Seibert wrote:

> I am using Xkernel for my Sun 3/50 and occasionally Xsun crashes with
> the error message "bad system call". This is repeatable and happens with
> some programs like gtk-gnutella, or mpeg_play.

Try ktracing Xsun. You can tweak the ktrace settings to concentrate only
on system calls and say name lookups. "ktrace -i -t cn <whatever starts
X>" should create a log which shows what happens. The -i means trace
all new children of this process ("inherit" the ktrace attribute), and -t
cn means only trace system calls and namei translations. Then just run the
program which causes the problem, and let it crash.

Then kdump > some_file . some_file (which might be big) will contian a log
of all of the system calls. Towards the bottom will be there the error
happened (assuming the program does very little after it starts to
die). Look at which system call returned the error, and that sould show
what's wrong.

Another option might be to start X, then "ktrace -t cn -p <pid of
Xsun>". Then cause the error. This would give you a smaller log file.

Note you'll need to own the process being ktraced. So if it's suid root,
you should be root before doing the ktrace.

Take care,

Bill