* program that crash alpha machine
@ 1997-10-24 15:51 Ming Chu
1997-10-24 17:46 ` Tom Browder
0 siblings, 1 reply; 8+ messages in thread
From: Ming Chu @ 1997-10-24 15:51 UTC (permalink / raw)
Hi, we have a simple program that crashes our alpha linux boxes
(Redhat 4.2) when run. The program is a Fortran program
translated by f2c and statically linked. Bellow is the program
and its translated c code. Any help, suggestions or ideas would
be greatly appreciated.
translate and link:
f2c testf1.f
gcc -o testf1 testf1.c -lf2c -static
When run testf1, it will crash our alpha machines. If you need
the binary file or additional information, I will email it to you.
Thanks.
Ming
Fortran program testf1.f:
============================================================
program test
c-----------------------------------------------------------------------
integer i
integer*2 i2
real*4 r4
real*8 r8
c-----------------------------------------------------------------------
do i = 1, 10
i2 = i
r4 = i
r8 = i
write(6,*) i,i2,r4,r8
enddo
end
f2c translation testf1.c:
============================================================
/* testf1.f -- translated by f2c (version 19970805).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__3 = 3;
static integer c__1 = 1;
static integer c__2 = 2;
static integer c__4 = 4;
static integer c__5 = 5;
/* Main program */ MAIN__()
{
/* Builtin functions */
integer s_wsle(), do_lio(), e_wsle();
/* Local variables */
static integer i__;
static shortint i2;
static real r4;
static doublereal r8;
/* Fortran I/O blocks */
static cilist io___5 = { 0, 6, 0, 0, 0 };
/*
-----------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------
*/
for (i__ = 1; i__ <= 10; ++i__) {
i2 = (shortint) i__;
r4 = (real) i__;
r8 = (doublereal) i__;
s_wsle(&io___5);
do_lio(&c__3, &c__1, (char *)&i__, (ftnlen)sizeof(integer));
do_lio(&c__2, &c__1, (char *)&i2, (ftnlen)sizeof(shortint));
do_lio(&c__4, &c__1, (char *)&r4, (ftnlen)sizeof(real));
do_lio(&c__5, &c__1, (char *)&r8, (ftnlen)sizeof(doublereal));
e_wsle();
}
} /* MAIN__ */
/* Main program alias */ int test_ () { MAIN__ (); }
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: program that crash alpha machine
1997-10-24 15:51 Ming Chu
@ 1997-10-24 17:46 ` Tom Browder
0 siblings, 0 replies; 8+ messages in thread
From: Tom Browder @ 1997-10-24 17:46 UTC (permalink / raw)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: program that crash alpha machine
@ 1997-10-24 17:46 Tom Browder
0 siblings, 0 replies; 8+ messages in thread
From: Tom Browder @ 1997-10-24 17:46 UTC (permalink / raw)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: program that crash alpha machine
[not found] <Pine.LNX.3.95.971024124553.4089A-100000@tomtom.asi-fwb.com>
@ 1997-10-24 21:06 ` Ming Chu
1997-10-25 21:35 ` Harvey J. Stein
1 sibling, 0 replies; 8+ messages in thread
From: Ming Chu @ 1997-10-24 21:06 UTC (permalink / raw)
Hi Tom,
I did. My version is 19970805. I also recompiled the libf2c.a which
causes the crash.
Thanks.
Ming
On Fri, 24 Oct 1997 12:46:39 -0500 (CDT), you wrote:
From a previous similar problem:
>
>
From martonak@nero.physik.uni-mainz.de Fri Oct 24 12:45:22 1997
>Date: Sun, 19 Oct 1997 17:10:04 +0200 (CES)
>From: Roman Martonak <martonak@nero.physik.uni-mainz.de>
>Reply-To: axp-list@redhat.com
>To: axp-list@redhat.com
>Subject: Re: f2c on linux/alpha working?
>Resent-Date: 19 Oct 1997 15:12:58 -0000
>Resent-From: axp-list@redhat.com
>Resent-cc: recipient list not shown: ;
>
>>
>> Is anyone using f2c on linux/alpha? I'm seeing a weird problem when
>> compiling some code:
>>
>> hjstein@blaster:~/pascal/oas$ f2c j4save.f
>> j4save.f:
>> j4save:
>> Compiler error line 65 of j4save.f: floating exception during constant evaluation; cannot recover
>
>You should compile f2c from the sources at netlib.bell-labs.com (/netlib/f2c) and
>it works now fine, they have already included the patch correcting the above problem.
>
> Roman Martonak
> Johannes Gutenberg-Universit"at
> Institut f"ur Physik, WA 331 tel.: +49 +6131 393323
> D-55099 Mainz fax.: +49 +6131 395441
> Germany e-mail: martonak@nero.physik.uni-mainz.de
>
>--
>To unsubscribe: send e-mail to axp-list-request@redhat.com with
>'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
>
>
>Tom Browder
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: program that crash alpha machine
[not found] <Pine.LNX.3.95.971024124553.4089A-100000@tomtom.asi-fwb.com>
1997-10-24 21:06 ` program that crash alpha machine Ming Chu
@ 1997-10-25 21:35 ` Harvey J. Stein
1997-10-27 6:38 ` Richard Henderson
1 sibling, 1 reply; 8+ messages in thread
From: Harvey J. Stein @ 1997-10-25 21:35 UTC (permalink / raw)
Tom Browder writes:
> >
> > Is anyone using f2c on linux/alpha? I'm seeing a weird problem when
> > compiling some code:
> >
> > hjstein@blaster:~/pascal/oas$ f2c j4save.f
> > j4save.f:
> > j4save:
> > Compiler error line 65 of j4save.f: floating exception during constant evaluation; cannot recover
>
> You should compile f2c from the sources at netlib.bell-labs.com (/netlib/f2c) and
> it works now fine, they have already included the patch correcting the above problem.
I work with Ming (who reported that a simple program compiled with f2c
was crashing the machine).
But in any case, if a program compiled by f2c/gcc crashes the machine,
I wouldn't call it an f2c bug. It's either a kernel bug (badly
compiled kernels included) or a hardware problem. And it'd be funny
if it's hardware because we have it on both of our alphas (both 533mhz
164LXs).
The crash looks similar to one reported recently on this list by Shane
DeRidder <shane@together.net>. The console starts spewing out lines
like:
0 0000000000000198 0000019800000110
10 0000000100000084 00000001201dc850
20 000006f800000000 ffffffffffffffff
30 ffffffffffffffff 0000015555cac5b0
40 0000000120535690 00000155557c1db8
50 0000000120534ed2 0000000000000008
...
The machine responds to pings. The keyboard isn't dead (the capslock
key toggles the keyboard capslock light), but the machine doesn't
respond to control-alt-delete, can't be telnetted into, won't switch
virtual consoles...
So, anyone want to try to track down this problem? As Ming said, we
can email you the statically linked binary, or we can upload it to
you, or we can get you all the associated C code (patches against
f2c), or ...
--
Harvey J. Stein
Berger Financial Research
hjstein@bfr.co.il
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: program that crash alpha machine
1997-10-25 21:35 ` Harvey J. Stein
@ 1997-10-27 6:38 ` Richard Henderson
0 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 1997-10-27 6:38 UTC (permalink / raw)
On Sat, Oct 25, 1997 at 11:35:26PM +0200, Harvey J. Stein wrote:
> But in any case, if a program compiled by f2c/gcc crashes the machine,
> I wouldn't call it an f2c bug. It's either a kernel bug ...
It was in fact a bug in the unaligned access routines created
by one version of the em86 patches. It has been fixed; patches
were posted here, once upon a time.
r~
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: program that crash alpha machine
[not found] <19971026223849.05810@dot.cygnus.com>
@ 1997-10-27 16:59 ` Harvey J. Stein
0 siblings, 0 replies; 8+ messages in thread
From: Harvey J. Stein @ 1997-10-27 16:59 UTC (permalink / raw)
Richard Henderson writes:
> On Sat, Oct 25, 1997 at 11:35:26PM +0200, Harvey J. Stein wrote:
> > But in any case, if a program compiled by f2c/gcc crashes the machine,
> > I wouldn't call it an f2c bug. It's either a kernel bug ...
>
> It was in fact a bug in the unaligned access routines created
> by one version of the em86 patches. It has been fixed; patches
> were posted here, once upon a time.
I searched axp-list for the word patch, and read all the messages from
1997 (took a *long* time...), but didn't seem to find the patch,
except for some stuff on ftp://genie.ucd.ie/pub/alpha/kernel/, in
particular ftp://genie.ucd.ie/pub/alpha/kernel/my_patches/traps.diff.
Is this the patch you're refering to?
In any case, I unpacked a pristine kernel 2.0.30. I patched it with
ftp://ftp.digital.com/pub/DEC/Linux-Alpha/em86/v0.2/kernel-patches/alpha-patches-2.0.30-0.2a.gz.
I configured & compiled it & was able to boot successfully, and things
seemed to be running ok.
However, a) the trap problem remained, and b) I started having header
trouble when compiling things. In particular, including
<sys/resource.h> seemed to give lots of problems.
At this point, even after scouring axp-list & the
axp-kernel-compiling-howto (which seems somewhat out of date, btw),
I'm still having trouble understanding what libs & kernels & patches
are compatible.
I presumably am running glibc2 - rpm reports I'm using glibc-0.961212-5
and glibc-devel-0.961212-5 (rh 4.2). So,
1. Are these compatible with an unpatched kernel 2.0.30? What
about 2.0.31? What about the 2.1 series?
2. Do I need alpha-patches-2.0.30-0.2a.gz, or do I just need it for
em86? Is it compatible with the above setup?
3. alpha-patches-2.0.30-0.2a.gz is pretty new, so I had assumed it
included all well known bug fixes. I take it this isn't the
case? If not, is it going to get fixed?
4. My /usr/include header files seem to include things from
<linux/...> and <asm/...>. I thought someone mentioned that
glibc2 no longer depends on kernel header files. What's the
story here?
5. Should I upgrade/change my glibc? Is there an appropriate RPM
or should I build it from scratch? Will doing so break
anything?
I'm going to see what happens when running an unpatched 2.0.30 &
2.0.31 kernel next.
Thanks,
--
Harvey J. Stein
Berger Financial Research
hjstein@bfr.co.il
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: program that crash alpha machine
[not found] <199710271659.SAA00792@blinky.bfr.co.il>
@ 1997-10-27 20:32 ` Richard Henderson
0 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 1997-10-27 20:32 UTC (permalink / raw)
On Mon, Oct 27, 1997 at 06:59:58PM +0200, Harvey J. Stein wrote:
> ... in particular ftp://genie.ucd.ie/pub/alpha/kernel/my_patches/traps.diff.
> Is this the patch you're refering to?
Yes. Or one similar enough to be indistinguishable.
> I presumably am running glibc2 - rpm reports I'm using glibc-0.961212-5
> and glibc-devel-0.961212-5 (rh 4.2). So,
No, that's glibc 1.98.
> 1. Are these compatible with an unpatched kernel 2.0.30? What
> about 2.0.31? What about the 2.1 series?
> 2. Do I need alpha-patches-2.0.30-0.2a.gz, or do I just need it for
> em86? Is it compatible with the above setup?
For glibc 1.98, you need patched kernel headers in /usr/include. The best
thing to do is to install Red Hat's kernel-includes rpm, and forever leave
/usr/src/linux alone. Build your kernels somewhere else.
The only patches that are really needed from alpha-patches are the SYSV
IPC bits, and that only if you care about programs that use SYSV SHM.
Which includes the X SHM extension, used by e.g. Quake.
All the rest is either header file changes for libc, or internal VFS
reworkings for large filesystems. Oh, and new machines.
> 3. alpha-patches-2.0.30-0.2a.gz is pretty new, so I had assumed it
> included all well known bug fixes. I take it this isn't the
> case? If not, is it going to get fixed?
Probably. Jay?
> 4. My /usr/include header files seem to include things from
> <linux/...> and <asm/...>. I thought someone mentioned that
> glibc2 no longer depends on kernel header files. What's the
> story here?
First, you've not got glibc2; glibc 1.98 was working toward *tighter*
integration. Which was a mistake, mostly. But even the latest glibc
uses kernel headers to some extent, though vastly reduced.
> 5. Should I upgrade/change my glibc? Is there an appropriate RPM
> or should I build it from scratch? Will doing so break
> anything?
It's not trivial. Wait for Red Hat 5.0.
r~
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~1997-10-27 20:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.3.95.971024124553.4089A-100000@tomtom.asi-fwb.com>
1997-10-24 21:06 ` program that crash alpha machine Ming Chu
1997-10-25 21:35 ` Harvey J. Stein
1997-10-27 6:38 ` Richard Henderson
[not found] <199710271659.SAA00792@blinky.bfr.co.il>
1997-10-27 20:32 ` Richard Henderson
[not found] <19971026223849.05810@dot.cygnus.com>
1997-10-27 16:59 ` Harvey J. Stein
1997-10-24 17:46 Tom Browder
-- strict thread matches above, loose matches on Subject: below --
1997-10-24 15:51 Ming Chu
1997-10-24 17:46 ` Tom Browder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox