[
https://issues.apache.org/jira/browse/TS-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13859579#comment-13859579
]
Leif Hedstrom commented on TS-2463:
-----------------------------------
I think
{code}
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index e224527..6485904 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -6596,8 +6596,10 @@ HttpSM::update_stats()
ink_hrtime_from_msec(t_state.http_config_param->slow_log_threshold) <
total_time) {
URL* url = t_state.hdr_info.client_request.url_get();
char url_string[256] = "";
+ int index = 0;
+ int offset = 0;
- t_state.hdr_info.client_request.url_print(url_string, sizeof url_string,
0, 0);
+ t_state.hdr_info.client_request.url_print(url_string, sizeof url_string,
&index, &offset);
// unique id
char unique_id_string[128] = "";
{code}
> Crash in mime_mem_print() when slow-log is enabled (and triggered).
> -------------------------------------------------------------------
>
> Key: TS-2463
> URL: https://issues.apache.org/jira/browse/TS-2463
> Project: Traffic Server
> Issue Type: Bug
> Components: HTTP, Logging
> Reporter: Leif Hedstrom
> Labels: crash
> Fix For: 4.2.0
>
>
> When I enable slow log, e.g.
> {code}
> CONFIG proxy.config.http.slow.log.threshold INT 10
> {code}
> This generates a crash like:
> {code}
> [Switching to Thread 0x7ffff67e6700 (LWP 3558)]
> mime_mem_print (src_d=0x7ffff0c7384b
> "httpa/lib/ycs/bench/1000000.bmpl.yimg.comhttp://l.yimg.com/a/lib/ycs/bench/1000000.bmp",
> src_l=4, buf_start=buf_start@entry=0x7ffff67e5b00 "",
> buf_length=buf_length@entry=256, buf_index_inout=buf_index_inout@entry=0x0,
> buf_chars_to_skip_inout=buf_chars_to_skip_inout@entry=0x0) at
> ../../../../proxy/hdrs/MIME.cc:2645
> 2645 if (*buf_chars_to_skip_inout > 0) {
> (gdb) bt
> #0 mime_mem_print (src_d=0x7ffff0c7384b
> "httpa/lib/ycs/bench/1000000.bmpl.yimg.comhttp://l.yimg.com/a/lib/ycs/bench/1000000.bmp",
> src_l=4, buf_start=buf_start@entry=0x7ffff67e5b00 "",
> buf_length=buf_length@entry=256, buf_index_inout=buf_index_inout@entry=0x0,
> buf_chars_to_skip_inout=buf_chars_to_skip_inout@entry=0x0) at
> ../../../../proxy/hdrs/MIME.cc:2645
> #1 0x00000000005c7f4a in url_print (url=0x7ffff0cb4b18,
> buf_start=0x7ffff67e5b00 "", buf_length=256, buf_index_inout=0x0,
> buf_chars_to_skip_inout=0x0) at ../../../../proxy/hdrs/URL.cc:1425
> #2 0x00000000005b1f7a in print (this=0x7fffe370f940, dumpoffset=<optimized
> out>, bufindex=<optimized out>, bufsize=<optimized out>, buf=<optimized out>)
> at ../../../../proxy/hdrs/URL.h:385
> #3 HTTPHdr::url_print (this=this@entry=0x7fffe370f928,
> buff=buff@entry=0x7ffff67e5b00 "", length=length@entry=256,
> offset=offset@entry=0x0, skip=skip@entry=0x0) at
> ../../../../proxy/hdrs/HTTP.cc:1601
> #4 0x0000000000524d9b in HttpSM::update_stats
> (this=this@entry=0x7fffe370f220) at ../../../../proxy/http/HttpSM.cc:6600
> #5 0x00000000005298a8 in HttpSM::kill_this (this=0x7fffe370f220) at
> ../../../../proxy/http/HttpSM.cc:6475
> #6 0x0000000000529f58 in HttpSM::main_handler (this=0x7fffe370f220,
> event=2301, data=0x7fffe3710df0) at ../../../../proxy/http/HttpSM.cc:2543
> #7 0x00000000005672cf in handleEvent (data=0x7fffe3710df0, event=2301,
> this=<optimized out>) at ../../../../iocore/eventsystem/I_Continuation.h:146
> #8 HttpTunnel::main_handler (this=0x7fffe3710df0, event=<optimized out>,
> data=<optimized out>) at ../../../../proxy/http/HttpTunnel.cc:1506
> #9 0x00000000005e82cf in handleEvent (data=0x7fffd00353f8, event=<optimized
> out>, this=<optimized out>) at
> ../../../../iocore/eventsystem/I_Continuation.h:146
> #10 CacheVC::calluser (this=0x7fffd00351b0, event=<optimized out>) at
> ../../../../iocore/cache/P_CacheInternal.h:643
> #11 0x000000000065f655 in CacheVC::openWriteMain (this=0x7fffd00351b0) at
> ../../../../iocore/cache/CacheWrite.cc:1363
> #12 0x00000000006a5ba0 in handleEvent (data=0x7fffe416afa0, event=1,
> this=<optimized out>) at ../../../../iocore/eventsystem/I_Continuation.h:146
> #13 EThread::process_event (this=0x7ffff6cec010, e=0x7fffe416afa0,
> calling_code=1) at ../../../../iocore/eventsystem/UnixEThread.cc:145
> #14 0x00000000006a6773 in EThread::execute (this=0x7ffff6cec010) at
> ../../../../iocore/eventsystem/UnixEThread.cc:196
> #15 0x00000000006a54ea in spawn_thread_internal (a=0xfe56d0) at
> ../../../../iocore/eventsystem/Thread.cc:88
> #16 0x00000036f8407f33 in start_thread (arg=0x7ffff67e6700) at
> pthread_create.c:309
> #17 0x00000036f78f4ead in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
> {code}
> with
> {code}
> (gdb) print buf_chars_to_skip_inout
> $1 = (int *) 0x0
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)