* Random sig[segv|fpe] on 164LX with 256MB RAM
@ 1998-09-22 6:07 Andrew Hobgood
1998-09-22 12:39 ` Dave Gilbert
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Hobgood @ 1998-09-22 6:07 UTC (permalink / raw)
To: axp-list
Hey all...
Okay... here's the deal. I'm running RH5.1 on a 21164A 533MHz, with 256MB
of RAM. Now, it seems that when my "free" memory (like, really free, not
free buffers) gets below about 10MB (this happens regularly because of the
way Linux allocates cache)... things start to almost randomly segfault and
sigfpe. Now, this usually isn't TOO big of a problem (I've written a quick
script to wrap around some smaller programs, like mpg123, etc. to intercept
and ignore the FPE's and SEGV's), but sometimes things like, oh, rxvt
decide to thrash themselves, then my X server croaks.
It's starting to get *really* annoying, and I'm wondering if anyone knows
of:
A) A program that will let me check my memory for errors to see what's going
on (ala memtest86, but for the Alpha)
B) Any sorts of fixes for this kind of stuff (compile flags? kernel patches?
hardware fixes? Pagan sacrifices of virgin Intel users?) that will
keep it from happening?
Well, thanks in advance...
/Andrew
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Random sig[segv|fpe] on 164LX with 256MB RAM
1998-09-22 6:07 Random sig[segv|fpe] on 164LX with 256MB RAM Andrew Hobgood
@ 1998-09-22 12:39 ` Dave Gilbert
1998-09-22 17:25 ` Andrew Hobgood
0 siblings, 1 reply; 9+ messages in thread
From: Dave Gilbert @ 1998-09-22 12:39 UTC (permalink / raw)
To: Andrew Hobgood; +Cc: axp-list
On Tue, 22 Sep 1998, Andrew Hobgood wrote:
I experienced the same problem as you when I moved from 64MB to 320MB in
my LX.
I've since replaced the RAM with PC100 RAM and all is OK; however I do
find it very suspicious that the problem only really surfaces when using
almost all of the RAM or doing heavy X work.
> A) A program that will let me check my memory for errors to see what's going
> on (ala memtest86, but for the Alpha)
Below is Dave's magical all encompassing RAM tester, fiddle with the size
at the top so it almost fills RAM and then let it rip. I'd be interested
to see the errors you encounter; I almost always saw extra bits set
somewhere in the top bits of the word.
#include <stdio.h>
#include <stdlib.h>
#define SIZE (72*1024*1024*sizeof(int))
int main() {
volatile int * volatile pl=(int *)malloc(SIZE);
int a;
int s;
int sum1,sum2;
for(s=1056;;s++) {
printf("Filling with seed of s=0x%x \n",s);
srandom(s);
sum1=0;
for(a=0;a<(SIZE/sizeof(int));a++) {
int tmp1=random();
sum1+=tmp1;
pl[a]=tmp1;
};
srandom(s);
printf("Testing with seed of s=0x%x \n",s);
for(a=0,sum2=0;a<(SIZE/sizeof(int));a++) {
int tmp1=random();
int tmp2=pl[a];
sum2+=tmp1;
if (tmp1!=tmp2) {
fprintf(stderr,"MISMATCH ERROR! at a=0x%x (random=0x%x array=0x%x
reread=0x%x seed=
0x%x)\n",a,tmp1,tmp2,pl[a],s);
};
};
printf("Completed pass with seed of s=0x%x sum1=0x%x
sum2=0x%x\n",s,sum1,sum2);
if (sum1!=sum2) {
printf("Internal inconsistency! Sums differ! sum1=0x%x
sum2=0x%x\n",sum1,sum2);
exit(2);
};
};
};
> B) Any sorts of fixes for this kind of stuff (compile flags? kernel patches?
> hardware fixes? Pagan sacrifices of virgin Intel users?) that will
> keep it from happening?
Yes - I found Pagan sacrifices of Intel users to be very pleasent; if not
effective.
Dave
--------------------------------------------------------------------
/ Dr. David Alan Gilbert | Running Linux on Alpha(LX) | Happy \
\ gro.gilbert @ treblig.org | & ARM(EBSA285,old Arc) | In Hex /
\____________________________|___ http://www.treblig.demon.co.uk __/
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Random sig[segv|fpe] on 164LX with 256MB RAM
1998-09-22 12:39 ` Dave Gilbert
@ 1998-09-22 17:25 ` Andrew Hobgood
1998-09-22 17:28 ` Andrew Hobgood
1998-09-23 0:04 ` Dam Thanh Son
0 siblings, 2 replies; 9+ messages in thread
From: Andrew Hobgood @ 1998-09-22 17:25 UTC (permalink / raw)
To: Dave Gilbert; +Cc: axp-list
> Below is Dave's magical all encompassing RAM tester, fiddle with the size
> at the top so it almost fills RAM and then let it rip. I'd be interested
> to see the errors you encounter; I almost always saw extra bits set
> somewhere in the top bits of the word.
schizo:~# gcc -o memtest memtest.c
schizo:~# ./memtest
Filling with seed of s=0x420
memtest: memory violation at pc=120000900 rp=1200008c8 (bad address = 00000000)
Segmentation fault (core dumped)
It does that regardless of the memory size I give it. This is with 2.0.35,
because I can't get any of the 2.1.x kernels to even compile on this box.
Heh... this is fun. =)
That bad address line seems to be present whenever something dies on me from
a segfault. Any ideas?
> Yes - I found Pagan sacrifices of Intel users to be very pleasent; if not
> effective.
Herm... my roommate is an Intel user... <smirk>
/Andrew
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Random sig[segv|fpe] on 164LX with 256MB RAM
1998-09-22 17:25 ` Andrew Hobgood
@ 1998-09-22 17:28 ` Andrew Hobgood
1998-09-23 0:04 ` Dam Thanh Son
1 sibling, 0 replies; 9+ messages in thread
From: Andrew Hobgood @ 1998-09-22 17:28 UTC (permalink / raw)
To: axp-list
> schizo:~# gcc -o memtest memtest.c
> schizo:~# ./memtest
> Filling with seed of s=0x420
> memtest: memory violation at pc=120000900 rp=1200008c8 (bad address = 00000000)
> Segmentation fault (core dumped)
I love replying to my own messages... here's some more info on the coredump:
schizo:~# gcc -ggdb -o memtest memtest.c
schizo:~# ./memtest
Filling with seed of s=0x420
memtest: memory violation at pc=120000900 rp=1200008c8 (bad address = 00000000)
Segmentation fault (core dumped)
schizo:~# gdb ./memtest core
GNU gdb 4.17
<snip gdb copyright message>
Core was generated by `./memtest'.
Program terminated with signal 11, Segmentation fault.
#0 0x120000900 in main () at memtest.c:22
22 pl[a]=tmp1;
(gdb) quit
Just in case that helps.
/Andrew
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Random sig[segv|fpe] on 164LX with 256MB RAM
1998-09-22 17:25 ` Andrew Hobgood
1998-09-22 17:28 ` Andrew Hobgood
@ 1998-09-23 0:04 ` Dam Thanh Son
1998-09-23 4:27 ` Michal Jaegermann
1998-09-23 10:10 ` David Alan Gilbert
1 sibling, 2 replies; 9+ messages in thread
From: Dam Thanh Son @ 1998-09-23 0:04 UTC (permalink / raw)
To: axp-list
On Tue, 22 Sep 1998, Andrew Hobgood wrote:
> schizo:~# gcc -o memtest memtest.c
> schizo:~# ./memtest
> Filling with seed of s=0x420
> memtest: memory violation at pc=120000900 rp=1200008c8 (bad address = 00000000)
> Segmentation fault (core dumped)
I have exactly the same result on my UDB (48MB RAM) with egcs-1.0.2. Same
addresses. When using egcs-1.1b instead of the stock egcs-1.0.2, the
addresses are slightly different:
memtest: memory violation at pc=12000093c rp=120000904 (bad address =
00000000)
Is it a hardware or a software issue??
I also discovered that egcs-1.1 fails to compile the kernel on my machine
(with PPP support). It stumbled on drivers/net/slhc.c with the following
error (sorry for line wraps)
gcc -D__KERNEL__ -I/usr/src/linux-2.0.35/include -Wall
-Wstrict-prototypes -O2 -
fomit-frame-pointer -fno-strength-reduce -pipe -mno-fp-regs -Wa,-m21164a
-DBWX_USABLE -c -o slhc.o slhc.c
{standard input}: gcc: Internal compiler error: program cc1 got fatal
signal 11
make[3]: *** [slhc.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.0.35/drivers/net'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.0.35/drivers/net'
make[1]: *** [sub_dirs] Error 2
make[1]: Leaving directory `/usr/src/linux-2.0.35/drivers'
make: *** [linuxsubdirs] Error 2
[root@localhost linux]# Assembler messages:
{standard input}:0: Warning: end of file not at end of a line; newline
inserted
{standard input}:531: Error: unknown opcode `'
The message in /var/log/messages reads:
Sep 22 01:52:54 localhost kernel: cc1: memory violation at pc=120106050
rp=120106170 (bad address = 11f7fffa0)
I compiled the kernel without problem with egcs-1.0.2.
May these two things be connected? I have standard RH5.1 with updates.
Son.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Random sig[segv|fpe] on 164LX with 256MB RAM
1998-09-23 0:04 ` Dam Thanh Son
@ 1998-09-23 4:27 ` Michal Jaegermann
1998-09-23 6:49 ` Peter Rye
1998-09-23 10:10 ` David Alan Gilbert
1 sibling, 1 reply; 9+ messages in thread
From: Michal Jaegermann @ 1998-09-23 4:27 UTC (permalink / raw)
To: axp-list
>
> I also discovered that egcs-1.1 fails to compile the kernel on my machine
> (with PPP support). It stumbled on drivers/net/slhc.c with the following
> error (sorry for line wraps)
It compiles if you will drop an optimization (on this one particular
object file **only**) to -O. This is an optimizer bug.
> gcc -D__KERNEL__ -I/usr/src/linux-2.0.35/include -Wall
> -Wstrict-prototypes -O2 -
> fomit-frame-pointer -fno-strength-reduce -pipe -mno-fp-regs -Wa,-m21164a
> -DBWX_USABLE -c -o slhc.o slhc.c
> {standard input}: gcc: Internal compiler error: program cc1 got fatal
> signal 11
I reported this problem to egcs-bugs@cygnus.com in early June (for
one of snapshots at that time) and re-filed a bug report, this time
against 1.1b, some three weeks ago. Unfortunately nothing happened
that I would be aware of. The latest snapshot still suffers the
same way.
> May these two things be connected?
It does not look that way. :-) The first problem should be pretty
easy to trace with a help of a review of the code and maybe a bit of gdb.
> I have standard RH5.1 with updates.
This happens to be not relevant to the egcs bug.
Michal
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Random sig[segv|fpe] on 164LX with 256MB RAM
1998-09-23 4:27 ` Michal Jaegermann
@ 1998-09-23 6:49 ` Peter Rye
0 siblings, 0 replies; 9+ messages in thread
From: Peter Rye @ 1998-09-23 6:49 UTC (permalink / raw)
To: axp-list
>>>>> "Michal" == Michal Jaegermann <michal@ellpspace.math.ualberta.ca> writes:
(Disussion about relationship between failed kernel compile and seg fault
in "memtest" program)
>> May these two things be connected?
Michal> It does not look that way. :-) The first problem should be
Michal> pretty easy to trace with a help of a review of the code and
Michal> maybe a bit of gdb.
The "memtest" program also fails here if the SIZE is defined too high.
You'll note in the first few lines the malloc is not tested for its return
value. This is where it fails here.
#include <stdio.h>
#include <stdlib.h>
#define SIZE (20*1024*1024*sizeof(int))
int main() {
volatile int * volatile pl=(int *)malloc(SIZE);
^^
...then goes on to use the null pointer...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Random sig[segv|fpe] on 164LX with 256MB RAM
1998-09-23 0:04 ` Dam Thanh Son
1998-09-23 4:27 ` Michal Jaegermann
@ 1998-09-23 10:10 ` David Alan Gilbert
1998-09-23 15:27 ` Andrew Hobgood
1 sibling, 1 reply; 9+ messages in thread
From: David Alan Gilbert @ 1998-09-23 10:10 UTC (permalink / raw)
To: axp-list
Dam Thanh Son wrote:
>
> On Tue, 22 Sep 1998, Andrew Hobgood wrote:
>
> > schizo:~# gcc -o memtest memtest.c
> > schizo:~# ./memtest
> > Filling with seed of s=0x420
> > memtest: memory violation at pc=120000900 rp=1200008c8 (bad address = 00000000)
> > Segmentation fault (core dumped)
> memtest: memory violation at pc=12000093c rp=120000904 (bad address =
> 00000000)
>
> Is it a hardware or a software issue??
STOP! STOP!!!
This is failing because it has failed to allocate the amount of memory its
asked for (Note to me for the future: Don't post programs you hacked together
for yourself to maillists without putting simple checks in...)
Just check what hte malloc is returning, if its returning NULL then its failed;
turn down that nice friendly SIZE parameter at the top.
If the memory test fails it will print a pair of values, the value it expected
and the value it got back with a big furry error about comparison failing.
Dave
--
----------------------------------------------------------------------
- Dr. David Alan Gilbert - WARNING! This is a beta release .signature-
- Work: dg @ cogency.co.uk - +44-(0)161-428-9444 -
- Home: gro.gilbert @ treblig.org - -
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Random sig[segv|fpe] on 164LX with 256MB RAM
1998-09-23 10:10 ` David Alan Gilbert
@ 1998-09-23 15:27 ` Andrew Hobgood
0 siblings, 0 replies; 9+ messages in thread
From: Andrew Hobgood @ 1998-09-23 15:27 UTC (permalink / raw)
To: axp-list
> > > Filling with seed of s=0x420
> > > memtest: memory violation at pc=120000900 rp=1200008c8 (bad address = 00000000)
> > > Segmentation fault (core dumped)
>
> STOP! STOP!!!
I did, as soon as I recognized what was going on. =P
> Just check what hte malloc is returning, if its returning NULL then its failed;
> turn down that nice friendly SIZE parameter at the top.
As I did... I incrementally tried values until it'd drive me to just the edge
of swapping out.
> If the memory test fails it will print a pair of values, the value it expected
> and the value it got back with a big furry error about comparison failing.
And as a reference point, I got no furry errors through about, oh 0x100 seeds.
So it *seems* like my memory is just fine. Any other theories for my random
segfaults and fpe's?
I've got some additional data... an rxvt croaked on me yesterday...
Sep 23 01:49:04 schizo kernel: rxvt: memory violation at pc=155559fc1ec rp=15555
9f9d90 (bad address = 60000000)
I hope that someone can recognize the error and give me a way to fix it. As
far as I know, the Aspen Systems people wouldn't be giving me broken RAM, and
that's backed up by Dave's memtester.
/Andrew
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~1998-09-23 19:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-09-22 6:07 Random sig[segv|fpe] on 164LX with 256MB RAM Andrew Hobgood
1998-09-22 12:39 ` Dave Gilbert
1998-09-22 17:25 ` Andrew Hobgood
1998-09-22 17:28 ` Andrew Hobgood
1998-09-23 0:04 ` Dam Thanh Son
1998-09-23 4:27 ` Michal Jaegermann
1998-09-23 6:49 ` Peter Rye
1998-09-23 10:10 ` David Alan Gilbert
1998-09-23 15:27 ` Andrew Hobgood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox