Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SSDP multicast listener socket becomes unbound
03-09-2012, 08:06 PM
Post: #11
RE: SSDP multicast listener socket becomes unbound
(01-09-2012 09:49 AM)simonc Wrote:  
(31-08-2012 05:20 PM)simoncn Wrote:  I've now asked the user to produce a full native thread dump when the problem is occurring. I hope this will produce the necessary information to identify the cause of the problem.

Thanks, that'd be a massive help!

I've now got a pair of thread dumps for the failing and working cases. They're rather hard to read because they were produced on Windows without a full set of symbols available. I've used the .map file to annotate the dumps with correct code locations (currently using pen and paper, but I could transcribe this information into the dump files).

There's only one difference between these thread dumps, which is an extra thread in the working case that's absent in the failing case. The stack trace for this thread is:

WS2_32!WSAWaitForMultipleEvents+0x12
ohNet!__setmbcp_nolock+0x1ed
ohNet!wcsncpy_s+0xbd
ohNet!Socket::ReceiveFrom+0x5e
ohNet!SocketUdpBase::Receive+0x61
ohNet!UdpReader::Read+0x2c
ohNet!Srx::ReadUntil+0xd0
ohNet!ReaderHttpRequest::Read+0xec
ohNet!SsdpListenerMulticast::Run+0x65
ohNet!Thead::EntryPoint+0x1c
ohNet!threadEntryPoint+0x83

The absence of this thread in the failing case suggests that a previous error has caused this thread to terminate. This makes ohNet unable to respond to M-SEARCH requests.

If it's helpful, I can post both thread dumps together with my hand-inserted code location annotations. I can also post the .map file which gives full details of all the code locations.
Find all posts by this user
04-09-2012, 08:10 AM
Post: #12
RE: SSDP multicast listener socket becomes unbound
(03-09-2012 08:06 PM)simoncn Wrote:  I've now got a pair of thread dumps for the failing and working cases. They're rather hard to read because they were produced on Windows without a full set of symbols available. I've used the .map file to annotate the dumps with correct code locations (currently using pen and paper, but I could transcribe this information into the dump files).

There's only one difference between these thread dumps, which is an extra thread in the working case that's absent in the failing case. The stack trace for this thread is:

WS2_32!WSAWaitForMultipleEvents+0x12
ohNet!__setmbcp_nolock+0x1ed
ohNet!wcsncpy_s+0xbd
ohNet!Socket::ReceiveFrom+0x5e
ohNet!SocketUdpBase::Receive+0x61
ohNet!UdpReader::Read+0x2c
ohNet!Srx::ReadUntil+0xd0
ohNet!ReaderHttpRequest::Read+0xec
ohNet!SsdpListenerMulticast::Run+0x65
ohNet!Thead::EntryPoint+0x1c
ohNet!threadEntryPoint+0x83

The absence of this thread in the failing case suggests that a previous error has caused this thread to terminate. This makes ohNet unable to respond to M-SEARCH requests.

That'd explain failure to respond to msearches!
Are you using a recent build of ohNet. Commit 062c855c82c4664e502612eb342930e4d871c2f3 on 13th June fixed a very similar issue...

(03-09-2012 08:06 PM)simoncn Wrote:  If it's helpful, I can post both thread dumps together with my hand-inserted code location annotations. I can also post the .map file which gives full details of all the code locations.

Thanks for the offer but I think you've provided all the key info here already.
Find all posts by this user
04-09-2012, 08:31 AM
Post: #13
RE: SSDP multicast listener socket becomes unbound
(04-09-2012 08:10 AM)simonc Wrote:  Are you using a recent build of ohNet. Commit 062c855c82c4664e502612eb342930e4d871c2f3 on 13th June fixed a very similar issue...

This seems likely to be the cause of the problem. The ohNet libraries in the release that's showing this problem are from the end of April. I'll rebuild ohNet from the current Github source and send this to the user for testing.
Find all posts by this user


Forum Jump: