sysrepo: Cannot access module back after one user callback failure
Hi all, After a user callback failure on a get request on a module, sysrepo does not answer anymore for this module. The following scenario works on v1.4.122, but does not in v2.0.47, nor on devel branch. Scenario:
- set a failure on the user callback for module my-module
- make a get request for module my-module with netopper2-cli (ERROR is expected, as the callback returns SR_ERR_CALLBACK_FAILED)
get --filter-xpath /my-module:my-module-root
ERROR
type: application
tag: operation-failed
severity: error
message: User callback failed
type: application
tag: operation-failed
severity: error
message: User callback failed
We have 2 responses, not sure this is normal, but ERROR is okay here.
- remove the failure on the user callback for module my-module
- make a get request for module my-module with netopeer2-cli (DATA is expected)
get --filter-xpath /my-module:my-module-root
cli_send_recv: Timeout for receiving a reply expired.
From logs it seems sysrepo is stuck with previous event processing. Following scenario: For step 2 we have those logs:
2021-11-02 08:42:19,342 DEBG 'mysw' stdout output:
[INF]: 08:42:19: SR: Processing "my-module" "operational" event with ID 2.
[INF]: 08:42:19: OR: mysw/my-module.c:74 ========== DATA FOR "my-module" "/my-module:module-root" REQUESTED =======================
[INF]: 08:42:19: OR: mysw/my-module.c:77 Failure on get configured, sending an error.
2021-11-02 08:42:19,342 DEBG 'netopeer2-server' stdout output:
[ERR]: SR: User callback failed
[WRN]: SR: Event "operational" with ID 2 failed (User callback failed).
[ERR]: SR: User callback failed.
[ERR]: NP: Getting data "/my-module:*" from sysrepo failed (User callback failed).
[ERR]: SR: User callback failed
[WRN]: SR: Event "rpc" with ID 2 priority 0 failed (User callback failed).
2021-11-02 08:42:19,342 DEBG 'orusw' stdout output:
[INF]: 08:42:19: SR: Failed processing of "operational" event with ID 2.
2021-11-02 08:42:19,342 DEBG 'netopeer2-server' stdout output:
[ERR]: SR: User callback failed.
[ERR]: NP: Failed to send an RPC (User callback failed).
That step is ok. (the last two logs seem to point out that two gets are being sent to sysrepo at the same time though).
Then, for step 4 we have:
2021-11-02 08:42:43,693 DEBG 'netopeer2-server' stdout output:
[ERR]: SR: Internal error (/opt/dev/sysrepo/src/common.c:4125).
[ERR]: SR: Waiting for subscription of "my-module" failed, previous event "(null)" with ID 2 was not processed.
[ERR]: NP: Getting data "/my-module:*" from sysrepo failed (Timeout expired).
2021-11-02 08:42:43,693 DEBG 'netopeer2-server' stdout output:
[ERR]: SR: Waiting for subscription of "my-module" failed, previous event "(null)" with ID 2 was not processed.
[WRN]: SR: Event "rpc" with ID 3 priority 0 failed (Timeout expired).
[ERR]: SR: User callback failed.
[ERR]: NP: Failed to send an RPC (User callback failed).
Sysrepo answers for other modules but not anymore for my-module.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17
Commits related to this issue
- shm sub BUGFIX clear oper event error Test included. Fixes #2627 — committed to sysrepo/sysrepo by michalvasko 3 years ago
- shm sub BUGFIX clear oper event error Test included. Fixes #2627 — committed to sysrepo/sysrepo by michalvasko 3 years ago
This was quite a straightforward use-case that was really not working since version 1.4.134. It was a regression because there was no test, surprisingly. So, now it should work in both latest
devel
(version 2.x) andlibyang1
(version 1.x) with a test in both. Thanks for the report.