0

Operating system: Solaris / SunOS.

When starting Apache2.x using:

./apachectl start

the following error is printed to the terminal:

Illegal Instruction - core dumped

Any idea what could be causing this or are there any logs I can inspect?

More info::

out put from /bin/sh -x ./apachectl start :

+ [ xstart = x ]
+ /path/path/apache2/bin/httpd -d /path/path/apache2/ -k start
Illegal Instruction - core dumped

from the core file:

$pflags core
  core 'core' of 19561:   /path/path/apache2/bin/httpd -d /path/path/apache2/ -k start  
        data model = _ILP32  flags = MSACCT|MSFORK
   /1:    flags = 0
      sigmask = 0xffffbefc,0x0000ffff  cursig = SIGILL
MrMan
  • 1
  • 1
  • Please provide more details: Are you on SPARC or x86? Which release of Solaris (`uname -a`, `cat /etc/release`)? Is it the bundled Apache, from a third-party or compiled from source? – Tom Shaw Jun 08 '11 at 11:48

1 Answers1

0

The apachectl script itself is probably not crashing. More likely, a command that it calls is crashing.

Try running the script like this:

$ /bin/sh -x ./apachectl start

This will enable trace mode on the script and allow you to see the last thing it does before it bails out. If you run this and it's not obvious what's going on, please update your question with the last few lines of output.

Also, you mention that it dumps core. On Solaris, this may create a core file in your current directory or in /var/core, depending on your coreadm configuration. If you can find the core file, inspect it with the following commands:

$ pstack corefile
$ pflags corefile
Tom Shaw
  • 3,752
  • 16
  • 23
  • Thanks, you were a massive help. You helped me identify what was causing the error. – MrMan Jun 08 '11 at 14:05
  • Solved. I replaced the binary file 'httpd' with one from another installation of Apache. This seems to have fixed the problem. I can only assume my httpd file was corrupt. Thanks. – MrMan Jun 08 '11 at 14:06
  • Sorry about the above comment but SF won't let me answer my own question for a few more hours which is ridiculous. – MrMan Jun 08 '11 at 14:06
  • No worries - feel free to upvote my answer if it was useful :) – Tom Shaw Jun 08 '11 at 23:47