MUPIP INTEG ONLINE on a journaled database runs correctly in a rare edge case
Final Release Note
MUPIP INTEG ONLINE runs correctly on a journaled database. Starting with r1.26, it was possible in very rare cases for the MUPI INTEG to terminate with a %SYSTEM-E-ENO22, Invalid argument
error from a shmdt()
call. This was only encountered in a development environment and not reported by a user. [#743 (closed)]
Description
In-house testing on an AARCH64 system showed a test failure in the stress_1/concurr
subtest with the following failure symptom from a mupip integ -online
.
%YDB-E-SYSCALL, Error received from system call shmdt() -- called from module sr_unix/ss_context_mgr.c at line 198
%YDB-I-TEXT, Shared segment address: 0x455453595325202c
%SYSTEM-E-ENO22, Invalid argument
After some analysis, found one possible explanation of the cause. The function jnl_file_close_timer()
did not have a shmdt()
invocation until GT.M V6.3-007
changes were merged into YottaDB (in r1.26 release). The function/macro call sequence that makes this possible is jnl_file_close_timer()
-> SS_RELEASE_IF_NEEDED
-> ss_destroy_context()
-> shmdt()
.
So if we are in exit handling code invoking ss_release()
-> ss_destroy_context()
, it is possible a timer interrupt happens just before we are about to do the shmdt()
and the jnl_file_close_timer()
code gets invoked as part of the timer handler and does the shmdt()
. In this case, once control returns back from the timer interrupt, the outer shmdt()
call will proceed with no clue about the nested shmdt()
call and in turn get the %SYSTEM-E-ENO22
(aka EINVAL
) error.
Draft Release Note
mupip integ -online
runs fine on a journaled database. In YottaDB r1.26, r1.28 and r1.30, it was possible in very rare cases for the integ to error out with a %SYSTEM-E-ENO22, Invalid argument
error from a shmdt()
call.