Date: Sun, 27 Jun 1999 23:54:06 +0800 From: Peter Wemm <peter@netplex.com.au> To: Doug Rabson <dfr@nlsystems.com>, alpha@freebsd.org Subject: Re: Hmm!! Message-ID: <19990627155406.CCF9181@overcee.netplex.com.au> In-Reply-To: Your message of "Sun, 27 Jun 1999 22:11:24 %2B0800." <19990627141124.710CA81@overcee.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm wrote:
> Doug Rabson wrote:
> > On Sun, 27 Jun 1999, Peter Wemm wrote:
> [..]
> > > Anybody got any bright ideas about this? (apart from run the memory test
er
> > > in SRM that is..)
> >
> > Maybe the kernel doesn't fit in its memory region? You could try enabling
> > the debug printfs in alpha_init() where it reads the memory cluster
> > information.
>
> Another datapoint:
>
> # /bin/cat
> Jun 27 22:01:19 ashburton /kernel: pid 23490 (cat), uid 0: exited on signal 1
1 (core dumped)
> Segmentation fault - core dumped
> # /bin/cat
> foo
> foo
> #
>
> The interesting thing is that according to the coredumps, it consistantly
> appears to die in the first getenv() inside setlocale() when walking the
> environ list. It's being a damn nuisance to check because the slightest
> change makes it work.. ie: under truss or ktrace, gdb, etc, it works fine.
> Multiple different cat binaries all do this - including one I compiled with
> -g - but they only misbehave under /bin/sh. Something funny about the
> environment passing perhaps?
>
> This is on the small kernel BTW, so the size of the kernel seems to affect
> things, but not eliminate the problems.
>
> Cheers,
> -Peter
This is getting stranger by the minute...
If I do this to cat.c:
main() {
...
write(1, "A", 1);
setlocale(LC_CTYPE, "");
write(1, "A", 1);
...
Then it works. If I take away either added write() syscall, it fails.
If I change it to this, it works too:
setlocale(LC_CTYPE, "");
write(1, "A", 1);
while ((ch = getopt(argc, argv, "benstuv")) != -1) {
write(1, "A", 1);
switch (ch) {
.. even though the second write() is never executed.
If I compile without optimization, cat seems to work always. This is
bizzare. Why cat? Why with the different kernels does it pick mount_nfs
or sysctl to screw up, and only then when called from /bin/sh.
I have saved a copy of the (-O) assembler code from a working and non-working
version of cat.c. (reminder: it only fails when run from sh, eg in /etc/rc
or under make.)
Oh, also, according to the console:
pal VMS PALcode V1.20-5, OSF PALcode V1.22-6
version V5.1-4 Feb 12 1998 15:40:06
If I look at the firmware updates directory, the current 5_4 release is
labelled:
+++++++++++++++++++++++++++++++++++++++ April 1999
+ AlphaPC 164SX Firmware +
+ README-FIRST +
+++++++++++++++++++++++++++++++++++++++
1. Latest Firmware Update Revisions
SRM V5.4-1
VMS PALcode V1.20-6
Unix PALcode V1.22-6
The Unix palcode is the same version, but the SRM release is a newer. Does
it seem worthwhile to try to update SRM?
Cheers,
-Peter
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990627155406.CCF9181>
