[ 
https://issues.apache.org/jira/browse/TS-4626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15517440#comment-15517440
 ] 

Daniel Xu commented on TS-4626:
-------------------------------

Hi @Michael Chai,

I took a look at the code and I think I agree with you. I'll make a fix for 
this after TS-4072 lands in master.

Dan

> LogFile::close_file should not delete m_log handle
> --------------------------------------------------
>
>                 Key: TS-4626
>                 URL: https://issues.apache.org/jira/browse/TS-4626
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>            Reporter: Michael Chai
>            Assignee: Daniel Xu
>             Fix For: 7.1.0
>
>
> When log file was deleted on the disk, LogFile::check_fd will close file 
> handle and reopen again.delete m_log at this point will cause 
> LogFile::open_file return "LOG_FILE_COULD_NOT_OPEN_FILE" .  otherwise, will 
> cause trafficserver crash at LogFile::preproc_and_try_delete
> 300         if (!m_log->m_start_time) {
> (gdb) bt
> #0  0x000000000068245f in LogFile::preproc_and_try_delete (this=0x1132eb0, 
> lb=0x7fffdc000da0) at LogFile.cc:300
> #1  0x000000000068caa6 in LogBufferManager::preproc_buffers (this=0x1132970, 
> sink=0x1132eb0) at LogObject.cc:77
> #2  0x0000000000691a53 in LogObject::preproc_buffers (this=0x1132ae0, idx=0) 
> at LogObject.h:146
> #3  0x00000000006901c3 in LogObjectManager::preproc_buffers (this=0x1127228, 
> idx=0) at LogObject.cc:1126
> #4  0x000000000066b668 in Log::preproc_thread_main (args=0x1131edc) at 
> Log.cc:1168
> #5  0x000000000066ce9d in LoggingPreprocContinuation::mainEvent 
> (this=0x1131ea0) at Log.cc:279
> #6  0x000000000050d662 in Continuation::handleEvent (this=0x1131ea0, event=1, 
> data=0x11529a0) at ../iocore/eventsystem/I_Continuation.h:153
> #7  0x00000000007a1e9f in EThread::execute (this=0x7ffff07a1010) at 
> UnixEThread.cc:298
> #8  0x00000000007a0d0c in spawn_thread_internal (a=0x1131ef0) at Thread.cc:84
> #9  0x00007ffff64740a4 in start_thread (arg=0x7ffff07a0700) at 
> pthread_create.c:309
> #10 0x00007ffff541c04d in clone () at 
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
> (gdb) p m_log
> $1 = (BaseLogFile *) 0x0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to