1833759 Members
2192 Online
110063 Solutions
New Discussion

Coredump generated

 
Prashantj
Valued Contributor

Coredump generated

Hi,

Core dump generated. Please advice.

OS: HP-UX 11.31

Error are as below : --

Core was generated by `httpd'.
Program terminated with signal 11, Segmentation fault.
SEGV_MAPERR - Address not mapped to object
#0 0x4044cb0:0 in ap_set_string_slot (cmd=0x7ffff1c0,
struct_ptr=, arg=0x40094f10 "text/plain") at config.c:1172
1172 *(const char **)((char *)struct_ptr + offset) = arg;
(gdb) bt
#0 0x4044cb0:0 in ap_set_string_slot (cmd=0x7ffff1c0,
struct_ptr=, arg=0x40094f10 "text/plain") at config.c:1172
warning: Attempting to unwind past bad PC 0x4044cb0
#1 0x4047860:0 in invoke_cmd (cmd=, parms=0x7ffff1c0,
mconfig=0x40051d18, args=0x4008bb7a "") at config.c:692
#2 0x4048360:0 in ap_walk_config (current=0x4008bb50, parms=0x7ffff1c0,
section_vector=0x40051c08) at config.c:1060
#3 0x4048670:0 in ap_process_config_tree (s=0x40051628, conftree=0x40053270,
p=0x40037248, ptemp=0x40065528) at config.c:1643
#4 0x4053d60:0 in main (argc=1074156840, argv=0x40035228) at main.c:557
(gdb) set heap-check on
(gdb) info corruption
Internal error : RTC gdb_shlib_info_count missing !


Prashant
Good judgment comes from experience and experience comes from bad judgment.
13 REPLIES 13
Dennis Handly
Acclaimed Contributor

Re: Coredump generated

What are you trying to do in ap_set_string_slot on line 1172 of config.c?
What version of gdb do you have?
What compiler version are you using?
Prashantj
Valued Contributor

Re: Coredump generated

Hi Dennis,

Sorry for the delay.

I am trying to install Apache we server. SAP not recommended to used inbuilt HP-UX Apache version. Hence I download httpd-2.0.63.tar from apache.org.
After executing make and make install command I fire ./apacheclt stop command and error as below.
# ./apachectl start
/usr/lib/hpux32/dld.so: Unable to find library 'libgcc_s.so.0'.
./apachectl[80]: 7602 Killed

So make a soft link to /opt/hp-gcc-4.4.3/lib/libgcc_s.so.0 to and executed # ./apachectl stop
# ./apachectl[80]: 18874 Memory fault(coredump)

EVENT LOG.
IVMBASE sent Event Monitor notification information:

/system/kernel_parameters/history will meet notification criteria when it is >= 100.000000.
Its initial value is 0.000000.

gdb Version
HP gdb 6.1 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3

Regards
Prashant
Good judgment comes from experience and experience comes from bad judgment.
Dennis Handly
Acclaimed Contributor

Re: Coredump generated

>So make a soft link to /opt/hp-gcc-4.4.3/lib/libgcc_s.so.0

Was your apache compiled with gcc 4.4.3?
Have you tried debugging httpd?

>set heap-check on

You need to do this before you start.
Prashantj
Valued Contributor

Re: Coredump generated

Hi Dennis,

Only three change did in conf file
user name, user group and port # 1080.


Prashant
Good judgment comes from experience and experience comes from bad judgment.
Prashantj
Valued Contributor

Re: Coredump generated

it's /usr/sap/apache/conf/hpptd.conf

Prashant
Good judgment comes from experience and experience comes from bad judgment.
Dennis Handly
Acclaimed Contributor

Re: Coredump generated

>1172 *(const char**)((char*)struct_ptr + offset) = arg;

Either struct_ptr or the sum is bad or misaligned.
Prashantj
Valued Contributor

Re: Coredump generated

Hi Dennis,

Thanks.
Please advice what next? how i fix this isuue?

Prashant
Good judgment comes from experience and experience comes from bad judgment.
Dennis Handly
Acclaimed Contributor

Re: Coredump generated

>Please advice what next? how I fix this issue?

You need to find the values of struct_ptr and offset. Try in gdb:
(gdb) info reg
(gdb) disas $pc-16*12 $pc+16*2
Prashantj
Valued Contributor

Re: Coredump generated

Hi Dennis,

Please find the attached file.

Prashant
Good judgment comes from experience and experience comes from bad judgment.
Dennis Handly
Acclaimed Contributor

Re: Coredump generated

>Please find the attached file.
0x4044ca0:1 : addp4 r33=r33,r14
0x4044cb0:0 : st4 [r33]=r34 <<<<<
gr14: 0xc offset?
gr33: 0x40051d24

The value of r33 isn't swizzled properly. It appears the operands to the addp4 are reversed.
Try dropping the opt level for that one source file.
Prashantj
Valued Contributor

Re: Coredump generated

Hi Mr. Dennis,

Sorry for the delay.
Please describe the stapes to resolve the issue. how i drop the opt level.

Prashant
Good judgment comes from experience and experience comes from bad judgment.
Dennis Handly
Acclaimed Contributor

Re: Coredump generated

For your foreign devil gcc compiler, recompile with -O1 instead of -O.
Dennis Handly
Acclaimed Contributor

Re: Coredump generated

What compiler options and gcc version did you use to compile config.c?

I tried gcc-4.4.3 and -O2 or -O3 and couldn't duplicate it.