Edge crash in cosock library

@nayelyz I found this commit in the ST edge repo and it indicates that there is a known crash in the cosock library of the ST hub. How does this crash manifest itself? I have had a long running crash in cosock going back months with large payloads. I’m curious if this may be related.

Hi, @blueyetisoftware
I asked the engineering team about this. Once we have more info, we’ll let you know.

@blueyetisoftware, following up, the engineering team mentioned the manifestation of the crash is a stack trace containing “thread resumed with too many sockets”.
Can you provide the stack trace of the error you’re facing, please?

Note: You can also take the file from that PR and put it in your driver’s src folder as it was done for the Hue driver to see if it helps with your issue. The hub’s Lua “include” paths are set up to allow for that type of overriding.

In my case, I don’t get a stack. If I call a rest api that produces very large payloads (~30-40K line of json), the driver will sometimes crash. I can call the exact same api with the same response and sometimes get it to work as well. When it crashes in this case, there is no stack and the driver reboots. I assumed it was an out of memory condition in the driver’s sandbox.

Hi, @blueyetisoftware.
The team mentioned that your suspicion about the issue being related to OOM on large payloads is probably correct, but, to investigate it further, the team would need the Hub logs around the time of the issue to see if something was registered there since the driver logs just show a restart.

Assuming it is OOM, is there any way to detect that and fail the REST call?

Currently, no. However, based on your comments, we’ll open a feature request about this for the engineering team. The implementation will depend on them.

1 Like