套接字描述符泄漏 - lsof 无法识别协议?
当我运行命令 /usr/sbin/lsof -p 20085
时,什么是“无法识别协议”。 lsof 的输出如下所示
leak 20085 niki 3910u sock 0,5 2457507716 can't identify protocol
leak 20085 niki 3911u sock 0,5 2457508136 can't identify protocol
leak 20085 niki 3912u sock 0,5 2457509392 can't identify protocol
leak 20085 niki 3913u sock 0,5 2457510457 can't identify protocol
leak 20085 niki 3915u sock 0,5 2457510696 can't identify protocol
leak 20085 niki 3916u sock 0,5 2457511180 can't identify protocol
leak 20085 niki 3917u sock 0,5 2457511820 can't identify protocol
leak 20085 niki 3918u sock 0,5 2457512402 can't identify protocol
leak 20085 niki 3919u sock 0,5 2457513490 can't identify protocol
leak 20085 niki 3920u sock 0,5 2457513493 can't identify protocol
leak 20085 niki 3921u sock 0,5 2457643983 can't identify protocol
leak 20085 niki 3922u sock 0,5 2457645099 can't identify protocol
leak 20085 niki 3923u sock 0,5 2457645570 can't identify protocol
leak 20085 niki 3924u sock 0,5 2457646223 can't identify protocol
leak 20085 niki 3911u sock 0,5 2457508136 can't identify protocol
leak 20085 niki 3912u sock 0,5 2457509392 can't identify protocol
,以及为什么此泄漏始终是 sock 0,5。
注意:我正在创建三个必须始终在运行时打开的套接字,除此之外没有创建任何文件/套接字,我的问题是我收到了大约 5000+ 无法识别协议的信息。为什么会这样呢?
谢谢。
What is "can't identify protocol" when I run the command /usr/sbin/lsof -p 20085
. The output of lsof
is shown below
leak 20085 niki 3910u sock 0,5 2457507716 can't identify protocol
leak 20085 niki 3911u sock 0,5 2457508136 can't identify protocol
leak 20085 niki 3912u sock 0,5 2457509392 can't identify protocol
leak 20085 niki 3913u sock 0,5 2457510457 can't identify protocol
leak 20085 niki 3915u sock 0,5 2457510696 can't identify protocol
leak 20085 niki 3916u sock 0,5 2457511180 can't identify protocol
leak 20085 niki 3917u sock 0,5 2457511820 can't identify protocol
leak 20085 niki 3918u sock 0,5 2457512402 can't identify protocol
leak 20085 niki 3919u sock 0,5 2457513490 can't identify protocol
leak 20085 niki 3920u sock 0,5 2457513493 can't identify protocol
leak 20085 niki 3921u sock 0,5 2457643983 can't identify protocol
leak 20085 niki 3922u sock 0,5 2457645099 can't identify protocol
leak 20085 niki 3923u sock 0,5 2457645570 can't identify protocol
leak 20085 niki 3924u sock 0,5 2457646223 can't identify protocol
leak 20085 niki 3911u sock 0,5 2457508136 can't identify protocol
leak 20085 niki 3912u sock 0,5 2457509392 can't identify protocol
and why this leak always been sock 0,5.
Note : I am creating three sockets which must be always been opened at runtime, apart from this there are no files/sockets been created and my question is I am getting around 5000+ can't identify protocol. Why is this so?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能您正在循环调用的函数调用中创建套接字,但创建的套接字永远不会关闭,这会导致泄漏。
Probably you are creating the sockets in your function call which is called in a loop, but the created socket is never closed and this results in a leak.