problem description
there is an agent program for SMB, which works normally in most cases, but sometimes the transmission speed drops to 0 (lasts for about a minute and returns to normal)
troubleshooting is that the send () function of socket in the agent program executes successfully, but the packet grab finds that no packet is sent.
Note: this phenomenon does not often occur. I have sent about 1000 files to appear once or twice.
the environmental background of the problems and what methods you have tried
language: C
Environment: Debian 8.8
use package capture software to grab protocol packages for clients, agents, and servers.
1.1.The client did not receive the Response after sending the Request, but judging from the packet grabbed by the SMB server, the server sent the Response.
1.2.Then I added printing in the socket send data section of the agent. Send (), which shows that it has been run successfully. However, the Response information was not found in the grab package of the agent.
that is, the agent also forwards the Response after receiving the Request.
conclusion: the reason why the speed is 0 should be that the smb client fails to receive Response and times out and reconnects with SMB. And restored the connection.
2. When the speed changes to zero, netstat-tnap is executed and no unsent data is found in the sending queue.
what result do you expect? What is the error message actually seen?
I"d like to ask you where to start this question.