-
Bug
-
Resolution: Done
-
Minor
-
JWS 3.0.1
-
None
-
-
-
-
-
-
Fixed in JBCS httpd-2.4.23
-
Documented as Resolved Issue
Experiencing segmentation faults in mod_jk due to `jk_shmem.hdr` being corrupted. Here are coredump backtraces and source listings for two different areas of code affected by issue:
(gdb) bt #0 jk_shm_close (l=0x7fa53c8b20a0) at jk_shm.c:700 #1 0x00007fa5252a9358 in jk_cleanup_shmem (data=<value optimized out>) at mod_jk.c:2542 #2 0x00007fa53a88537e in ?? () #3 0x00007fa53a884850 in ?? () #4 0x00007fa53c7b1218 in ?? () #5 0x00007fa53c7b1128 in ?? () #6 0x00007fa53bd7e1d8 in ap_runtime_dir () #7 0x00007fa53bd7d35c in ap_document_root_check () #8 0x00007fa53a885355 in ?? () #9 0x00007fa53c7e0358 in ?? () #10 0x00007fa53c7b1218 in ?? () #11 0x0000000000000000 in ?? () (gdb) f #0 jk_shm_close (l=0x7fa53c8b20a0) at jk_shm.c:700 700 jk_log(l, JK_LOG_DEBUG, (gdb) list 700 695 char *wptr; 696 #endif 697 698 if (jk_shmem.hdr) { 699 if (JK_IS_DEBUG_LEVEL(l)) { 700 jk_log(l, JK_LOG_DEBUG, 701 "Closed shared memory %s childs=%u", 702 jk_shm_name(), jk_shmem.hdr->h.data.childs); 703 } 704 --jk_shmem.hdr->h.data.childs; (gdb) p jk_shmem $1 = { size = 1536, ajp_workers = 0, lb_sub_workers = 1, lb_workers = 1, filename = 0x7fa53c9063b0 "/apps/jws-3.0/httpd/logs/jk.shm.22310", lockname = 0x7fa53c83ab80 "/apps/jws-3.0/httpd/logs/jk.shm.22310.lock", fd = 13, fd_lock = 14, attached = 0, hdr = 0x7fa53bafd000, cs = { __data = { __lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __list = { __prev = 0x0, __next = 0x0 } }, __size = '\000' <repeats 39 times>, __align = 0 } } (gdb) p jk_shmem.hdr->h Cannot access memory at address 0x7fa53bafd000
Second one...
(gdb) bt #0 0x00007f05a684ab49 in do_shm_open (fname=0x7f05bd606c38 "/apps/jws-3.0/httpd/logs/jk.shm", attached=1, sz=1152, l=0x7f05bd6130a0) at jk_shm.c:631 #1 0x00007f05a682cfe9 in jk_child_init (pconf=0x7f05bd66d128, s=<value optimized out>) at mod_jk.c:3273 #2 0x00007f05bd0c66ec in ap_run_child_init (pchild=0x7f05bd66d128, s=0x7f05bd53d320) at config.c:167 #3 0x00007f05aa9444df in child_main (child_num_arg=<value optimized out>) at prefork.c:546 #4 0x00007f05aa944b39 in make_child (s=0x7f05bd53d320, slot=2) at prefork.c:810 #5 0x00007f05aa9456dc in perform_idle_server_maintenance (_pconf=<value optimized out>, plog=<value optimized out>, s=<value optimized out>) at prefork.c:912 #6 prefork_run (_pconf=<value optimized out>, plog=<value optimized out>, s=<value optimized out>) at prefork.c:1100 #7 0x00007f05bd0ac92e in ap_run_mpm (pconf=0x7f05bd514138, plog=0x7f05bd541358, s=0x7f05bd53d320) at mpm_common.c:98 #8 0x00007f05bd0a69c1 in main (argc=7, argv=0x7ffeffe2db48) at main.c:777 (gdb) list 631 626 jk_shm_name(), jk_shmem.size, 627 jk_shmem.hdr->h.data.size - jk_shmem.hdr->h.data.pos, 628 jk_shmem.hdr); 629 } 630 else { 631 jk_shmem.hdr->h.data.childs++; 632 jk_shmem.attached = (int)getpid(); 633 if (JK_IS_DEBUG_LEVEL(l)) 634 jk_log(l, JK_LOG_DEBUG, 635 "Attached shared memory %s [%d] size=%u workers=%u free=%u addr=%#lx", (gdb) p jk_shmem $4 = { size = 1536, ajp_workers = 0, lb_sub_workers = 1, lb_workers = 1, filename = 0x7f05bd6673f0 "/apps/jws-3.0/httpd/logs/jk.shm.14637", lockname = 0x7f05bd59cb40 "/apps/jws-3.0/httpd/logs/jk.shm.14637.lock", fd = 13, fd_lock = 14, attached = 0, hdr = 0x7f05bd081000, cs = { __data = { __lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __list = { __prev = 0x0, __next = 0x0 } }, __size = '\000' <repeats 39 times>, __align = 0 } } (gdb) p jk_shmem.hdr->h Cannot access memory at address 0x7f05bd081000
- is cloned by
-
JBCS-53 mod_jk shmem segfault
- Closed