You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
When a YANG module exists only in a mounted context (not implemented in the parent context), the LYB data parser fails to parse nodes from that module. The parser incorrectly looks up the module in the parent context before resolving it through the schema-mount extension context.
This breaks change subscribers in sysrepo when an edit touches mounted data, because the event diff is parsed as LYB against the main context.
Affected Component
Component: libyang
File: src/parser_lyb.c
Function: lyb_parse_module() called from LYB_NODE_EXT case
Symptom
Error message during LYB parse:
Invalid context for LYB data parsing, module "<module-name>" not found.
In sysrepo, this manifests as:
Publisher: sr_apply_changes() times out after 5 s with "SHM event 'change' ID N processing timed out"
Subscriber: Logs Invalid context for LYB data parsing, module "..." not found.
Root Cause
In src/parser_lyb.c, the LYB_NODE_EXT case (line ~1602) calls lyb_parse_module() first. This function does:
ly_ctx_get_module_implemented(pctx->ctx, mod_name) - looks up module in parent context
Checks revision and features against the parent's module
Only afterwards does lyb_parse_schema_ext() resolve the node in the mount context through lys_find_child_node_ext().
For a mounted-only module, step 1 fails because the module doesn't exist in the parent context. Even if the module exists in both contexts, the revision and feature checks compare against the parent's copy instead of the mounted one.
Activity
pekseow commentedon Nov 18, 2026
Attached files to reproduce issue with unit test.
ISSUE-E-REPRODUCTION.md
parser_lyb BUGFIX parsing extension nodes
michalvasko commentedon Nov 18, 2026
Thanks, fixed.