You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Sean Cosgrave (JIRA)" <ji...@apache.org> on 2010/01/20 01:56:54 UTC
[jira] Created: (TS-108) unlock in diags code before writing out to
syslog
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
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).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (TS-108) unlock in diags code before writing out
to syslog
Posted by "George Paul (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TS-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Paul resolved TS-108.
----------------------------
Resolution: Fixed
Assignee: Sean Cosgrave
The changes have been checked into trunk. On all platforms except for FreeBSD unlock the diags code before writing out to syslog.
-George
> 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
> Assignee: Sean Cosgrave
> Priority: Minor
> Fix For: 2.0.0a
>
> Attachments: unlock_diff.txt
>
>
> Original bug description from Anirban:
> Currently, diags calls attain a lock on line 285 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.
[jira] Updated: (TS-108) unlock in diags code before writing out to
syslog
Posted by "Sean Cosgrave (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (TS-108) unlock in diags code before writing out to
syslog
Posted by "Bryan Call (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TS-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Call updated TS-108:
--------------------------
Fix Version/s: 2.0.0a
> 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
> Fix For: 2.0.0a
>
> Attachments: unlock_diff.txt
>
>
> Original bug description from Anirban:
> Currently, diags calls attain a lock on line 285 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.
[jira] Commented: (TS-108) unlock in diags code before writing out
to syslog
Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TS-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828952#action_12828952 ]
Leif Hedstrom commented on TS-108:
----------------------------------
George: Since you reviewed this, could you please commit this to "trunk", and close this bug?
> 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
> Fix For: 2.0.0a
>
> Attachments: unlock_diff.txt
>
>
> Original bug description from Anirban:
> Currently, diags calls attain a lock on line 285 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.
[jira] Commented: (TS-108) unlock in diags code before writing out
to syslog
Posted by "George Paul (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TS-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12806852#action_12806852 ]
George Paul commented on TS-108:
--------------------------------
This looks fine. The syslog() function is not in the list of thread-unsafe functions at
http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html#tag_02_09_01
so it should in theory be safe on all platforms. FreeBSD does have syslog_r() which will need to be looked at.
-George
> 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 285 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.
[jira] Updated: (TS-108) unlock in diags code before writing out to
syslog
Posted by "Sean Cosgrave (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TS-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Cosgrave updated TS-108:
-----------------------------
Attachment: unlock_diff.txt
Changes that need to be reviewed.
> 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 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).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TS-108) unlock in diags code before writing out to
syslog
Posted by "Sean Cosgrave (JIRA)" <ji...@apache.org>.
[ 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 285 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 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).
> 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 285 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.