SIGILL on a pwr3 machine from a -qarch=com executable

SIGILL on a pwr3 machine from a -qarch=com executable

Post by Peter S. Shenki » Tue, 13 Apr 1999 04:00:00



Hi,

One of our customers is reporting a SIGILL on a pwr3 machine from our
executable.  He is running AIX 4.3.2;  the executable is compiled with
qarch=com on a ppc machine running AIX 4.1.x (I think x=2, but don't
remember at the moment).

SIGILL means "Illegal instruction".  I would expect such a signal in
situations in which one attempted to run, say, a pwr2 executable on a pwr3
machine or vice-versa -- but never for a -qarch=com executable on any AIX
platform.

Can anyone guess what the problem might be?

Also, I once found, on another platform, that I thought I was compiling to a
specific architecture but either mislabeled the executable or else left the
architecture-specific feature out of some link or compilation line.  On that
machine (SGI), a "file" command told me the architecture;  for instance,
"file foo" on SGI tells you whether the executable "foo" is a mips2, mips3
or mips4 executable. (These mips designations are like com, pwr2, etc.).

On AIX, "file" doesn't tell you whether the executable is pwr1, pwr2, ppc or
pwr3.  I asked the development support line whether there is any other
command one can run on an executable that will give this information.  I was
told that there is not.  This strains credulity.  So I thought I'd ask here:
is there any "cmd" I can run on an executable "foo" such that "cmd foo" will
give me this information?

Thanks,
-P.

 
 
 

SIGILL on a pwr3 machine from a -qarch=com executable

Post by Jens-Uwe Mag » Tue, 13 Apr 1999 04:00:00


On Mon, 12 Apr 1999 10:58:25 -0400, Peter S. Shenkin


>One of our customers is reporting a SIGILL on a pwr3 machine from our
>executable.  He is running AIX 4.3.2;  the executable is compiled with
>qarch=com on a ppc machine running AIX 4.1.x (I think x=2, but don't
>remember at the moment).

>SIGILL means "Illegal instruction".  I would expect such a signal in
>situations in which one attempted to run, say, a pwr2 executable on a pwr3
>machine or vice-versa -- but never for a -qarch=com executable on any AIX
>platform.

>Can anyone guess what the problem might be?

Another reason might be memory corruption that causes wild jumps. Did
you get a core dump? It would be interesting to do a stack backtrace.

Quote:>Also, I once found, on another platform, that I thought I was compiling to a
>specific architecture but either mislabeled the executable or else left the
>architecture-specific feature out of some link or compilation line.  On that
>machine (SGI), a "file" command told me the architecture;  for instance,
>"file foo" on SGI tells you whether the executable "foo" is a mips2, mips3
>or mips4 executable. (These mips designations are like com, pwr2, etc.).

>On AIX, "file" doesn't tell you whether the executable is pwr1, pwr2, ppc or
>pwr3.  I asked the development support line whether there is any other
>command one can run on an executable that will give this information.  I was
>told that there is not.  This strains credulity.  So I thought I'd ask here:
>is there any "cmd" I can run on an executable "foo" such that "cmd foo" will
>give me this information?

Yes, there is. It is named qarch, I have snarfed it off this news group
some time ago, the top of the .c file says:

/*

   qarch.c: Utility to find out which compiler and -qarch options
   were used for a binary.

   Copyright:


   Free software according GNU Public license


   AS Software Service AIX, Germany

   Compilation:
   either "make qarch"
   or     "cc -O -o qarch qarch.c"

   */

I do not know where the original location for this utility is, if you cannot
find it I have put my copy at <http://www.han.de/~jum/aix/qarch.c>.

--
Jens-Uwe Mager  <pgp-mailto:62CFDB25>

 
 
 

SIGILL on a pwr3 machine from a -qarch=com executable

Post by Peter S. Shenki » Tue, 13 Apr 1999 04:00:00


Hi,

I can't thank you enough for the qarch executable. I'm home now, but when
I get back to work I'll download it.

Also, I was looking at dejanews for this and other AIX related issues.  What
I was looking at seemed to imply that SIGILL on AIX means "killed by the
operating system."  Is this right?

I was assuming that on AIX (as on SGI) SIGILL means "illegal instruction",
and that "killed by the operating system" would be SIGKILL.

I would happily RTFM, but at the moment I don't have a working AIX system I
can consult.  This will hopefully change verysoon.

Thanks,
-P.


>On Mon, 12 Apr 1999 10:58:25 -0400, Peter S. Shenkin

>>One of our customers is reporting a SIGILL on a pwr3 machine from our
>>executable.  He is running AIX 4.3.2;  the executable is compiled with
>>qarch=com on a ppc machine running AIX 4.1.x (I think x=2, but don't
>>remember at the moment).

>>SIGILL means "Illegal instruction".  I would expect such a signal in
>>situations in which one attempted to run, say, a pwr2 executable on a pwr3
>>machine or vice-versa -- but never for a -qarch=com executable on any AIX
>>platform.

>>Can anyone guess what the problem might be?

>Another reason might be memory corruption that causes wild jumps. Did
>you get a core dump? It would be interesting to do a stack backtrace.

>>Also, I once found, on another platform, that I thought I was compiling to
a
>>specific architecture but either mislabeled the executable or else left
the
>>architecture-specific feature out of some link or compilation line.  On
that
>>machine (SGI), a "file" command told me the architecture;  for instance,
>>"file foo" on SGI tells you whether the executable "foo" is a mips2, mips3
>>or mips4 executable. (These mips designations are like com, pwr2, etc.).

>>On AIX, "file" doesn't tell you whether the executable is pwr1, pwr2, ppc
or
>>pwr3.  I asked the development support line whether there is any other
>>command one can run on an executable that will give this information.  I
was
>>told that there is not.  This strains credulity.  So I thought I'd ask
here:
>>is there any "cmd" I can run on an executable "foo" such that "cmd foo"
will
>>give me this information?

>Yes, there is. It is named qarch, I have snarfed it off this news group
>some time ago, the top of the .c file says:

>/*

>   qarch.c: Utility to find out which compiler and -qarch options
>   were used for a binary.

>   Copyright:


>   Free software according GNU Public license


>   AS Software Service AIX, Germany

>   Compilation:
>   either "make qarch"
>   or     "cc -O -o qarch qarch.c"

>   */

>I do not know where the original location for this utility is, if you
cannot
>find it I have put my copy at <http://www.han.de/~jum/aix/qarch.c>.

>--
>Jens-Uwe Mager <pgp-mailto:62CFDB25>

 
 
 

SIGILL on a pwr3 machine from a -qarch=com executable

Post by Jens-Uwe Mag » Wed, 14 Apr 1999 04:00:00


On Mon, 12 Apr 1999 22:33:44 -0400, Peter S. Shenkin


>Also, I was looking at dejanews for this and other AIX related issues.  What
>I was looking at seemed to imply that SIGILL on AIX means "killed by the
>operating system."  Is this right?

>I was assuming that on AIX (as on SGI) SIGILL means "illegal instruction",
>and that "killed by the operating system" would be SIGKILL.

The "killed by the OS" means just that the OS generated the signal and
not some other process. The CPU will encounter an illegal instruction
trap and the OS in turn will convert that into a SIGILL signal. The
simplest program I could come up with to produce an illegal instruction
signal is the following:

main()
{
        void (*func)() = 0;

        func();

Quote:}

--
Jens-Uwe Mager  <pgp-mailto:62CFDB25>
 
 
 

1. Preferred Console for Machine to Machine Communication over RS232 Com 1

Hi.

I have a single board computer (SnapGear SE1100.??CPU?is?Motorola?Coldfire
5272.??Will?run?uClinux?once?I?can?talk?to?it?and?can?build?and?flash
update with a kernel) that I need to talk to from an Intel Pentium Computer
with SuSE 9.0 as OS.

I have a healthy looking blinking LNK LED on the SE1100 which says to me
that the board is alive.

I have been trying to use kermit to talk to the single board computer over
the onboard com port (/dev/ttyS0) of the Intel SuSE computer.??I?am?not
having any luck despite the following:

* Null Modem Cable is in place
* Cable is correctly connected to Serial 1 port on the SE1100
* Correct speed on port.??Single?board?computer?wants?to?talk?at?9600?baud.?
Intel SuSE system is correctly set up via kermit SET SPEED.
* SET FLOW for Intel SuSE system is NONE (as per single board computer
requirements)

kermit CONNECT (post disabling look for carrier) gets me nowhere. The
terminal session goes nowhere (keyboard entries do not work, escape
character does not work) I get no error messages.??My?only?option?is?to
kill the session by closing the term window.

Is kermit my best choice for this type of communication?

Thanks

Mike

2. Linux sockets layer is full of bugs

3. How to use Japanese?

4. $$ Domain sale: meetLINUX.com,LinuxCares.com, softwares4linux.com And more $$

5. Printer daemon wont start

6. How to do com ? com : com in unix...

7. How to edit a file in /proc

8. $$ Domain sale: meetLINUX.com,LinuxCares.com, softwares4linux.com And more $$

9. jlg058@home.com, tlg62@home.com, egglectric@home.com

10. Executable is not executable

11. executable that does't work on a machine

12. automaticall restart an executable (run as cron job) after the machine is down and then up