[
https://issues.apache.org/jira/browse/TS-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15288578#comment-15288578
]
ASF GitHub Bot commented on TS-4072:
------------------------------------
Github user chaiman commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/568#discussion_r63659601
--- Diff: lib/ts/Diags.cc ---
@@ -625,11 +625,14 @@ Diags::should_roll_diagslog()
fflush(diags_log->m_fp);
if (diags_log->roll()) {
--- End diff --
The old file don't need to be closed in diags_log->roll(). close old
file should at destructor of old_diags. in addition,
this will cause crash because of writing to closed file
> Diagnostic log rolling races
> ----------------------------
>
> Key: TS-4072
> URL: https://issues.apache.org/jira/browse/TS-4072
> Project: Traffic Server
> Issue Type: Bug
> Components: Logging
> Reporter: James Peach
> Assignee: Alan M. Carroll
> Fix For: 7.0.0
>
>
> When diagnostic logs are rolled, {{Diags::diags_log}} is deleted and replaced
> with a new log object. Since the global {{diags}} points to a a single
> {{Diags}} object there is nothing to prevent a different thread logging
> through this object at the time it is deleted.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)