Project

General

Profile

Bug #1557

assertion failed in userland taskq_destroy()

Added by Matthew Ahrens almost 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2011-09-23
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

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.

History

#1

Updated by Garrett D'Amore over 7 years ago

  • Status changed from New to In Progress
#2

Updated by Garrett D'Amore over 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
  • Tags deleted (needs-triage)

Fixed in:

changeset: 13597:3eac1e8e0f4c
tag: tip
user: Garrett D'Amore <>
date: Sun Feb 05 14:33:05 2012 -0800
description:
1557 assertion failed in userland taskq_destroy()
Reviewed by: Richard Lowe <>
Reviewed by: George Wilson <>
Approved by: Eric Schrock <>

Also available in: Atom PDF