Phil Sorber created TS-2852:
-------------------------------
Summary: BACKPORT - Crash in LogBufferIterator::next
Key: TS-2852
URL: https://issues.apache.org/jira/browse/TS-2852
Project: Traffic Server
Issue Type: Bug
Components: Logging
Affects Versions: 4.2.1, 5.0.0
Reporter: Brian Geffon
Assignee: Phil Sorber
Fix For: 5.0.0
It appears there is a crash in traffic_logstats that's consistently happening
in LogBufferIterator::next, a sample stack trace is attached. I'll be looking
into the issue.
#0 0x0000000000465c1d in LogBufferIterator::next (this=0x7fff435bd7b0) at
LogBuffer.cc:813
#1 0x0000000000448fd2 in parse_log_buff (buf_header=0x7fff435bd900,
summary=false) at logstats.cc:1234
#2 0x0000000000449660 in process_file (in_fd=8, offset=0, max_age=0) at
logstats.cc:1757
#3 0x000000000044d031 in main (argv=0x7fff435ce1a8) at logstats.cc:2558
It appears the issue is related to logstats.cc::process_file(), the final read
when it will read the contents of the log buffer can return a value less than
buffer_bytes; and since header is an aliased pointer of buffer, the contents of
header and the subsequent buffers can be invalid data, the solution in my
opinion would be to loop until all required data has been read before calling
parse_log_buff().
--
This message was sent by Atlassian JIRA
(v6.2#6252)