Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Deadlock at cleanup due to pending delivery. #2841

Closed
STVHA opened this issue Jan 4, 2024 · 2 comments
Closed

[BUG] Deadlock at cleanup due to pending delivery. #2841

STVHA opened this issue Jan 4, 2024 · 2 comments
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@STVHA
Copy link

STVHA commented Jan 4, 2024

I am using SRT 5.3.1 for data transmission from one PC to another.
I setup for both sender and receiver like this:

  • Transtype=SRTT_FILE,
  • MessageAPI=true,
  • BlockingMode = false,
  • Latency = 100

It seems working well within one PC, but for cross-PC, sometimes the sender stops sending in the middle of transmission
When I close the sender, it hangs forever.

Here are the stack of all SRT's related threads when the hang happened. I hope those may be helpful for your debug.

// MainThread:
 	srt.dll!std::thread::join() Line 133	C++
	srt.dll!srt::CUDTUnited::cleanup() Line 306	C++
 	srt.dll!srt::CUDT::cleanup() Line 3363	C++
 	srt.dll!srt_cleanup() Line 33	C++

This is the context of the CUDTUnited:

CUDTUnited-context

// GarbageCollect:
	srt.dll!std::thread::join() Line 133	C++
	srt.dll!srt::CSndQueue::~CSndQueue() Line 434	C++
 	srt.dll!srt::CSndQueue::`scalar deleting destructor'(unsigned int)	C++
 	srt.dll!srt::CMultiplexer::destroy() Line 1791	C++
 	srt.dll!srt::CUDTUnited::removeSocket(const int u) Line 2822	C++
 	srt.dll!srt::CUDTUnited::checkBrokenSockets() Line 2702	C++
 	srt.dll!srt::CUDTUnited::garbageCollect(void * p) Line 3338	C++

This is the context of the CSndQueue:

CSndQueue-context

// SendingWorker:
	ws2_32.dll!00007ffc249a2c10()	Unknown
	srt.dll!srt::CChannel::sendto(const srt::sockaddr_any & addr, srt::CPacket & packet, const srt::sockaddr_any & source_addr) Line 784	C++
 	srt.dll!srt::CSndQueue::worker(void * param) Line 597	C++
 	srt.dll!std::invoke<void * (__cdecl*)(void *),void *>(void *(*)(void *) && _Obj, void * && _Arg1) Line 1756	C++
 	srt.dll!std::thread::_Invoke<std::tuple<void * (__cdecl*)(void *),void *>,0,1>(void * _RawVals) Line 61	C++

This is the context of the CChannel:

CChannel-context

Local variables inside CChannel::sendto()
CChannel-sendto() local vars

@STVHA STVHA added the Type: Bug Indicates an unexpected problem or unintended behavior label Jan 4, 2024
@maxsharabayko
Copy link
Collaborator

Likely related to the issue in SRT v1.5.3 fixed in PR #2834.

@maxsharabayko
Copy link
Collaborator

Closing: no activity and likely solved by #2834.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants