OpenHome Forum
Socket assertion failure - Printable Version

+- OpenHome Forum (http://forum.openhome.org)
+-- Forum: OpenHome (/forumdisplay.php?fid=1)
+--- Forum: Net (/forumdisplay.php?fid=5)
+--- Thread: Socket assertion failure (/showthread.php?tid=1458)



Socket assertion failure - simoncn - 10-03-2016 08:42 PM

A user has reported occasional crashes caused by this error:

Os/Posix/Os.c:663: CreateHandle: Assertion `aSocket >= 0 && aSocket < 1024' failed.

There is no more information at present. Any suggestions for what might be causing this would be much appreciated.


RE: Socket assertion failure - simonc - 14-03-2016 05:08 PM

(10-03-2016 08:42 PM)simoncn Wrote:  A user has reported occasional crashes caused by this error:

Os/Posix/Os.c:663: CreateHandle: Assertion `aSocket >= 0 && aSocket < 1024' failed.

There is no more information at present. Any suggestions for what might be causing this would be much appreciated.

Apologies for the slow reply.

The assertion suggests ohNet is leaking sockets. This'd presumably point towards incorrect/missing exception handling in code that creates/destroys its own sockets (e.g. SSDP announcements, action invocation, (un)subscribing).

If it was possible to get any logs from the user with DebugLevel.Error logging enabled, that might help show us which area(s) to try code reviewing.


RE: Socket assertion failure - simoncn - 17-05-2016 09:37 AM

To close the loop on this, it was not caused by a problem in ohNet. MinimServer was leaking file descriptors.


RE: Socket assertion failure - Shawest - 07-02-2017 05:59 AM

(17-05-2016 09:37 AM)simoncn Wrote:  To close the loop on this, it was not caused by I prefer the crazy Bulk a problem in ohNet. MinimServer was leaking file descriptors.

What can be done to stop this leak?