<div dir="ltr"><div>hi, I'm current using sheepdog v0.8.3, with journal enable </div><div>When configure with --enable-debug and start sheep with journal ,</div><div>one of sheep's thread [journal commit] goes into infinite loop in function `trace_set_tid_map`</div><div><br></div><div>lib/work.c </div><div><div>static void trace_set_tid_map(int tid)</div><div>{</div><div>        sd_mutex_lock(&tid_map_lock);</div><div>        if (tid > tid_max) {</div><div>                size_t old_tid_max = tid_max;</div><div><br></div><div>                /* enlarge bitmap size */</div><div><br></div><div>                while (tid > tid_max)</div><div>                        tid_max *= 2;</div><div><br></div><div>                tid_map = alloc_bitmap(tid_map, old_tid_max, tid_max);</div><div>        }</div><div>        set_bit(tid, tid_map);</div><div>        sd_mutex_unlock(&tid_map_lock);</div><div>}</div></div><div><br></div><div>because `tid_max` is not initialized until function `wq_trace_init` which is called </div><div>by 'create_work_queues` after journal initialize progress.</div><div><br></div><div>I think maybe we can just set the tid_max to TID_MAX_DEFAULT</div><div><br></div><div><br></div><div><br></div></div>