[ https://issues.apache.org/jira/browse/TS-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Geffon resolved TS-2822. ------------------------------ Resolution: Fixed > Crash in LogBufferIterator::next > -------------------------------- > > Key: TS-2822 > URL: https://issues.apache.org/jira/browse/TS-2822 > Project: Traffic Server > Issue Type: Bug > Components: Logging > Affects Versions: 4.2.1, 5.0.0 > Reporter: Brian Geffon > Assignee: Brian Geffon > 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)