套接字描述符泄漏 - lsof 无法识别协议?

发布于 2024-12-26 23:06:05 字数 1594 浏览 2 评论 0原文

当我运行命令 /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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

剩一世无双 2025-01-02 23:06:05

可能您正在循环调用的函数调用中创建套接字,但创建的套接字永远不会关闭,这会导致泄漏。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文