httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thib <chep...@gmail.com>
Subject Mysterious Segmentation Fault in main.c
Date Wed, 05 Mar 2008 15:31:19 GMT
Hi,

I'm working on an Apache Module since few months and it works fine until
this morning... I made a little upgrade on a regular expression. All is fine
on the machine where I develop but when I deploy Apache on an other machine,
I obtain a segmentation fault when I start httpd process...

The old regular expression :
#define EXP_REGU "<\\?xml version=\"1\\.0\"
encoding=\"UTF-8\"\\?><endbRequest xmlns=\"UdbEndbInterface\" xmlns:xsi=\"
http://www\\.w3\\.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"EndbInterface
C:[\\]{1,2}endbRequest\\.xsd\"><Line-Id>(.{0}|[[:alnum:]]{20})</Line-Id><Operator-Code>(.{0}|[0-9]{2})</Operator-Code><Country-Code>(.{0}|[0-9]{2})</Country-Code><Location-Area-Code>(.{0}|[0-9]{5})</Location-Area-Code><Advanced-Location-Info>(.{0}|[[:alnum:]]{10})</Advanced-Location-Info><Calling>([0-9]{9,11})</Calling><Called>([0-9]{2,6})</Called></endbRequest>"

The new one :
#define EXP_REGU "<\\?xml version=\"1\\.0\"
encoding=\"UTF-8\"\\?><endbRequest xmlns=\"UdbEndbInterface\" xmlns:xsi=\"
http://www\\.w3\\.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"EndbInterface
C:[\\]{1,2}endbRequest\\.xsd\"><Line-Id>(.{0}|[[:alnum:]]{20})</Line-Id><Operator-Code>(.{0}|[0-9]{2})</Operator-Code><Country-Code>(.{0}|[0-9]{2})</Country-Code><Location-Area-Code>(.{0}|[0-9]{5})</Location-Area-Code><Advanced-Location-Info>(.{0}|[[:alnum:]]{10})</Advanced-Location-Info><Calling>([0-9]{9,11})</Calling><Called>([0-9]{2,
8})</Called></endbRequest>"


I try to run httpd process with gdb to identify why Apache die in
Segmentation Fault but I didn't really succeed...

This is the gdb traces (I put a breakpoint after my last called method and
next, I ran step by step) and the error seams to be in the Apache Core...

----------------------------------------------------------------------------------------------------------
[test@opsnu1t1 bin]$ gdb httpd
GNU gdb Red Hat Linux (6.3.0.0-1.62rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) b set_nodatareceived_comment
Function "set_nodatareceived_comment" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (set_nodatareceived_comment) pending.
(gdb) run -X -d /exec/applis/snuproxitaltel/current/bin/apache
Starting program: /exec/applis/snuproxitaltel/G01R00C00/bin/apache/bin/httpd
-X -d /exec/applis/snuproxitaltel/current/bin/apache
[Thread debugging using libthread_db enabled]
[New Thread -1218501536 (LWP 21643)]
Breakpoint 2 at 0xb5e7ed: file mod_snuproxitaltel.c, line 451.
Pending breakpoint "set_nodatareceived_comment" resolved
[Wed Mar 05 16:01:55 2008] [notice]
-----------------------------------------------------
[Wed Mar 05 16:01:55 2008] [notice] Chargement du handler du module
snuproxitaltel_module
[Wed Mar 05 16:01:55 2008] [notice] Creation de la configuration
[Wed Mar 05 16:01:55 2008] [notice] Variable locale configuree avec succes :
fr_FR.ISO-8859-1
[Wed Mar 05 16:01:55 2008] [notice] Creation de la configuration effectue
avec succes
[Wed Mar 05 16:01:55 2008] [notice] Debut du chargement de la liste des
traducteurs
[Wed Mar 05 16:01:55 2008] [notice] Nombre de trad detectes dans le  fichier
httpd.conf : 4
[Wed Mar 05 16:01:55 2008] [notice] 0 : http://127.0.0.1:3000
[Wed Mar 05 16:01:55 2008] [notice] 1 : http://127.0.0.1:3001
[Wed Mar 05 16:01:55 2008] [notice] 2 : http://opsnu1w2:3000
[Wed Mar 05 16:01:55 2008] [notice] 3 : http://opsnu1w2:3001
[Wed Mar 05 16:01:55 2008] [notice] Fin de chargement de la liste des
traducteurs
[Wed Mar 05 16:01:55 2008] [notice] Debut du chargement du parametre
AlertScript
[Wed Mar 05 16:01:55 2008] [notice] Valeur du parametre AlertScript :
$HOME/current/sh/SndTrap.sh
[Wed Mar 05 16:01:55 2008] [notice] Debut du chargement du parametre
SnuproxitaltelTrapId
[Wed Mar 05 16:01:55 2008] [notice] Valeur du parametre SnuproxitaltelTrapId
: 7
[Wed Mar 05 16:01:55 2008] [notice] Debut du chargement du parametre
TradNotAvailableTrapId
[Wed Mar 05 16:01:55 2008] [notice] Valeur du parametre
TradNotAvailableTrapId : 2
[Wed Mar 05 16:01:55 2008] [notice] Debut du chargement du parametre
TradNotAvailableComment
[Wed Mar 05 16:01:55 2008] [notice] Valeur du parametre
TradNotAvailableComment : "Le Proxy Italtel n arrive a joindre de
traducteur"
[Wed Mar 05 16:01:55 2008] [notice] Debut du chargement du parametre
BadXMLFormatTrapId
[Wed Mar 05 16:01:55 2008] [notice] Valeur du parametre BadXMLFormatTrapId :
3
[Wed Mar 05 16:01:55 2008] [notice] Debut du chargement du parametre
BadXMLFormatComment
[Wed Mar 05 16:01:55 2008] [notice] Valeur du parametre BadXMLFormatComment
: "Le format des donnees recues n est pas valide"
[Wed Mar 05 16:01:55 2008] [notice] Debut du chargement du parametre
NoDataReceivedTrapId
[Wed Mar 05 16:01:55 2008] [notice] Valeur du parametre NoDataReceivedTrapId
: 4
[Switching to Thread -1218501536 (LWP 21643)]

Breakpoint 2, set_nodatareceived_comment (parms=0xbfffb460, mconfig=0x0,
arg=0x8b89720 "\"Pas de donnee recue dans la requete\"")
    at mod_snuproxitaltel.c:451
451     mod_snuproxitaltel.c: Aucun fichier ou répertoire de ce type.
        in mod_snuproxitaltel.c
(gdb) n
[Wed Mar 05 16:02:01 2008] [notice] Debut du chargement du parametre
NoDataReceivedComment
454     in mod_snuproxitaltel.c
(gdb) n
455     in mod_snuproxitaltel.c
(gdb) n
457     in mod_snuproxitaltel.c
(gdb) n
[Wed Mar 05 16:02:03 2008] [notice] Valeur du parametre
NoDataReceivedComment : "Pas de donnee recue dans la requete"
459     in mod_snuproxitaltel.c
(gdb) n
461     in mod_snuproxitaltel.c
(gdb) n
invoke_cmd (cmd=0xb80180, parms=0xbfffb460, mconfig=0x0, args=0x8b66a11 "")
at config.c:897
897     config.c: Aucun fichier ou répertoire de ce type.
        in config.c
(gdb) n
ap_walk_config_sub (current=0x8b669c8, parms=0xbfffb460,
section_vector=0x8b24810) at config.c:1160
1160    in config.c
(gdb) n
1144    in config.c
(gdb) n
1173    in config.c
(gdb) n
1174    in config.c
(gdb) n
ap_walk_config (current=0x8b669c8, parms=0xbfffb460,
section_vector=0x8b24810) at config.c:1192
1192    in config.c
(gdb) n
1185    in config.c
(gdb) n
1188    in config.c
(gdb) n
1191    in config.c
(gdb) n
1192    in config.c
(gdb) n
1185    in config.c
(gdb) n
1199    in config.c
(gdb) n
1200    in config.c
(gdb) n
1201    in config.c
(gdb) n
ap_process_config_tree (s=0x0, conftree=0x8b36d40, p=0x8af30a8, ptemp=0x0)
at config.c:1761
1761    in config.c
(gdb) n
1760    in config.c
(gdb) n
1761    in config.c
(gdb) n
1771    in config.c
(gdb) n
1772    in config.c
(gdb) n
main (argc=4, argv=0xbfffb5a4) at main.c:623
623     main.c: Aucun fichier ou répertoire de ce type.
        in main.c
(gdb) n
621     in main.c
(gdb) n
623     in main.c
(gdb) n
624     in main.c
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
0x001b5f70 in _int_malloc () from /lib/tls/libc.so.6
(gdb) bt
#0  0x001b5f70 in _int_malloc () from /lib/tls/libc.so.6
#1  0x001b50fd in malloc () from /lib/tls/libc.so.6
#2  0x00ef4722 in allocator_alloc (allocator=0x8aed008, size=8192) at
memory/unix/apr_pools.c:300
#3  0x00ef3c27 in apr_pool_create_ex (newpool=0xbfffb4a8, parent=0x8af30a8,
abort_fn=0, allocator=0x8aed008) at memory/unix/apr_pools.c:800
#4  0x080695c8 in ap_core_reorder_directories (p=0x8af30a8, s=0x2009) at
core.c:631
#5  0x0806244d in main (argc=4, argv=0xbfffb5a4) at main.c:624
----------------------------------------------------------------------------------------------------------

If anybody has an idea, I accept some help ;)

Thanks a lot
Thib

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message