From owner-freebsd-current@freebsd.org Mon Feb 17 20:33:33 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 96BCE246360 for ; Mon, 17 Feb 2020 20:33:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Lwg035QMz4d95 for ; Mon, 17 Feb 2020 20:33:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io1-xd41.google.com with SMTP id d15so19851119iog.3 for ; Mon, 17 Feb 2020 12:33:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=sender:from:mime-version:subject:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=0eVjWpbphUjdwN9TU9jlBmvEtc9Jx//DlKU70NNSNw8=; b=Xm3+CQ+Vl/3C69TL2GOrRYqw5e3bLfE3xbHke9zXgzWTxSDUHjMhuqtn48P58kAMXU AXQLzG19cFbJiKrf8DErGpsGna99jZCqSzOX/wL0IkAEQGl9gYeJjpePzailtYvubM0b RlK+p/BEkzDhNLuBTnL8Alt1hMBZca34YR9fV0bhrfo7Pp+RMuyT/G4AZzFswdNr+CJT vuhYAlIyACEqebvnZ1+r/qmccXn2MKJg6jj/Qo83f89BAQB6qkBC9Xqmcxzm7b6COLKq AfT4Y0n2HMjtW/1o7uprAhZPxU5EI7v/kc/aMypXcXhWZDgXUA835Ic4bpC8xQ1VTmS7 la6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:mime-version:subject:in-reply-to :date:cc:content-transfer-encoding:message-id:references:to; bh=0eVjWpbphUjdwN9TU9jlBmvEtc9Jx//DlKU70NNSNw8=; b=iER0GWgD8EaVpsPyaKO9RP7nj9ApzcHtkrYSJcqzksh2AOunG+cZFMaWs99oB9KUj9 XVZXh4nnk2hBC4ryol4Srm8IKa5gkJg5NIbZKRnpAw9vDe7Si4EVVtusCct6R1PDaWui exYP1w6eF/Q0aLul9i+ZGumWS75tgmBqAgQaShIeftG0ZgX/2w0MPvU7IFfEpZwq9u7Y kHcQQbAXKaj7iIxSmBFEL84Nrin1DlGb315vsk71FoQhnmlXKiBHu2pP7vs/FJCpwGre CZ3YvQ/gerO6f3UVyBGmM4M7JtqW7P2WM0bG69ghbROt8w41HncNv6lHj8hQre83WZoi kvDw== X-Gm-Message-State: APjAAAWKFxxbeCEXxU75JpDChDQED++MGn6bqzcVUsutbr0qKjxUiM3w P/7WVAE/qv2FkiDtDA3hQPFH2ub4Vvw= X-Google-Smtp-Source: APXvYqzOKcTC3lU0eazXvwjsKPoHUCp8KluV3KDIGkH6+wM6HKEWRTArd7TOTYxOtfWgCnkh7AjiyA== X-Received: by 2002:a5d:8ad8:: with SMTP id e24mr13556774iot.291.1581971610996; Mon, 17 Feb 2020 12:33:30 -0800 (PST) Received: from ?IPv6:2603:300b:6:5100:9c8:4290:1f62:e09a? ([2603:300b:6:5100:9c8:4290:1f62:e09a]) by smtp.gmail.com with ESMTPSA id x13sm294374ioj.80.2020.02.17.12.33.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Feb 2020 12:33:30 -0800 (PST) Sender: Warner Losh From: Warner Losh X-Google-Original-From: Warner Losh Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Panic with ataintel and not ready CD on a Dell r710@r357958 In-Reply-To: <2b8c652dad43a5950e74000b6ccd7fc5@lerctr.org> Date: Mon, 17 Feb 2020 13:33:29 -0700 Cc: Freebsd current Content-Transfer-Encoding: quoted-printable Message-Id: <7F73C936-1F16-4D60-9FF6-2FA7C54909FE@gmail.com> References: <2b8c652dad43a5950e74000b6ccd7fc5@lerctr.org> To: Larry Rosenman X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 48Lwg035QMz4d95 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=Xm3+CQ+V; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::d41) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.76 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[1.4.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.26)[ip: (2.32), ipnet: 2607:f8b0::/32(-1.89), asn: 15169(-1.68), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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: Mon, 17 Feb 2020 20:33:33 -0000 > On Feb 17, 2020, at 1:18 PM, Larry Rosenman wrote: >=20 > On 02/17/2020 1:46 pm, Larry Rosenman wrote: >> Unread portion of the kernel message buffer: >> panic: aprobe1: freed with 1 active CCBs >> cpuid =3D 22 >> time =3D 1581771571 >> KDB: stack backtrace: >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xfffffe01fb9a11a0 >> vpanic() at vpanic+0x185/frame 0xfffffe01fb9a1200 >> panic() at panic+0x43/frame 0xfffffe01fb9a1260 >> cam_periph_release_locked_buses() at >> cam_periph_release_locked_buses+0x372/frame 0xfffffe01fb9a1780 >> cam_periph_release_locked() at cam_periph_release_locked+0x1b/frame >> 0xfffffe01fb9a17a0 >> probedone() at probedone+0x186/frame 0xfffffe01fb9a1c60 >> xpt_done_process() at xpt_done_process+0x358/frame 0xfffffe01fb9a1ca0 >> xpt_done_td() at xpt_done_td+0xf5/frame 0xfffffe01fb9a1cf0 >> fork_exit() at fork_exit+0x80/frame 0xfffffe01fb9a1d30 >> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe01fb9a1d30 >> --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- >> Uptime: 1m8s >> Dumping 6077 out of 131029 = MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91% >> __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 >> 55 __asm("movq %%gs:%P1,%0" : "=3Dr" (td) : "n" >> (offsetof(struct pcpu, >> (kgdb) #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 >> #1 doadump (textdump=3D1) at /usr/src/sys/kern/kern_shutdown.c:393 >> #2 0xffffffff804bdf80 in kern_reboot (howto=3D260) >> at /usr/src/sys/kern/kern_shutdown.c:480 >> #3 0xffffffff804be3dd in vpanic (fmt=3D, = ap=3D) >> at /usr/src/sys/kern/kern_shutdown.c:910 >> #4 0xffffffff804be133 in panic (fmt=3D) >> at /usr/src/sys/kern/kern_shutdown.c:836 >> #5 0xffffffff823c5bc2 in camperiphfree (periph=3D0xfffff80115da2300) >> at /usr/src/sys/cam/cam_periph.c:685 >> #6 cam_periph_release_locked_buses (periph=3D0xfffff80115da2300) >> at /usr/src/sys/cam/cam_periph.c:450 >> #7 0xffffffff823c5bfb in cam_periph_release_locked = (periph=3D0xfffff80115da2300) >> at /usr/src/sys/cam/cam_periph.c:461 >> #8 0xffffffff8240dce6 in probedone (periph=3D0xfffff80115da2300, >> done_ccb=3D) at /usr/src/sys/cam/ata/ata_xpt.c:1352 >> #9 0xffffffff823cee08 in xpt_done_process (ccb_h=3D0xfffff8015013e800)= >> at /usr/src/sys/cam/cam_xpt.c:5488 >> #10 0xffffffff823d0db5 in xpt_done_td (arg=3D0xffffffff8243d780 = ) >> at /usr/src/sys/cam/cam_xpt.c:5515 >> #11 0xffffffff80483200 in fork_exit (callout=3D0xffffffff823d0cc0 = , >> arg=3D0xffffffff8243d780 , = frame=3D0xfffffe01fb9a1d40) >> at /usr/src/sys/kern/kern_fork.c:1059 >> #12 >> (kgdb) >> Core IS available as is the kernel >> I do load the ataintel driver as a module. Removing it allows me to = boot. >> What info do you all need? >=20 > Forgot to include, the previous working version was r356506 I=E2=80=99ve fixed this in r357969 which reverted r357897. Looks like you tried 11 revs too soon. The commit message for r357969 = says it all: The KASSERT is too strict: revert r357897 It's valid for a periph to be removed with outstanding transactions = on the device. In CAM, multiple periphs attach to a single device. There's = no interlock to prevent one of these going away while other periphs have = outstanding CCBs and it's not an error either. Remove this overly agressive KASSERT to = prevent false-positive panics when devices depart. Sorry for the hassle. I=E2=80=99ve been trying to find a way to trap a = race that we=E2=80=99re seeing at work sooner, and I thought this was = good, but I tested my kernel on a non-invariants tree so thought it was = cool, only to discover a little later it wasn=E2=80=99t. :( Warner=