hyperion-project / hyperion.ng

The successor to Hyperion aka Hyperion Next Generation
https://hyperion-project.org/
MIT License
3.11k stars 384 forks source link

Random error - Rs232 SerialPortError: Resource temporarily unavailable #1182

Closed newkind closed 3 years ago

newkind commented 3 years ago

Bug report

First of all I'm aware I'm using CoreElec and you most likely will tell me to go to the CE forums and ask there, but I tried and unfortunatelly folks there weren't able to help me. Here's the link to my previous topic in CE forums: https://discourse.coreelec.org/t/amlogicgrabb-stops-working-after-couple-hours-hyperion-ng/13091/11?u=newkind

So I'm using a WS2812B leds connected to the Arduino Uno clone and the issue is that randomly after random amount of time the Hyperion.ng stops working because of the Rs232 error. This Hyperion.ng addon build is based on the latest Hyperion.ng 2.0.0-alpha.9

Here's the part of the log:

2021-02-03T09:56:52.173 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:270:clearInput() | Removed source priority 250
2021-02-03T09:56:52.173 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:351:setCurrentTime() | Set visible priority to 255
2021-02-03T09:56:52.174 hyperiond HYPERION     : <DEBUG> Hyperion.cpp:559:handlePriorityChangedLedDevice() | priority[255], previousPriority[250]
2021-02-03T09:56:52.174 hyperiond HYPERION     : <DEBUG> Hyperion.cpp:562:handlePriorityChangedLedDevice() | No source left -> switch LED-Device off
2021-02-03T09:56:52.175 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | Framegrabber: disabled
2021-02-03T09:56:52.177 hyperiond AmLogic      : <DEBUG> GrabberWrapper.cpp:58:stop() | Grabber stop()
2021-02-04T00:37:52.156 hyperiond LEDDEVICE    : <DEBUG> ProviderRs232.cpp:95:close() | Close UART: ttyUSB0
2021-02-04T00:37:52.156 hyperiond LEDDEVICE    : <ERROR> Device disabled, device 'adalight' signals error: 'Rs232 SerialPortError: Resource temporarily unavailable'
2021-02-04T00:37:52.157 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | LED device: disabled

Link to the full log: https://pastebin.com/raw/ZwyptMHK

When the error happens, doing killall hyperiond and waiting couple seconds for the daemon to restart fixes the issue for the next X hours until it happens again.

This happens randomly and can happen ie. after an hour or 20 hours. There's no general rule for that. I could set the CRON to restart hyperiond every couple hours but that is certainly not a fix for this issue.

I'll gladly test all the patches or code that would fix this.

Thank you!

Steps to reproduce

None, just wait couple hours.

What is expected?

Hyperion.ng works just fine and in case of such error - restarts the daemon automatically

What is actually happening?

Error Device disabled, device 'adalight' signals error: 'Rs232 SerialPortError: Resource temporarily unavailable is thrown.

System

Hyperion - 2.0.0-alpha.9, coreelec-9.2 (Portisch-de94399e92/d7336cbe8c-1611911223), built: Jan 31 2021:10:30:23 CoreElec 9.2.5 Stable

hyperion-project[bot] commented 3 years ago

Hello @newkind

We make use of an ISSUE TEMPLATE to capture relevant information to support you best. Unfortunately, you ignored or deleted the given sections. Please take care that all information requested is provided.

This issue will be automatically closed by our bot, please do not take it personally. We would like asking you to open a new issue following the ISSUE TEMPLATE.

Thanks for your continuous support!

Best regards, Hyperion-Project