A test hang in regular in-house testing exposed an issue.
A process in the test that was holding the database critical section and was in the midst of committing a transaction was killed in the following timing window. Inside multiple levels of macros.
In the failure, Line 1258 finished but line 1259 did not start. The process was issued a kill -9 before then. And the test did not remove database shared memory but instead did a MUPIP RUNDOWN and that hung indefinitely. If line 1328 (set of JBP->phase2_commit_index2) happened when the kill -9 happens, then no hang is seen.
MUPIP JOURNAL ROLLBACK or MUPIP JOURNAL RECOVER suffer from the same hang issue. This needs to be fixed so they do not hang irrespective of wherever the kill -9 occurs.
Draft Release Note
MUPIP JOURNAL ROLLBACK and MUPIP JOURNAL RECOVER BACKWARD correctly rundown database files after abnormal process terminations (e.g., resulting from a kill -9, or an OS out-of-memory process termination) that leave shared memory segments in place. Previously, there was a small window of a few instructions in the terminated process that could cause the subsequent MUPIP JOURNAL process to hang indefinitely. Note that YottaDB strongly recommends against using kill -9 to terminate processes.
Final Release Note
Description
A test hang in regular in-house testing exposed an issue.
A process in the test that was holding the database critical section and was in the midst of committing a transaction was killed in the following timing window. Inside multiple levels of macros.
In the failure, Line 1258 finished but line 1259 did not start. The process was issued a kill -9 before then. And the test did not remove database shared memory but instead did a MUPIP RUNDOWN and that hung indefinitely. If line 1328 (set of JBP->phase2_commit_index2) happened when the kill -9 happens, then no hang is seen.
MUPIP JOURNAL ROLLBACK or MUPIP JOURNAL RECOVER suffer from the same hang issue. This needs to be fixed so they do not hang irrespective of wherever the kill -9 occurs.
Draft Release Note
MUPIP JOURNAL ROLLBACK and MUPIP JOURNAL RECOVER BACKWARD correctly rundown database files after abnormal process terminations (e.g., resulting from a kill -9, or an OS out-of-memory process termination) that leave shared memory segments in place. Previously, there was a small window of a few instructions in the terminated process that could cause the subsequent MUPIP JOURNAL process to hang indefinitely. Note that YottaDB strongly recommends against using kill -9 to terminate processes.