-
Notifications
You must be signed in to change notification settings - Fork 77
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
node-red: ./src/threadpool.c:329: uv__queue_done: Assertion `uv__has_active_reqs(req->loop)' failed #386
Comments
Reproduced, also with the board generating the signals itself (I don't have a PLC around). Seems there is some race condition, hopefully in mraa (which is easier to fix) and not in libuv, the nodejs event helper library. Needs more debugging. BTW, it seems the issue was also reported to Node-RED before, see https://discourse.nodered.org/t/assertion-uv-has-active-reqs-req-loop-failed/68564. |
See libuv/libuv#3846 for a first attempt to fix it. Looks good here with 50 Hz self-trigger on two inputs which crashes immediately otherwise. |
A (likely) more correct fix is under testing now, see siemens/mraa@b10341f. |
According to [1] and based on stress tests, it is not correct to call uv_queue_work outside of the loop thread. We rather need to use the async API of libuv. That even simplifies things. Resolves "uv__queue_done: Assertion `uv__has_active_reqs(req->loop)' failed" errors that were easy to trigger by multiple DIs being used in parallel. See also [2]. [1] libuv/libuv#3847 [2] siemens/meta-iot2050#386 Signed-off-by: Jan Kiszka <[email protected]>
Can confirm that the image containing this fix does not have this behavior anymore. |
According to [1] and based on stress tests, it is not correct to call uv_queue_work outside of the loop thread. We rather need to use the async API of libuv. That even simplifies things. Resolves "uv__queue_done: Assertion `uv__has_active_reqs(req->loop)' failed" errors that were easy to trigger by multiple DIs being used in parallel. See also [2]. [1] libuv/libuv#3847 [2] siemens/meta-iot2050#386 Signed-off-by: Jan Kiszka <[email protected]>
According to [1] and based on stress tests, it is not correct to call uv_queue_work outside of the loop thread. We rather need to use the async API of libuv. That even simplifies things. Resolves "uv__queue_done: Assertion `uv__has_active_reqs(req->loop)' failed" errors that were easy to trigger by multiple DIs being used in parallel. See also [2]. [1] libuv/libuv#3847 [2] siemens/meta-iot2050#386 Signed-off-by: Jan Kiszka <[email protected]>
According to [1] and based on stress tests, it is not correct to call uv_queue_work outside of the loop thread. We rather need to use the async API of libuv. That even simplifies things. Resolves "uv__queue_done: Assertion `uv__has_active_reqs(req->loop)' failed" errors that were easy to trigger by multiple DIs being used in parallel. See also [2]. [1] libuv/libuv#3847 [2] siemens/meta-iot2050#386 Signed-off-by: Jan Kiszka <[email protected]>
A customer in the forum reported that his node-red application crashes periodically when he reads four inputs in a 7.5Hz period.
The crash reason is:
Assertion 'uv__has_active_reqs(req->loop)' failed
I reproduced that issue with a simplified flow (see attachment): Only having three digital inputs connected and provide a "blink" signal in a 7.5Hz period by DQs of a S7-1500 PLC to each of them simultaneously.
(Mostly) As soon as the blink application starts, node-red crashes with the following statement:
Changing the period to 1Hz does not change the behavior.
UPDATE:
Behavior only happens when min. 2 DIs are provided with the signal simultaneously.
When providing only one DI with a signal, it works as expected. As soon as the signal is provided to a second input, the issue happens.
Hardware / Software used:
The text was updated successfully, but these errors were encountered: