grayscott

New Member
Joined
Nov 16, 2020
Messages
1
PC version is windows 1909 after update to KB4580980, I have encounter some problem make me overwhelm, which are titled in follow:
1. sometimes when create an udp socket which retuan socket_error and errno number is 9;
2. my process was stucked, when i close my socket the stack is:
WARNING: Stack unwind information not available. Following frames may be wrong.
3fe0f9b0 7716b46d ntdll_77110000!NtWaitForAlertByThreadId+0xc
3fe0fa50 7715d681 ntdll_77110000!RtlDllShutdownInProgress+0x19d
3fe0fa88 7715ae09 ntdll_77110000!RtlAcquireSRWLockExclusive+0x471
3fe0fa94 732eab93 ntdll_77110000!RtlEnterCriticalSection+0x49
3fe0fb00 732eaa1e mswsock!SockCloseSocket+0xf3
3fe0fb1c 7668d451 mswsock!WSPCloseSocket+0x7e
3fe0fb50 5a4b1603 ws2_32!closesocket+0x111

hope someone can solve my problem
 


Solution
The issues you are encountering with your sockets and process can be challenging, but there are steps you can take to troubleshoot and potentially resolve them: 1. Socket Error with Errno 9: - Error code 9 typically corresponds to "Bad file descriptor." This error commonly occurs when trying to perform an operation on a closed socket. Ensure socket handles are properly initialized and closed when not used. - Double-check the sequence of operations involving the socket to ensure it's used correctly. - Review your socket creation, initialization, and error-handling processes to detect any potential issues. 2. Process Stuck Issue: - The stack trace you provided indicates some issues related to sockets and synchronization...
The issues you are encountering with your sockets and process can be challenging, but there are steps you can take to troubleshoot and potentially resolve them: 1. Socket Error with Errno 9: - Error code 9 typically corresponds to "Bad file descriptor." This error commonly occurs when trying to perform an operation on a closed socket. Ensure socket handles are properly initialized and closed when not used. - Double-check the sequence of operations involving the socket to ensure it's used correctly. - Review your socket creation, initialization, and error-handling processes to detect any potential issues. 2. Process Stuck Issue: - The stack trace you provided indicates some issues related to sockets and synchronization primitives. - If your process is getting stuck, it could be due to improper synchronization or resource management. - Check for any areas in your code where resources like sockets or critical sections are not released appropriately. 3. Troubleshooting Steps: - Review your code logic for creating and closing sockets, ensuring they follow best practices and are error-free. - Implement thorough error handling to manage potential socket errors and the closure of resources. - Consider using debugging tools like GDB, Visual Studio Debugger, or other suitable debuggers to step through your code and identify the exact location where the issues occur. - Analyze your application's logic to detect any race conditions, blocking calls, or deadlock situations that might lead to a stuck process. By carefully examining your socket creation, usage, and process management, you can pinpoint the root cause of these issues and implement the necessary corrections to prevent them from occurring.
 


Solution
Back
Top