Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DEBUG_ONLY] Fix assert to take into account an edge case with update…
… process We had the update process fail with a SIG-11 (only in a debug build) due to a bad assert. Below is the C-stack trace for the record. (gdb) where #0 pthread_kill () from /usr/lib64/libpthread.so.0 #1 gtm_dump_core () at sr_unix/gtm_dump_core.c:72 #2 gtm_fork_n_core () at sr_unix/gtm_fork_n_core.c:163 #3 generic_signal_handler () at sr_unix/generic_signal_handler.c:341 #4 <signal handler called> #5 mutex_deadlock_check () at sr_port/mutex_deadlock_check.c:110 #6 mutex_long_sleep () at sr_unix/mutex.c:513 #7 gtm_mutex_lock () at sr_unix/mutex.c:858 #8 grab_lock () at sr_unix/grab_lock.c:83 #9 updproc_actions () at sr_port/updproc.c:907 #10 updproc () at sr_port/updproc.c:501 #11 mupip_main () at sr_unix/mupip_main.c:124 #12 dlopen_libyottadb () at sr_unix/dlopen_libyottadb.c:148 #13 main () at sr_unix/mupip.c:19 (gdb) f 5 #5 mutex_deadlock_check () at sr_port/mutex_deadlock_check.c:110 110 assert(REPL_ALLOWED(cs_addrs)); (gdb) p cs_addrs $1 = (sgmnt_addrs *) 0x0 106 if ((NULL != repl_csa) && (repl_csa->critical == criticalPtr)) 107 { /* grab_lock going for crit on the jnlpool region. gv_cur_region points to the current region of 108 * interest, which better have REPL_ENABLED or REPL_WAS_ENABLED. Assert that. 109 */ --> 110 assert(REPL_ALLOWED(cs_addrs)); In case of the update process, it is possible we do not have any current region of interest (like the comment in line 107 above indicates) if we are doing a grab_lock() call to add a history record to the replication instance file. The assert is now modified to allow cs_addrs to be NULL only in case of the update process.
- Loading branch information