[ 
https://issues.apache.org/jira/browse/TS-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sean Cosgrave updated TS-108:
-----------------------------

    Description: 
Original bug description from Anirban:

Currently, diags calls attain a lock on line 588 of libinktomi++/Diags.cc which 
is then released on line 370 to prevent
various threads from dumping logs at the same time, thus leading to interleaved 
and unreadable logs.

That makes sense in the context of stdout, stderr and Diags own fp based 
logging. However, it doesnt apply to syslog
messages, since those are written out to Unix named pipes, which guarantee 
integrity of the message (and order). Even
if we were using Unix Domain Sockets to write out the syslogs, that would also 
ensure the integrity of the message in a
packet.

Thus we should unlock before we write out to syslog (around line# 329).


  was:
Original bug description from Anirban:

Currently, diags calls attain a lock on line 266 of libinktomi++/Diags.cc which 
is then released on line 358 to prevent
various threads from dumping logs at the same time, thus leading to interleaved 
and unreadable logs.

That makes sense in the context of stdout, stderr and Diags own fp based 
logging. However, it doesnt apply to syslog
messages, since those are written out to Unix named pipes, which guarantee 
integrity of the message (and order). Even
if we were using Unix Domain Sockets to write out the syslogs, that would also 
ensure the integrity of the message in a
packet.

Thus we should unlock before we write out to syslog (around line# 308).



> unlock in diags code before writing out to syslog
> -------------------------------------------------
>
>                 Key: TS-108
>                 URL: https://issues.apache.org/jira/browse/TS-108
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Logging
>            Reporter: Sean Cosgrave
>            Priority: Minor
>         Attachments: unlock_diff.txt
>
>
> Original bug description from Anirban:
> Currently, diags calls attain a lock on line 588 of libinktomi++/Diags.cc 
> which is then released on line 370 to prevent
> various threads from dumping logs at the same time, thus leading to 
> interleaved and unreadable logs.
> That makes sense in the context of stdout, stderr and Diags own fp based 
> logging. However, it doesnt apply to syslog
> messages, since those are written out to Unix named pipes, which guarantee 
> integrity of the message (and order). Even
> if we were using Unix Domain Sockets to write out the syslogs, that would 
> also ensure the integrity of the message in a
> packet.
> Thus we should unlock before we write out to syslog (around line# 329).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to