473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Extension causes sporadic segfaults

Hi NG,

I got some difficult problem that drives me nuts.

I wrote a relatively simple extension that reads binary files and
extracts some data. If I call the script, that uses my extension via
webbrowser, apache sometimes segfaults with:

*** glibc detected *** free(): invalid next size (normal):
0x0000555555a7c240 ***
[Thu Jun 21 11:57:59 2007] [notice] child pid 2487 exit signal Aborted (6)

A backtrace with gdb attached to apache shows:

#0 0x00002b080b52621d in raise () from /lib64/tls/libc.so.6
#1 0x00002b080b527a1e in abort () from /lib64/tls/libc.so.6
#2 0x00002b080b55b291 in __libc_message () from /lib64/tls/libc.so.6
#3 0x00002b080b560eae in _int_free () from /lib64/tls/libc.so.6
#4 0x00002b080b5611f6 in free () from /lib64/tls/libc.so.6
#5 0x00002b0810258b53 in _efree () from /etc/httpd/modules/libphp4.so
#6 0x00002b081025fc56 in _zval_ptr_dtor () from
/etc/httpd/modules/libphp4.so
#7 0x00002b081026ebe6 in zend_hash_clean () from
/etc/httpd/modules/libphp4.so
#8 0x00002b081027c8f2 in execute () from /etc/httpd/modules/libphp4.so
#9 0x00002b081027b3e2 in execute () from /etc/httpd/modules/libphp4.so
#10 0x00002b081026a00e in zend_execute_scripts () from
/etc/httpd/modules/libphp4.so
#11 0x00002b081023d733 in php_execute_script () from
/etc/httpd/modules/libphp4.so
#12 0x00002b0810284b89 in execute () from /etc/httpd/modules/libphp4.so
#13 0x00005555555719f3 in ap_run_handler () from /usr/sbin/httpd
#14 0x0000555555571eb1 in ap_invoke_handler () from /usr/sbin/httpd
#15 0x000055555556ecb8 in ap_process_request () from /usr/sbin/httpd
#16 0x000055555556a089 in _start () from /usr/sbin/httpd
#17 0x000055555557b693 in ap_run_process_connection () from /usr/sbin/httpd
#18 0x000055555556fb20 in ap_graceful_stop_signalled () from /usr/sbin/httpd
#19 0x000055555556fdfa in ap_graceful_stop_signalled () from /usr/sbin/httpd
#20 0x000055555556fea4 in ap_graceful_stop_signalled () from /usr/sbin/httpd
#21 0x00005555555705db in ap_mpm_run () from /usr/sbin/httpd
#22 0x0000555555576cef in main () from /usr/sbin/httpd
(gdb)

with valgrind php -f myscript.php I tested for mem leaks, but valgrind
doesn't detect anything.

If I debug the script directly with:

gdb php
run myscript.php

I cannot reproduce the problem.

Any idea what could be wrong, besides a bug in php or apache?

My target machine is Cent OS 4.4 x86_64 with php 4.3.9

Thanks Stefan
Jun 21 '07 #1
1 2005

I was able to find and fix the bug myself. As soon as i installed php
5.1 I was able to reproduce the error with the gdb and fix it.

Stefan Braumeister schrieb:
Hi NG,

I got some difficult problem that drives me nuts.

I wrote a relatively simple extension that reads binary files and
extracts some data. If I call the script, that uses my extension via
webbrowser, apache sometimes segfaults with:

*** glibc detected *** free(): invalid next size (normal):
0x0000555555a7c240 ***
[Thu Jun 21 11:57:59 2007] [notice] child pid 2487 exit signal Aborted (6)

A backtrace with gdb attached to apache shows:

#0 0x00002b080b52621d in raise () from /lib64/tls/libc.so.6
#1 0x00002b080b527a1e in abort () from /lib64/tls/libc.so.6
#2 0x00002b080b55b291 in __libc_message () from /lib64/tls/libc.so.6
#3 0x00002b080b560eae in _int_free () from /lib64/tls/libc.so.6
#4 0x00002b080b5611f6 in free () from /lib64/tls/libc.so.6
#5 0x00002b0810258b53 in _efree () from /etc/httpd/modules/libphp4.so
#6 0x00002b081025fc56 in _zval_ptr_dtor () from
/etc/httpd/modules/libphp4.so
#7 0x00002b081026ebe6 in zend_hash_clean () from
/etc/httpd/modules/libphp4.so
#8 0x00002b081027c8f2 in execute () from /etc/httpd/modules/libphp4.so
#9 0x00002b081027b3e2 in execute () from /etc/httpd/modules/libphp4.so
#10 0x00002b081026a00e in zend_execute_scripts () from
/etc/httpd/modules/libphp4.so
#11 0x00002b081023d733 in php_execute_script () from
/etc/httpd/modules/libphp4.so
#12 0x00002b0810284b89 in execute () from /etc/httpd/modules/libphp4.so
#13 0x00005555555719f3 in ap_run_handler () from /usr/sbin/httpd
#14 0x0000555555571eb1 in ap_invoke_handler () from /usr/sbin/httpd
#15 0x000055555556ecb8 in ap_process_request () from /usr/sbin/httpd
#16 0x000055555556a089 in _start () from /usr/sbin/httpd
#17 0x000055555557b693 in ap_run_process_connection () from /usr/sbin/httpd
#18 0x000055555556fb20 in ap_graceful_stop_signalled () from /usr/sbin/httpd
#19 0x000055555556fdfa in ap_graceful_stop_signalled () from /usr/sbin/httpd
#20 0x000055555556fea4 in ap_graceful_stop_signalled () from /usr/sbin/httpd
#21 0x00005555555705db in ap_mpm_run () from /usr/sbin/httpd
#22 0x0000555555576cef in main () from /usr/sbin/httpd
(gdb)

with valgrind php -f myscript.php I tested for mem leaks, but valgrind
doesn't detect anything.

If I debug the script directly with:

gdb php
run myscript.php

I cannot reproduce the problem.

Any idea what could be wrong, besides a bug in php or apache?

My target machine is Cent OS 4.4 x86_64 with php 4.3.9

Thanks Stefan
Jun 21 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: marko | last post by:
I'm having big problems with php and mysql. php segfaults on certain mysql calls, with the following logs in apache error log: child pid 60386 exit signal Segmentation fault (11) and in the...
2
by: kdahlhaus | last post by:
Is anyone aware of issues with Py2exe and extensions compiled with cygwin/mingw for Python 2.3? I have an extension that wraps access to some C DLLs. The generated executable always segfaults at...
5
by: Naveen Parihar | last post by:
I've a binary that runs on most of our servers but segfaults on one of the servers. Further, even on this specific machine, the binary runs successfully sometimes but segfaults most of the time....
5
by: Jeffry van de Vuurst | last post by:
Hi, I'm working on an xml schema and I'm running into some problems relating substitutionGroups and extensions. This xsd validates fine: There are three elements and three complex types and...
6
by: HLady | last post by:
I have been googling and cannot seem to find the answer I seek so I turn to the group. I have an application where I have been receiving 'Thread was being aborted' error ocasionally. In production...
0
by: Petemo94 | last post by:
Folks, I am getting a "sporadic" exception that contains the following stack trace. I say sporadic b/c my DB connection usually works fine, but occasionally it fails. *** I also noted that...
1
by: kmslick | last post by:
Hello all. Not sure which group this problem best relates to, so I'm posting to both with a follow up. I started learning C# and .NET last august for a project for my employer. The project...
17
by: bofh1234 | last post by:
I need to delimit a string. The delimiters are a semicolon and comma. When I run the program I get a segmentation fault on the first strtok. I followed the examples of others and from my old C...
3
by: Daniel Rindt | last post by:
Hello List, i hope to find an answer here, my problem is that my Webserver sporadic offers php scripts for download. I search with google and find some issues belonging to php version 4.x and...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.