[comp.unix.microport] 286: Why no core dump?

brwk@doc.ic.ac.uk (Bevis King) (10/05/88)

I am attempting to get the public domain basic interpreter posted
to comp.sources.unix working on Microport SV/AT.  The problem I have
is that the program terminates with an "Illegal allignment" message.

While abnormal terminations resulting in core dumps are par for the
course in porting software, especially to an architecture like the
286, this error has a particular problem which concerns me.

When the "Illegal allignment" message is issued, the program terminates
(ok, fair enough), no core dump is generated (worrying) and the login
shell terminates (very worrying indeed).

Recompiling the program with "-g" to give hooks for sdb doen't help
matters either; the program, sdb and the login shell all terminate.

Has anyone else had these problems?  Why doesn't it core dump?  What
are the likely causes of such a message?

Thanks in advance for your help.                             Bevis.


Bevis King, Systems Programmer        |   Email:  brwk@doc.ic.ac.uk
Dept of Computing, Imperial College   |   UUCP :  ..!mcvax!ukc!icdoc!brwk
180 Queens Gate, London, SW7 2BZ, UK. |   Voice:  +44 1 589 5111 x 5085
          "Never argue with a computer" ... Avon (Blake's 7)

vandys@hpcupt1.HP.COM (Andrew Valencia(Seattle)) (10/10/88)

/ hpcupt1:comp.unix.microport / brwk@doc.ic.ac.uk (Bevis King) /  4:47 am  Oct  5, 1988 /

>I am attempting to get the public domain basic interpreter posted
>to comp.sources.unix working on Microport SV/AT.  The problem I have
>is that the program terminates with an "Illegal allignment" message.

	Sounds like your interpreter is trying to kill itself after finding
an internal inconsistency.  Is the string "Illegal allignment" (sic)
a string in the program?  Check the code which tries to kill itself.
One way to make it happen is to write a fork() which reverses the parent
and child.  Then when the "parent" tries to kill the child, it actually
kills PID 0, which blows away the process group.  If it's using SIGKILL,
even the debugger and shell must die.  I.e.,

	#include <signal.h>
	int pid;

	if( pid = fork() ){
		printf("Child sleeping.\n");
		pause();
	} else {
		printf("Parent, killing child!\n");
		kill( pid, SIGKILL );
	}

	when you actually want:

	if( !(pid = fork()) ){
		...

					Good luck!
					Andy

jsp@myth.UUCP (Johnnie Peters) (10/11/88)

In article <456@gould.doc.ic.ac.uk>, brwk@doc.ic.ac.uk (Bevis King) writes:
> When the "Illegal allignment" message is issued, the program terminates
> (ok, fair enough), no core dump is generated (worrying) and the login
> shell terminates (very worrying indeed).
> Recompiling the program with "-g" to give hooks for sdb doen't help
> matters either; the program, sdb and the login shell all terminate.

I have seen this problem before also.  The answer to the unasked
question "How do I fix/work around this problem?"  is "Wait for 2.4,
maybe it is fixed in that."  2.4 is available from your customer rep
right now for $75.  A fix to the Software Development System is also
available for $99.

(Wes Peters posting from Johnnie's account on Johnnie's computer :-)

jr@oglvee.UUCP (Jim Rosenberg) (10/12/88)

In article <456@gould.doc.ic.ac.uk> brwk@doc.ic.ac.uk (Bevis King) writes:
>I am attempting to get the public domain basic interpreter posted
>to comp.sources.unix working on Microport SV/AT.  The problem I have
>is that the program terminates with an "Illegal allignment" message.
...

>When the "Illegal allignment" message is issued, the program terminates
>(ok, fair enough), no core dump is generated (worrying) and the login
>shell terminates (very worrying indeed).

Question:  Are you by some chance turning on the setuid bit after compiling
but before running the program?  It's standard behavior that if the setuid
bit is on, there will be *no* core dump for signals that would normally
generate one.
-- 
Jim Rosenberg                        pitt
Oglevee Computer Systems                 >--!amanue!oglvee!jr
151 Oglevee Lane                      cgh
Connellsville, PA 15425                                #include <disclaimer.h>