gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 11:53:18 30 4
gpt4 key购买 nike

当我运行命令 /usr/sbin/lsof -p 20085 时,什么是“无法识别协议(protocol)” . 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

以及为什么这个泄漏总是 socks 0,5。

注意:我正在创建三个必须始终在运行时打开的套接字,除此之外没有创建文件/套接字,我的问题是我得到大约 5000+ 无法识别协议(protocol)。为什么会这样?

谢谢。

最佳答案

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

关于sockets - 套接字描述符泄漏 - lsof 无法识别协议(protocol)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8876498/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com