• Narayanan Iyer's avatar
    [#419] Avoid hangs in source server due to trying to flush the journal buffers... · 021f6346
    Narayanan Iyer authored
    [#419] Avoid hangs in source server due to trying to flush the journal buffers while instance freeze is ON
    
    DO_JNL_FLUSH_IF_POSSIBLE macro is invoked as a desire to flush if possible.  If the act of flushing
    is going to hang due to a frozen instance, it is better to skip the jnl flush and avoid the hang.
    That is what is done as the fix in this commit.
    
    This addresses a hang seen in the v62000/gtm8086 subtest where the source server was
    stuck waiting for the instance to be unfrozen (while trying to flush the journal file using the
    DO_JNL_FLUSH_IF_POSSIBLE macro) while the test script (which does the unfreeze) was waiting for the
    source server to clear some backlog. Below is the C-stack of the stuck source server for the record.
    
    (gdb) where
     #0  clock_nanosleep () from /usr/lib64/libc.so.6
     #1  m_usleep () at sr_unix/sleep.c:25
     #2  wait_for_repl_inst_unfreeze_nocsa_jpl () at sr_port/anticipatory_freeze.h:490
     #3  wait_for_repl_inst_unfreeze () at sr_port/anticipatory_freeze.h:513
     #4  jnl_write_attempt () at sr_port/jnl_write_attempt.c:335
     #5  jnl_flush () at sr_port/jnl_flush.c:57
     #6  update_max_seqno_info () at sr_unix/gtmsource_readfiles.c:741
     #7  first_read () at sr_unix/gtmsource_readfiles.c:881
     #8  read_regions () at sr_unix/gtmsource_readfiles.c:1711
     #9  read_and_merge () at sr_unix/gtmsource_readfiles.c:1544
     #10 gtmsource_readfiles () at sr_unix/gtmsource_readfiles.c:1974
     #11 gtmsource_get_jnlrecs () at sr_unix/gtmsource_process_ops.c:980
     #12 gtmsource_process () at sr_unix/gtmsource_process.c:1544
     #13 gtmsource () at sr_unix/gtmsource.c:528
     #14 mupip_main () at sr_unix/mupip_main.c:124
     #15 dlopen_libyottadb () at sr_unix/dlopen_libyottadb.c:148
     #16 main () at sr_unix/mupip.c:19
    021f6346
Name
Last commit
Last update
sr_aarch64 Loading commit data...
sr_armv7l Loading commit data...
sr_i386 Loading commit data...
sr_linux Loading commit data...
sr_port Loading commit data...
sr_port_cm Loading commit data...
sr_unix Loading commit data...
sr_unix_cm Loading commit data...
sr_unix_gnp Loading commit data...
sr_unix_nsb Loading commit data...
sr_x86_64 Loading commit data...
sr_x86_regs Loading commit data...
.gitlab-ci.yml Loading commit data...
CMakeLists.txt Loading commit data...
COPYING Loading commit data...
Dockerfile Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...