session: fix segment alloc/free worker race