hi, I'm currently using sheepodg v0.8.3, configure with --enable-debug & start sheep with journal directory.
during `journal_file_init` progress, journal thread is created. but the `tid_max` is not initialized until `wq_trace_init` is called, which is called just after journal init progress. Thus the journal thread enter into infinite loop when trace is enabled. (below is related code) static void trace_set_tid_map(int tid) { sd_mutex_lock(&tid_map_lock); if (tid > tid_max) { size_t old_tid_max = tid_max; /* enlarge bitmap size */ ## because tid_max is not initialized (which is 0), the journal thread enter into loop while (tid > tid_max) tid_max *= 2; tid_map = alloc_bitmap(tid_map, old_tid_max, tid_max); } set_bit(tid, tid_map); sd_mutex_unlock(&tid_map_lock); } I think `tid_max` should be initialized to TID_MAX_DEFAULT in to avoid issue. thus, change lib/work.c -static size_t tid_max; +static size_t tid_max = TID_MAX_DEFAULT & delete related code in wq_trace_init Correct me if I'm wrong. Thanks
-- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog