Bug 124530 - httpd segfaults in conjunction with mod_perl and GD
httpd segfaults in conjunction with mod_perl and GD
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: php (Show other bugs)
3.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
:
: 112742 (view as bug list)
Depends On:
Blocks: 116727
  Show dependency treegraph
 
Reported: 2004-05-27 06:00 EDT by Alberto Salerno
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-18 11:08:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
perl startup file (576 bytes, text/plain)
2004-05-27 06:16 EDT, Alberto Salerno
no flags Details
perl configuration file for httpd (1.06 KB, text/plain)
2004-05-27 06:17 EDT, Alberto Salerno
no flags Details
This is the file that should generate the images (10.12 KB, text/plain)
2004-05-27 06:19 EDT, Alberto Salerno
no flags Details
This file draws lines. (1.92 KB, text/plain)
2004-05-27 06:37 EDT, Alberto Salerno
no flags Details
This also. (1.98 KB, text/plain)
2004-05-27 06:38 EDT, Alberto Salerno
no flags Details

  None (edit)
Description Alberto Salerno 2004-05-27 06:00:48 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6)
Gecko/20040206 Firefox/0.8

Description of problem:
httpd gives me a seg fault when invoked by a script running under
mod_perl.

Debugging gave me following results:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1223483264 (LWP 27893)]
0xb71a5e90 in _int_free () from /lib/tls/libc.so.6
(gdb) in _int_free () from /lib/tls/libc.so.6

Backtracing:

#0  0xb71a5e90 in _int_free () from /lib/tls/libc.so.6
#1  0xb71a4e68 in free () from /lib/tls/libc.so.6
#2  0xb635d9f0 in gdFree (ptr=0xa1a0a0d) at gdhelpers.c:77
#3  0xb638a27e in XS_GD__Image_png (my_perl=0x82e97d8, cv=0x84bc474)
    at GD.xs:815
#4  0xb6f260c5 in Perl_pp_entersub (my_perl=0x82e97d8) at pp_hot.c:2781
#5  0xb6f0984a in Perl_runops_debug (my_perl=0x82e97d8) at dump.c:1414
#6  0xb6ebe779 in S_call_body (my_perl=0x82e97d8, myop=0xbfffb970,
is_eval=0)
    at perl.c:2069
#7  0xb6ebe403 in Perl_call_sv (my_perl=0x82e97d8, sv=0x0, flags=4)
    at perl.c:1987
#8  0xb6fd2646 in modperl_callback () from /etc/httpd/modules/mod_perl.so
#9  0xb6fd2bf4 in modperl_callback_run_handlers ()
   from /etc/httpd/modules/mod_perl.so
#10 0xb6fd2e35 in modperl_callback_per_dir ()
   from /etc/httpd/modules/mod_perl.so
#11 0xb6fce215 in modperl_response_finish ()
   from /etc/httpd/modules/mod_perl.so
#12 0xb6fce435 in modperl_response_handler_cgi ()
   from /etc/httpd/modules/mod_perl.so
#13 0x080685d5 in ap_run_handler ()
#14 0x08068bef in ap_invoke_handler ()
#15 0x08065276 in ap_process_request ()
#16 0x080608ac in _start ()
#17 0x08465730 in ?? ()
#18 0x00000004 in ?? ()
#19 0x08465730 in ?? ()
#20 0xb6fe12f7 in modperl_process_connection_handler ()
   from /etc/httpd/modules/mod_perl.so
#21 0x080720b5 in ap_run_process_connection ()
#22 0x08066af1 in ap_graceful_stop_signalled ()
#23 0x08066d0a in ap_graceful_stop_signalled ()
#24 0x08066d66 in ap_graceful_stop_signalled ()
#25 0x0806758d in ap_mpm_run ()
#26 0x0806da3f in main ()

Generating new rpms from Redhat source-rpms did not solved my problem
(using both official 2.0.46 or the httpd.spec, which comes with source
2.0.49). Instead installing apache and mod_perl from the source
(2.0.49 and 1.99) solved my problem.

So where is the problem with this rpm?


Version-Release number of selected component (if applicable):
httpd-2.0.46-32.ent, perl-5.8.0-88.4, 
gd-1.8.4-12


How reproducible:
Always

Steps to Reproduce:
1. Start httpd
2. Access the webpage with the script

    

Actual Results:  Some image is missing in the resulting web page and
in httpd.log there is the seg fault error message.

Expected Results:  No seg_fault and my images on the web page.

Additional info:
Comment 1 Joe Orton 2004-05-27 06:08:46 EDT
Thanks for the report.  Can you attach an example script and
configuration which fails in this way?





Comment 2 Alberto Salerno 2004-05-27 06:16:48 EDT
Created attachment 100623 [details]
perl startup file

This is the script I use to configure perl stuff.
Comment 3 Alberto Salerno 2004-05-27 06:17:45 EDT
Created attachment 100624 [details]
perl configuration file for httpd

This is the file that rules on perl under httpd and calls startup.pl
Comment 4 Alberto Salerno 2004-05-27 06:19:45 EDT
Created attachment 100625 [details]
This is the file that should generate the images

This file works well if I'm using a version of httpd and mod_perl compiled from
sources in the classical manner (you know ./configure make make install). Other
libraries and development files are Redhat standard ones. This file is invoked
by others. If you need them let me know.
Comment 5 Joe Orton 2004-05-27 06:24:11 EDT
I don't see any use of the GD module in that file? Can you reduce this
to a *minimal* reproduction script which causes the segfault?

Do you have PHP loaded into Apache too?  It's possible this is a
symbol conflict issue since PHP includes a bundled copy of gd too.
Comment 6 Alberto Salerno 2004-05-27 06:37:46 EDT
Created attachment 100626 [details]
This file draws lines.

Sorry for the worng file.
Comment 7 Alberto Salerno 2004-05-27 06:38:29 EDT
Created attachment 100627 [details]
This also.

Remark that sometimes a line or a bar is drawn. but many times I get a seg
fault form httpd.
Comment 8 Joe Orton 2004-05-28 04:28:20 EDT
Are you using a packaged version of the Perl GD extension (if so,
which and where from), or compiled from source (if so, which version)?

Can you also answer this question:

Do you have PHP loaded into Apache too?  It's possible this is a
symbol conflict issue since PHP includes a bundled copy of gd too.

Comment 9 Alberto Salerno 2004-05-28 04:56:52 EDT
Ok, I removed php from the httpd configuration and things seems to 
work well.

I want to run php *AND* mod_perl at the same time. Any Idea?
Comment 10 Joe Orton 2004-05-28 08:55:16 EDT
*** Bug 112742 has been marked as a duplicate of this bug. ***
Comment 11 Joe Orton 2004-05-30 06:12:01 EDT
Test packages are now available at the following location:

http://people.redhat.com/jorton/Taroon-php/

which should resolve this issue.  Please post any results of testing
(whether success or failure) here.
Comment 12 Alberto Salerno 2004-06-09 08:55:24 EDT
Sorry for the late replay. It works like a charm. Thanks a lot.
Comment 13 Joe Orton 2004-06-09 09:04:29 EDT
Great, thanks for testing this out.  The fix will be included in a
future PHP update for RHEL3.
Comment 14 Alberto Salerno 2004-06-09 09:20:11 EDT
Good. Could you please also notify the Fedora guys. It seems that 
also Fedora has the same problem.
Comment 15 Joe Orton 2004-06-09 09:23:00 EDT
Yes, we'll deal with the issue for future Fedora Core php updates too.
 Thanks.
Comment 16 Jay Turner 2004-08-18 11:08:32 EDT
Closing out based on feedback from original reporter.
Comment 17 Jay Turner 2004-09-01 22:37:10 EDT
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-272.html

Note You need to log in before you can comment on or make changes to this bug.