This KB is explaining the log messages related to database version number mismatch, when copy-config, get-configuration, and discard-change RPCs run in two parallel NETCONF sessions, below are the logs snippet:
Mar 12 05:02:05 lab-device mgd[66312]: %DAEMON-0: ../../../../../src/ui/lib/memory/getmem.c:559: insist '!"mmap: could not remap file"' failed
Mar 12 05:02:16 lab-device mgd[66318]: %DAEMON-3-UI_DBASE_MISMATCH_MAJOR: Database header major version number mismatch for file '/var/run/db/juniper.db': expecting 0x1c, got 0x1e
Mar 12 05:02:16 lab-device mgd[66341]: %DAEMON-3-UI_DBASE_MISMATCH_MAJOR: Database header major version number mismatch for file '/var/run/db/juniper.db': expecting 0x1c, got 0x1e
On all Junos OS and Junos OS Evolved devices, when copy-config, get-configuration, and discard-change RPCs run in two parallel NETCONF sessions and the database is also accessed in parallel by two NETCONF sessions, it may lead to database corruption and mgd-related services crash. Below log message and core-dump will be seen during issue state:
Below log snippets are from QFX-5100 device, which shows 2 different Netconf sessions and it lead to DB corruption: Mar 12 05:02:03 lab-device mgd[66313]: %INTERACT-6-UI_AUTH_EVENT: Authenticated user 'User-A' assigned to class 'j-admin-access'
DB Corruption Logs: