https://issues.apache.org/bugzilla/show_bug.cgi?id=56452

            Bug ID: 56452
           Summary: IPv6 address and log level debug caused crash
           Product: Tomcat Connectors
           Version: 1.2.40
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_jk
          Assignee: dev@tomcat.apache.org
          Reporter: shimizuhiroto...@gmail.com

When the following environment set, crash occured.
* mod_jk 1.2.39 or latter
* IPv6
* JkLogLevel debug

I think char buf[64] is too small.

---mod_jk.log
[Tue Apr 22 12:30:44.350 2014] [39832:140226284476384] [debug]
jk_open_socket::jk_connect.c (766):
 socket 14 [2001:c0a8:1424:0:a00:1f49:::59892 ->
2001:c0a8:6422:0:3a35:3938:3932:0:8009] connected
---

---
$ gdb /usr/sbin/httpd core.39832
:
(gdb) thread apply all backtrace
:
#5  0x00007f88ef48a587 in jk_open_socket (addr=<value optimized out>,
keepalive=0, timeout=5, connect_timeout=5000,
    sock_buf=<value optimized out>, l=0x7f88fbe832b8) at jk_connect.c:771
#6  0x00007f88ef4a9055 in ajp_connect_to_endpoint (ae=0x7f88fbedb4a0,
l=0x7f88fbe832b8) at jk_ajp_common.c:1011
#7  0x00007f88ef4a94e9 in ajp_send_request (e=<value optimized out>,
s=0x7fff4a6122d0, l=0x7f88fbe832b8,
    ae=0x7f88fbedb4a0, op=0x7fff4a611090) at jk_ajp_common.c:1662
:
(gdb) f 5
#5  0x00007f88ef48a587 in jk_open_socket (addr=<value optimized out>,
keepalive=0, timeout=5, connect_timeout=5000,
    sock_buf=<value optimized out>, l=0x7f88fbe832b8) at jk_connect.c:771
warning: Source file is more recent than executable.
771    }
(gdb) l
766                jk_log(l, JK_LOG_DEBUG, "socket %d [%s] connected",
767                       sd, jk_dump_sinfo(sd, buf));
768        }
:
---


---jk_connect.c
jk_sock_t jk_open_socket(jk_sockaddr_t *addr, int keepalive,
                         int timeout, int connect_timeout,
                         int sock_buf, jk_logger_t *l)
{
    char buf[64];

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to