As soon as the weblogic 12c plugin is loaded (using LoadModule weblogic_module /opt/apache/wl_12c_plugin/lib/mod_wl_24.so), Apache throws a core dump on startup.
With the equivalent configuration (and switching to mod_wl.so), Apache 2.2.x works ok.

In order to determine the cause of the crash, run a debugger such as dbx or gdb on the core file.



The following shows the commands to be executed for dbx 


(dbx) threads ("shows the state of the existing threads")
o>    t@1  a  l@1   ?()   signal SIGSEGV in  strcmp()
(dbx) where -l ("shows a summary of the stack including the library name with function name")

current thread: t@1
=>[1] libc.so.1:strcmp(0x100319048, 0x44000000, 0xbc319048, 0x2f73746174696300, 0x8080808080808080, 0x101010101010101), at 0xffffffff7d63c130
[2] mod_wl_24.so:cmd_Excludes(0xffffffff7ffff640, 0x100313028, 0x100319048, 0x100313028, 0x12b644, 0xffffffff7cc8d638), at 0xffffffff7cc64270
[3] httpd:invoke_cmd(0xffffffff7cd9a4c0, 0xffffffff7ffff640, 0x1002cd568, 0x0, 0xffffffff7cd9a4c0, 0xa030), at 0x100058284
[4] httpd:ap_walk_config_sub(0xffffffff7cd99c10, 0xffffffff7ffff640, 0x10029db28, 0x1002cbdf0, 0x1002cd568, 0x0), at 0x1000590a8
[5] httpd:ap_process_config_tree(0x10028afd8, 0x1002cf940, 0x1002577e8, 0x10028bbc8, 0x230, 0xffffffff7e824e40), at 0x10005a4bc
[6] httpd:main(0x1002577e8, 0x1002558c8, 0x9de8, 0x100248878, 0x100248850, 0x6), at 0x100032158
(dbx) dis strcmp
dbx: warning: unknown language, 'c' assumed
0xffffffff7d63c060: strcmp       :      subcc    %o0, %o1, %o2
0xffffffff7d63c064: strcmp+0x0004:      be,pn    %xcc,strcmp+0xf4       ! 0xffffffff7d63c154
0xffffffff7d63c068: strcmp+0x0008:      sethi    %hi(0x1010000), %o5
0xffffffff7d63c06c: strcmp+0x000c:      andcc    %o0, 7, %o3
0xffffffff7d63c070: strcmp+0x0010:      bset     257, %o5
0xffffffff7d63c074: strcmp+0x0014:      be,pn    %xcc,strcmp+0x44       ! 0xffffffff7d63c0a4
0xffffffff7d63c078: strcmp+0x0018:      sllx     %o5, 32, %o4
0xffffffff7d63c07c: strcmp+0x001c:      dec      8, %o3
0xffffffff7d63c080: strcmp+0x0020:      ldub     [%o1 + %o2], %o0
0xffffffff7d63c084: strcmp+0x0024:      ldub     [%o1], %g1
(dbx) frame 1
0xffffffff7d63c130: strcmp+0x00d0:      ldx      [%o1], %g1
(dbx) regs
current thread: t@1
current frame:  [1]
g0-g1    0x0000000000000000 0xffffffff7d63c060
g2-g3    0x0000000100313028 0x000000000000b350
g4-g5    0x000000000000b000 0x00000000829c3c00
g6-g7    0x0000000000000000 0xffffffff7da00200
o0-o1    0x0000000100319048 0x0000000044000000
o2-o3    0x00000000bc319048 0x2f73746174696300
o4-o5    0x8080808080808080 0x0101010101010101
o6-o7    0xffffffff7fffe921 0xffffffff7cc64270
l0-l1    0x0000000000000000 0xffffffff7cd8f7c8
l2-l3    0x0000000100319050 0x0000000000000010
l4-l5    0x0000000000000020 0xffffffff7cd99c10
l6-l7    0x0000000000004608 0x000000010022c770
i0-i1    0xffffffff7ffff640 0x0000000100313028
i2-i3    0x0000000100319048 0x0000000100313028
i4-i5    0x000000000012b644 0xffffffff7cc8d638
i6-i7    0xffffffff7fffe9d1 0x0000000100058284
y        0x0000000000000000
ccr      0x0000000000000044
pc       0xffffffff7d63c130:strcmp+0xd0    ldx      [%o1], %g1
npc      0xffffffff7d63c134:strcmp+0xd4    cmp      %o3, %g1


The above stack trace refers to the WebLogic 12c Plug-In module (mod_wl_24.so) and the WLExcludePathOrMimeType directive (cmd_Excludes), meaning that the core dump is related to this directive.
Indeed, when we remove all WLExcludePathOrMimeType directives, Apache starts. Also removing WLExcludePathOrMimeType only from outside location blocks works fine.

Solution

In the customer environment, the httpd.conf file contains several WLExcludePathOrMimeType directives defined globally (i.e. outside of any location block), such as:

WLExcludePathOrMimeType /staticContent1
To work around the problem, for each WLExcludePathOrMimeType defined globally, wrap the WLExcludePathOrMimeType directive inside a separate location block, such as:
<Location /staticContent1>
   WLExcludePathOrMimeType /staticContent1
</Location>
<Location /staticContent2>
   WLExcludePathOrMimeType /staticContent2
</Location>
...
...
<Location /staticContentN>
   WLExcludePathOrMimeType /staticContentN
</Location>

1 Comments