ID:               22273
 Updated by:       [EMAIL PROTECTED]
 Reported By:      germano60 at yahoo dot it
-Status:           Open
+Status:           Feedback
 Bug Type:         Apache2 related
 Operating System: HP-UX 11.00
 PHP Version:      4.3.0
 New Comment:

Simple 'bt full' output would have been enough.. :)
Anyway, does it do the same if you run it with 'httpd -X' ?
(provide that backtrace, and just the bt output)
 
(gdb) run -X
<crash?>
(gdb) bt full

(and to be absolutely sure this is php bug, I assume that apache works
fine without PHP in httpd.conf? :)




Previous Comments:
------------------------------------------------------------------------

[2003-02-19 12:06:21] germano60 at yahoo dot it

Here you are the trace I got with gdb (long).
My comments are highlighted with //
Hope this can help.

Apparently, the apr_filepath_merge() method invoked by load_module()
fails during the strlen() evaluation.
Very odd, also because the parameters with the module name and the
relative path for libphp4.so are correct until that point.

Here you have the gdb trace:

0x0006631c in execute_now ( \
        cmd_line=0x40068fb8 "LoadModule", \
        args=0x7f7f158b "php4_module        modules/libphp4.so", \
        parms=0x7f7f1340, \
        p=0x0, \
        ptemp=0x40063480, \
        sub_tree=0x7f7f3640, \
        parent=0x0) at config.c:1343

// Contents of *args:
(gdb) x/sg 0x7f7f158b 
0x7f7f158b:      "php4_module        modules/libphp4.so"

// Contents of *parms:
(gdb) x/xw 0x7f7f1340
0x7f7f1340:     0x00000000

// Contents of *p (looks like a NULL pointer):
(gdb) x/xw 0x0
0x0:    Error accessing memory address 0x0: Invalid argument.

// Contents of *ptemp:
(gdb) x/xw 0x40063480
0x40063480 <end+305600>:        0x400292b0

// Contents of **subtree (looks like a NULL pointer):
(gdb) x/xw 0x7f7f3640
0x7f7f3640:     0x00000000

// Contents of *parent (looks like a NULL pointer):
(gdb) x/xw 0x0
0x0:    Error accessing memory address 0x0: Invalid argument.

(gdb) si
1351            return invoke_cmd(cmd, parms, sub_tree, args);

// skip all the routine call steps of the kind  
// (gdb) si
// 0x000663xx      1343        if (!(cmd =
ap_find_command_in_modules(cmd_line, &mod))) {
// 

// Test on the first argument
(gdb) si
invoke_cmd (cmd=0x40068fb8, parms=0x40001000, mconfig=0x7f7f3584,
args=0x0) at config.c:698
698     {

// Skip some code

// Final invoke after parsing the complete LoadModule directive
(gdb) s
invoke_cmd (cmd=0x40008cd4, parms=0x7f7f1340, mconfig=0x7f7f3640,
args=0x7f7f15b0 "") at config.c:735
735             if (*w == '\0' || *w2 == '\0' || *args != 0)
(gdb) si
733             w2 = ap_getword_conf(parms->pool, &args);
(gdb) si
735             if (*w == '\0' || *w2 == '\0' || *args != 0)
(gdb) si
0x00064bf8      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)
(gdb) si
0x00064bfc      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)
(gdb) si
0x00064c00      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)
(gdb) si
0x00064c04      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)
(gdb) si
0x00064c08      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)
(gdb) si
0x00064c0c      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)

// Value of parameters at this point:
(gdb) info scope config.c:735
Scope for config.c:735:
Symbol cmd is an argument in register $r4, length 4.
Symbol parms is an argument in register $r3, length 4.
Symbol mconfig is an argument in register $r8, length 4.
Symbol args is an argument at stack/frame offset -48, length 4.
Symbol w is a local variable in register $r5, length 4.
Symbol w2 is a local variable in register $r7, length 4.
Symbol w3 is a local variable in register $ret0, length 4.
Symbol errmsg is a local variable in register $ret0, length 4.
(gdb) info registers
     flags:         29000041          sr5:          d25cc00   
        r1:         40015458          sr6:          47df000   
        rp:            64bef          sr7:          47df000   
        r3: parms   7f7f1340          cr0:          10bb9c8   
        r4: cmd     40008cd4          cr8:     10bf0000ffff   
        r5: w       40069010          cr9:          8000009   
        r6:         40001000          ccr:           2050f8   
        r7: w2      40069020         cr12:               10   
        r8: mconfig 7f7f3640         cr13:            af43c   
        r9:         7f7f1340         cr24:    400003ffffff7   
       r10:         40063480         cr25:           718740   
       r11:         400098cc         cr26: c600000000000000   
       r12:         7f7f3580   mpsfu_high:         4001b810   
       r13:         40063480    mpsfu_low:             2000   
       r14:         4002c060   mpsfu_ovfl:           410fa8   
       r15:         400098cc          pad: 4ab6b8b14a4406f9   
       r16:         4000a650         fpsr:          8200000   
       r17:         4000a664         fpe1:                0   
       r18:         4000ada4         fpe2:                0   
       r19:         40001000         fpe3:                0   
       r20:         7f7f15b0         fpe4:                0   
       r21:                0         fpe5:                0   
       r22:                0         fpe6:                0   
       r23:         7f7f15af         fpe7:                0   
       r24:               12          fr4:                0   
       r25:         7f7f15b0         fr4R:         6174696f   
       r26:                0          fr5:                2   
        dp:         40015c58         fr5R:         20746865   
      ret0: errmsg  40069020          fr6:                0   
      ret1:             2f6c         fr6R:                0   
        sp:         7f7f37b0          fr7:         733a0a23   
       r31:         7f69bba0         fr7R:         2020204f   
       sar:               28          fr8:         7074696f   
     pcoqh:            64c0c         fr8R:         6e732046   
     pcsqh:          a049800          fr9:         696c6549   
     pcoqt:            64c10         fr9R:         6e666f20   
     pcsqt:          a049800         fr10:         41757468   
      eiem: ffffffffffffffff        fr10R:         436f6e66   
       iir:                4         fr11:         6967204c   
       isr:                0        fr11R:         696d6974   
       ior:                0         fr12:         55555555   
      ipsw:       ff0004ff1f        fr12R:         55555555   
      goto:                2         fr13:         55555555   
       sr4:          a049800        fr13R:         55555555   
       sr0:          a049800         fr14:         55555555   
       sr1:          6c08000        fr14R:         55555555   
       sr2:                0         fr15:         55555555   
       sr3:                0        fr15R:         55555555   

// Contents of w:
(gdb) x/sg 0x40069010
0x40069010 <end+329040>:         "php4_module"

// Contents of w2:
(gdb) x/sg 0x40069020
0x40069020 <end+329056>:         "modules/libphp4.so"

(gdb) info frame
Stack level 0, frame at 0x7f7f3730:
 pcoqh = 0x64c0c in invoke_cmd (config.c:735); saved pcoqh 0x66348
 called by frame at 0x7f7f36b0
 source language c.
 Arglist at 0x7f7f3730, args: cmd=0x40008cd4, parms=0x7f7f1340,
mconfig=0x7f7f3640, args=0x7f7f15b0 ""
 Locals at 0x7f7f3730, Previous frame's sp is 0x7f7f3730
 Saved registers:
  rp at 0x7f7f371c, r3 at 0x7f7f3744, r4 at 0x7f7f3740, r5 at
0x7f7f373c, r6 at 0x7f7f3738, r7 at 0x7f7f3734, r8 at 0x7f7f3730

// Contents of args:
(gdb) x/xb 0x7f7f15b0
0x7f7f15b0:     0x00

// Stepped execution trace proceeds:
(gdb) si
0x00064c48      739             return cmd->AP_TAKE2(parms, mconfig, w,
w2);
(gdb) si
0x00064c4c      739             return cmd->AP_TAKE2(parms, mconfig, w,
w2);
(gdb) si
0x00064c50      739             return cmd->AP_TAKE2(parms, mconfig, w,
w2);
(gdb) si
0x00064c54      739             return cmd->AP_TAKE2(parms, mconfig, w,
w2);
(gdb) si
0x00064c58      739             return cmd->AP_TAKE2(parms, mconfig, w,
w2);
(gdb) si
0x000377c8 in  ()
(gdb) si
0x000377cc in  ()
(gdb) si
0x000377d0 in  ()
(gdb) si
0x000377d4 in  ()
(gdb) si
0x000377d8 in noshlibs ()
(gdb) si
0x000377dc in noshlibs ()
(gdb) si
0x000377e0 in noshlibs ()
(gdb) si
0x000377e4 in noshlibs ()
(gdb) si
0x0005f844 in load_module () at mod_so.c:188
188         modi->name = NULL;
(gdb) si
0x0005f848      188         modi->name = NULL;
(gdb) si
load_module (cmd=0x40063480, \
             dummy=0x40008cd4, \
             modname=0x7f7f1340 "", \
             filename=0x7f7f1340 "") at mod_so.c:199
199     {
(gdb) si   
0x0005f8b4      199     {
(gdb) si
0x0005f8b8 in load_module (cmd=0x40063480, \
                           dummy=0x40008cd4, \
                           modname=0x7f7f1340 "", \
                           filename=0x7f7f1340 "") at mod_so.c:199
199     {
(gdb) si
0x0005f8bc      199     {
(gdb) si
0x0005f8c0      199     {
(gdb) si
0x0005f8c4      199     {
(gdb) si
0x0005f8c8      199     {
(gdb) si
0x0005f8cc      199     {
(gdb) si
0x0005f8d0      199     {
(gdb) si
0x0005f8d4      199     {
(gdb) si
0x0005f8d8      199     {
(gdb) si
203         const char *szModuleFile =
ap_server_root_relative(cmd->pool, filename);
(gdb) si
199     {
(gdb) si
0x0005f8e4      199     {
(gdb) si
0x0005f8e8      199     {
(gdb) si
0x0005f8ec      199     {
(gdb) si
0x0005f8f0      199     {
(gdb) si
0x0005f8f4      199     {
(gdb) si
0x0005f8f8      199     {
(gdb) si
0x0005f8fc      199     {
(gdb) si
203         const char *szModuleFile =
ap_server_root_relative(cmd->pool, filename);
(gdb) si
0x0005f904      203         const char *szModuleFile =
ap_server_root_relative(cmd->pool, filename);
(gdb) si
ap_server_root_relative (p=0x400292b0, file=0x40069010 "php4_module")
at config.c:1278
1278    {
(gdb) si
1281        rv = apr_filepath_merge(&newpath, ap_server_root, file,
(gdb) si
1278    {
(gdb) si
0x0006607c in ap_server_root_relative (p=0x400292b0, file=0x40069010
"php4_module") at config.c:1278
1278    {
(gdb) si
0x00066080      1278    {
(gdb) si
1281        rv = apr_filepath_merge(&newpath, ap_server_root, file,
(gdb) si
1278    {
(gdb) si
0x0006608c      1278    {
(gdb) si
1281        rv = apr_filepath_merge(&newpath, ap_server_root, file,
(gdb) si
0x00066094      1281        rv = apr_filepath_merge(&newpath,
ap_server_root, file,
(gdb) si
1279        char *newpath = NULL;
(gdb) si
1281        rv = apr_filepath_merge(&newpath, ap_server_root, file,
(gdb) si
0x000660a0      1281        rv = apr_filepath_merge(&newpath,
ap_server_root, file,
(gdb) si
0x000660a4      1281        rv = apr_filepath_merge(&newpath,
ap_server_root, file,
(gdb) si
0x00066054 in apr_filepath_merge () at filepath.c:123
123     {
(gdb) si
0x00066058      123     {
(gdb) si
0x0006605c      123     {
(gdb) si
0x00066060      123     {
(gdb) si
0x00066064      123     {
(gdb) si
0x00066068      123     {
(gdb) si
0x0006606c      123     {
(gdb) si
0x7f4dc988 in apr_filepath_merge () at filepath.c:123
123     {
(gdb) si
0x7f4dc98c      123     {
(gdb) si
apr_filepath_merge (newpath=0x4002c060, \
                    rootpath=0x40001000 "\177\177", \
                    addpath=0x40001000 "\177\177", \
                    flags=1074148480, \
                    p=0x0) at filepath.c:123
123     {
(gdb) si
0x7f4dc9d4      123     {
(gdb) si
0x7f4dc9d8 in apr_filepath_merge (newpath=0x4002c060, \
                                  rootpath=0x40001000 "\177\177", \
                                  addpath=0x40001000 "\177\177", \
                                  flags=1074148480, \
                                  p=0x400292b0)
    at filepath.c:123
123     {
(gdb) si
0x7f4dc9dc      123     {
(gdb) si
0x7f4dc9e0      123     {
(gdb) si
0x7f4dc9e4      123     {
(gdb) si
0x7f4dc9e8      123     {
(gdb) si
0x7f4dc9ec      123     {
(gdb) si
0x7f4dc9f0      123     {
(gdb) si
0x7f4dc9f4      123     {
(gdb) si
0x7f4dc9f8      123     {
(gdb) si
0x7f4dc9fc      123     {
(gdb) si
0x7f4dca00      123     {
(gdb) si
0x7f4dca04      123     {
(gdb) si
0x7f4dca08      123     {
(gdb) si
0x7f4dca0c      123     {
(gdb) si
0x7f4dca10      123     {
(gdb) si
0x7f4dca14      123     {
(gdb) si
0x7f4dca18      123     {
(gdb) si
0x7f4dca1c      123     {
(gdb) si
0x7f4dca20      123     {
(gdb) si
0x7f4dca24      123     {
(gdb) si
0x7f4dca28      123     {
(gdb) si
134         if (!addpath)
(gdb) si
0x7f4dca30      134         if (!addpath)
(gdb) si
137         if (addpath[0] == '/') {
(gdb) si
0x7f4dca38      137         if (addpath[0] == '/') {
(gdb) si
0x7f4dca3c      137         if (addpath[0] == '/') {
(gdb) si
0x7f4dca40      137         if (addpath[0] == '/') {
(gdb) si
160             if (flags & APR_FILEPATH_NOTABSOLUTE) {
(gdb) si
168         if (!rootpath) {
(gdb) si
0x7f4dca60      168         if (!rootpath) {
(gdb) si
186         rootlen = strlen(rootpath);
(gdb) si
0x7f4dca68      186         rootlen = strlen(rootpath);
(gdb) si
0x7f4d5a08 in strlen () from /usr/local/apache2/lib/libapr-0.sl.9
(gdb) si
0x7f4d5a0c in strlen () from /usr/local/apache2/lib/libapr-0.sl.9
(gdb) si
0x7f4d5a10 in strlen () from /usr/local/apache2/lib/libapr-0.sl.9
(gdb) si
0x7f4d5a14 in strlen () from /usr/local/apache2/lib/libapr-0.sl.9
(gdb) s
Single stepping until exit from function strlen, 
which has no line number information.
Syntax error on line 234 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server:
Unresolved external


Program exited with code 01.
breakpoint_delete_event
(gdb)

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/22273

-- 
Edit this bug report at http://bugs.php.net/?id=22273&edit=1

Reply via email to