From owner-freebsd-current@freebsd.org Sat Feb 17 12:03:59 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD9E9F0635D for ; Sat, 17 Feb 2018 12:03:59 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF65079E41; Sat, 17 Feb 2018 12:03:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 8646626027E; Sat, 17 Feb 2018 13:03:57 +0100 (CET) To: Warner Losh , FreeBSD Current From: Hans Petter Selasky Subject: panic in daprobedone: Unholding 4 with cnt = 0 Message-ID: Date: Sat, 17 Feb 2018 13:01:00 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Feb 2018 12:03:59 -0000 I've started to hit this panic with USB mass storage, before even the device has become in-use: panic: Unholding 4 with cnt = 0 Backtrace: vpanic() panic() daprobedone() dadone() xpt_done_process() xpt_done_td() fork_exit() fork_trampoline() db> > static inline void > da_periph_unhold(struct cam_periph *periph, da_ref_token token) > { > int cnt; > struct da_softc *softc = periph->softc; > > token_sanity(token); > DA_PERIPH_PRINT(periph, "Unholding device %s (%d)\n", > da_ref_text[token], token); > cnt = atomic_fetchadd_int(&softc->ref_flags[token], -1); > if (cnt != 1) > panic("Unholding %d with cnt = %d", token, cnt); > cam_periph_unhold(periph); > }