assertion failed in userland taskq_destroy()
In the userland taskq implementation (usr/src/lib/libzpool/common/taskq.c), used by zdb(1m) and ztest, the following assertion may be seen:
Assertion failed: tq->tq_freelist != NULL, file ../common/taskq.c, line 290, function taskq_destroy
The problem is that tqent_flags is never initialized. Its undefined contents may have the low bit set, thus treating it as TQENT_FLAG_PREALLOC, and therefore not removing the taskq_ent_t from the tq_freelist (from taskq_thread()).
In the kernel implementation (usr/src/uts/commonos/taskq.c), tqent_flags is initialized to zero in taskq_dispatch(). The fix is to do the same in the userland implementation.
I couldn't reproduce this with zdb or ztest, but a new libzpool consumer that I'm working on hits this every time.
Updated by Garrett D'Amore over 7 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
- Tags deleted (
user: Garrett D'Amore <email@example.com>
date: Sun Feb 05 14:33:05 2012 -0800
1557 assertion failed in userland taskq_destroy()
Reviewed by: Richard Lowe <firstname.lastname@example.org>
Reviewed by: George Wilson <email@example.com>
Approved by: Eric Schrock <firstname.lastname@example.org>