Bug 115305 - Segmentation fault for Apache on RH AS 2.1 : bad gcc exception handling
Segmentation fault for Apache on RH AS 2.1 : bad gcc exception handling
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2004-02-10 10:26 EST by Albin Debeaupuis
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-30 06:15:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
standalone prg (1.08 KB, application/octet-stream)
2004-02-11 12:00 EST, Albin Debeaupuis
no flags Details
out file (31.59 KB, text/plain)
2004-02-11 12:01 EST, Albin Debeaupuis
no flags Details

  None (edit)
Description Albin Debeaupuis 2004-02-10 10:26:19 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.5)

Description of problem:
We're running an php/apache server (installed with rpm pkg, apache
1.3.27 and php 4.3.2) with fast-cgi module (2.4.0) on a RH AS 2.1.

We were using gcc-2.96-118.7.2 and we got in the apache error log the
following errors:
[Fri Jan 30 12:29:26 2004] [notice] child pid 2672 exit signal Aborted (6)
[Fri Jan 30 12:29:29 2004] [notice] child pid 2673 exit signal
Segmentation fault (11)
After investigation, our development team pointed out a problem with
gcc handling exceptions.
We then installed gcc-2.96-124.7.2. And we still have problems
[Mon Feb 9 16:47:35 2004] [warn] FastCGI: (dynamic) server
"/var/www/fcgi-bin/mpim_admin.fcgi" (pid 1168) termination signaled
[Mon Feb 9 16:47:35 2004] [warn] FastCGI: (dynamic) server
"/var/www/fcgi-bin/mpim_admin.fcgi" (pid 1168) terminated due to
uncaught signal '15' (Terminated)
[Mon Feb 9 16:52:39 2004] [warn] FastCGI: (dynamic) server
"/var/www/fcgi-bin/mpim_admin.fcgi" (pid 1167) termination signaled
[Mon Feb 9 16:52:39 2004] [warn] FastCGI: (dynamic) server
"/var/www/fcgi-bin/mpim_admin.fcgi" (pid 1167) terminated due to
uncaught signal '15' (Terminated)
[Mon Feb 9 16:53:05 2004] [notice] child pid 680 exit signal
Segmentation fault (11)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

// code sample

1. // we try something which could potentially raise a SAException

    try {
            SACommand cmd(
                    "select acc_prsid, acc_title, acc_name,
acc_firstname, acc_email, acc_telephone, acc_mobile, acc_login,
acc_pwd, acc_active, acc_server_account, acc_sync, acc_notif \
                            from accounts where acc_prsid=:1");
            //Get data back
            if (cmd.FetchNext()) {
                    accountInformation.accountInformationId = key;
            } else {
                    std::cerr<<"personDAO.read CATCH"<<std::endl;

2. // we throw an exception from inside a try/catch and we got
"exception fault" randomly
                    throw Exception(NOT_FOUND);
    } catch(SAException &x) {

            throw DAOException(x);
return true;

Actual Results:  Segmentation fault (11)

Additional info:

it looks like this bug :
Comment 2 Bastien Nocera 2004-02-11 04:14:39 EST
As discussed on the phone, we would need a stand-alone test case to
reproduce the problem before we can assess whether or not a bug is
present in gcc.
Comment 3 Albin Debeaupuis 2004-02-11 12:00:04 EST
Created attachment 97585 [details]
standalone prg

error occurs when exception called in catch block
Comment 4 Albin Debeaupuis 2004-02-11 12:01:43 EST
Created attachment 97586 [details]
out file

compiled with gcc main.cpp -lstdc++
Comment 5 Bastien Nocera 2004-02-11 12:25:27 EST
I don't see what the problem is with this. The second exception thrown
is not caught by any handler, so the program will abort as it should.
Comment 6 Richard Henderson 2004-10-04 17:02:56 EDT
Indeed, the standalone application in comment #3 *should* fail.

As for the original log message,

"/var/www/fcgi-bin/mpim_admin.fcgi" (pid 1168) terminated due to
uncaught signal '15' (Terminated)

is not by itself an exception handling issue.  Signal 15 is SIGTERM,
which is generated in one of two ways: (1) by a user with the "kill"
program, or (2) the kernel's out-of-memory handler.

Without more information, I do not see how these are related.
Comment 7 Jakub Jelinek 2004-10-30 06:15:14 EDT
If you have more information, please reopen.

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