[
https://issues.apache.org/jira/browse/TS-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15743482#comment-15743482
]
Daniel Xu edited comment on TS-4636 at 12/12/16 11:19 PM:
----------------------------------------------------------
Update: did more digging. If you run the {{traffic_server}} binary alone, there
are 4 copies of {{traffic.out}} open. It looks like these are all open for good
reason. 1 fd is for the stdout BaseLogFile; 1 fd is for the stderr BaseLogFile;
1 fd is for the duplicated STDERR_FILENO; 1 fd is for the duplicated
STDOUT_FILENO. Although this could maybe be improved, I don't see any great
reason to spend time doing it.
However, when you run the {{trafficserver}} script, {{traffic_server}} has 6
files open. Still need to dig more. Will continue Wednesday. My hunch right now
is the initial non-records Diags object is using dup2 on STD{ERR,OUT}_FILENO.
was (Author: danobi):
Update: did more digging. If you run the {{traffic_server}} binary alone, there
are 4 copies of {{traffic.out}} open. It looks like these are all open for good
reason. 1 fd is for the stdout BaseLogFile; 1 fd is for the stderr BaseLogFile;
1 fd is for the duplicated STDERR_FILENO; 1 fd is for the duplicated
STDOUT_FILENO. Although this could maybe be improved, I don't see any great
reason to spend time doing it.
However, when you run the {{trafficserver}} script, {{traffic_server}} has 6
files open. Still need to dig more. Will continue Wednesday. My hunch right now
is the initial non-records using Diags object is using dup2 on
STD{ERR,OUT}_FILENO.
> traffic.out is open too many times
> ----------------------------------
>
> Key: TS-4636
> URL: https://issues.apache.org/jira/browse/TS-4636
> Project: Traffic Server
> Issue Type: Bug
> Components: Core, Logging
> Reporter: James Peach
> Assignee: Daniel Xu
> Fix For: sometime
>
>
> Looks like something is wrong with {{traffic.out}}. I am expecting that this
> shold only be open twice (for stdout and stderr).
> {noformat}
> traffic_s 12272 nmadmin 0w CHR 1,3 0t0 1051
> /dev/null
> traffic_s 12272 nmadmin 1w REG 202,1 72377 524555
> /n/log/trafficserver/traffic.out
> traffic_s 12272 nmadmin 2w REG 202,1 72377 524555
> /n/log/trafficserver/traffic.out
> traffic_s 12272 nmadmin 3r DIR 202,1 4096 2 /
> traffic_s 12272 nmadmin 4u REG 202,1 3839 524557
> /n/log/trafficserver/manager.log
> traffic_s 12272 nmadmin 5u REG 202,1 72377 524555
> /n/log/trafficserver/traffic.out
> traffic_s 12272 nmadmin 6u 0000 0,9 0 6384
> anon_inode
> traffic_s 12272 nmadmin 7u REG 202,1 72377 524555
> /n/log/trafficserver/traffic.out
> traffic_s 12272 nmadmin 8u 0000 0,9 0 6384
> anon_inode
> traffic_s 12272 nmadmin 9u IPv4 19233316 0t0 TCP *:80
> (LISTEN)
> traffic_s 12272 nmadmin 10u IPv4 19233317 0t0 TCP
> *:443 (LISTEN)
> traffic_s 12272 nmadmin 11u 0000 0,9 0 6384
> anon_inode
> traffic_s 12272 nmadmin 12u 0000 0,9 0 6384
> anon_inode
> traffic_s 12272 nmadmin 13u unix 0xffff8801e2aaf080 0t0 19233322
> socket
> traffic_s 12272 nmadmin 14u REG 202,1 72377 524555
> /n/log/trafficserver/traffic.out
> traffic_s 12272 nmadmin 15u REG 202,1 72377 524555
> /n/log/trafficserver/traffic.out
> traffic_s 12272 nmadmin 16u unix 0xffff8800d9e63c00 0t0 19233956
> socket
> {noformat}
> {noformat}
> [root@qa1 ~]# lsof -P -p $(pidof traffic_server) | grep traffic.out
> [ET_NET 2317 nobody 1u REG 202,1 54210 1711082
> /opt/ats/var/log/trafficserver/traffic.out
> [ET_NET 2317 nobody 2u REG 202,1 54210 1711082
> /opt/ats/var/log/trafficserver/traffic.out
> [ET_NET 2317 nobody 5u REG 202,1 54210 1711082
> /opt/ats/var/log/trafficserver/traffic.out
> [ET_NET 2317 nobody 7u REG 202,1 54210 1711082
> /opt/ats/var/log/trafficserver/traffic.out
> [ET_NET 2317 nobody 17u REG 202,1 54210 1711082
> /opt/ats/var/log/trafficserver/traffic.out
> [ET_NET 2317 nobody 21u REG 202,1 54210 1711082
> /opt/ats/var/log/trafficserver/traffic.out
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)