From owner-freebsd-fs@freebsd.org Wed Nov 22 16:26:12 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8996BDEF37D for ; Wed, 22 Nov 2017 16:26:12 +0000 (UTC) (envelope-from youzhong@gmail.com) Received: from mail-ot0-x22b.google.com (mail-ot0-x22b.google.com [IPv6:2607:f8b0:4003:c0f::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4853D7FE1B; Wed, 22 Nov 2017 16:26:12 +0000 (UTC) (envelope-from youzhong@gmail.com) Received: by mail-ot0-x22b.google.com with SMTP id s12so14029067otc.0; Wed, 22 Nov 2017 08:26:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=stBy14Eiv7nPFQwDTpNGQbFHUo8wgciH6eSLBUTTAgc=; b=oSyP30+4+/eKhhddkPoK5NqOnFz3g/W7uD9Lh2dTMc2ZBaymnIW1y6TyudtPQDxne3 uk0LrCp2m0ReSVZoGbvUfQo0ajm4ixnuvH33k3Plt30DG3KPGrqLNdG4w72jcM9xHk7a RzXUY4LTf5YE9wkCg2neOLTSsj10Pr08NvNfm05Kq5octFZmCUEG6SH2PfR2jcErDEj/ s9XbfZ6pCU4j4s6sHsC9Kn4wyAu3wZx/jIhQ9f5xdVSB/9Io7zjVqFP7vz+LB7LXiQ0N YUmqQvmSCKrRU9dSo/+Sq0lsQtT2YAQ2e7qajAWzYJYVgUgdqHgJbXSYurvmiPcwfBtn ERlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=stBy14Eiv7nPFQwDTpNGQbFHUo8wgciH6eSLBUTTAgc=; b=onzOy/6touDePrnwIx3/YVp6TVJ8LttyZRJuazI/6Ggd3C+F8xXqSNSbiyzsYH1zh0 1eWsOjaU1pZkpfIWCP2UCPtPrERY342NzeASamfwBUoXBOqwkQrci+uYjdCxQPfFpXJ8 80dlIe4Gl2e2dCPREOLQVFJHg81UsF8LAADMenitD/F7zRbcPKCGHseyW1EpWTOd/qK2 K3q4aCVhh5dh1e0+KbMpkR55uX02Tm9Qa5YL10SjypF9IPdWO3VDU//xlLzyaaoMwKjz QfKYTaNBSBnUm11KqdqcXmvj+EfBoaQrDuy+L/LLBzOvTy3Bw3xslXq5yvwKLmPuGLq2 RoAQ== X-Gm-Message-State: AJaThX6LQL+dY6eRF4xoxB104hOQBjJIPVEzMPAd9STeIh/i5g0H5XEg l/CC5fVCRQkmIwyZQp8eIXX0kr3y/d5BhREMZZhtc7kh X-Google-Smtp-Source: AGs4zMaIl7+TR1trd002bmYx18ghVeVsgxsBSMwgGW8dbDpy1Egfg9Vzc0JVQrooCPKmWzMSpZ8zvNl0jKbTJFuOoBE= X-Received: by 10.157.89.173 with SMTP id u45mr3376243oth.341.1511367971248; Wed, 22 Nov 2017 08:26:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.140.73 with HTTP; Wed, 22 Nov 2017 08:26:10 -0800 (PST) In-Reply-To: <78d712d9-dda3-0411-262e-bb64f9ab46eb@FreeBSD.org> References: <3A5A10BE32AC9E45B4A22F89FC90EC0701C367D3D1@QLEXC01.Quorum.local> <5021a016-9193-b626-78cf-54ffa3929e22@FreeBSD.org> <3A5A10BE32AC9E45B4A22F89FC90EC0701C367D562@QLEXC01.Quorum.local> <3A5A10BE32AC9E45B4A22F89FC90EC0701C367D636@QLEXC01.Quorum.local> <41e2465d-e1b5-33ce-57b5-49bea6087d9a@FreeBSD.org> <78d712d9-dda3-0411-262e-bb64f9ab46eb@FreeBSD.org> From: Youzhong Yang Date: Wed, 22 Nov 2017 11:26:10 -0500 Message-ID: Subject: Re: zio_done panic in 10.3 To: Andriy Gapon Cc: Shiva Bhanujan , "cem@freebsd.org" , "freebsd-fs@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2017 16:26:12 -0000 Thanks Andriy. Two bug reports filed: https://www.illumos.org/issues/8857 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223803 On Wed, Nov 22, 2017 at 10:22 AM, Andriy Gapon wrote: > On 22/11/2017 16:40, Youzhong Yang wrote: > > Hi Andriy, > > > > This is nice! I am 100% sure it's exactly the same issue I experienced > and then > > reported to illumos mailing list. In all the crash dumps zio->io_done = > > l2arc_read_done, so I thought the crash must be related to L2ARC. Once I > set > > secondarycache=metadata, the frequency of crash went from one per 2 days > down to > > one per week. I've been puzzled by what could have caused a zio being > destroyed > > while there's still child zio. Your explanation definitely makes sense! > > Oh, I now recall seeing your report: > https://illumos.topicbox.com/groups/zfs/Tccd8b4463865899e > I remember that it raised my interest, but then I forgot about it and > didn't > correlate it with the latest reports. > > > By the way, is there a FreeBSD bug report or an illumos bug number > tracking this > > issue? I would be more than happy to create one if needed, and also test > your > > potential fix here in our environment. > > I am not aware of any existing bug report. > It would be great if you could open one [ or two :-) ] > If you open an illumos issue, please also add George Wilson as a watcher. > I think that George is also interested in fixing this issue and he knows > the > relevant code better than me. > > Thank you! > > > On Tue, Nov 21, 2017 at 3:46 PM, Andriy Gapon > > wrote: > > > > > > > > > > On 21/11/2017 21:30, Shiva Bhanujan wrote: > > > it did get compressed to 0.5G - still too big to send via email. > I did send some more debug information by running kgdb on the core file to > Andriy, and I'm waiting for any analysis that he might provide. > > > > Yes, kgdb-over-email turned out to be a far more efficient > compression :-) > > I already have an analysis based on the information provided by > Shiva and by > > another user who has the same problem and contacted me privately. > > I am discussing possible ways to fix the problem with George Wilson > who was very > > kind to double-check the analysis, complete it and suggest possible > fixes. > > > > A short version is that dbuf_prefetch and > dbuf_prefetch_indirect_done functions > > chain new zio-s under the same parent zio (a completion of one child > zio may > > create another child zio). They do it using arc_read which can > create either a > > logical zio in most cases or a vdev zio for a read from a cache > device (2arc). > > zio_done() has a check for the completion of a parent zio's children > but that > > check is not completely safe and can be broken by the pattern that > dbuf_prefetch > > can create. So, under some specific circumstances the parent zio > may complete > > and get destroyed while there is a child zio. > > > > I believe this problem to be rather rare, but there could be > configurations and > > workloads where it's triggered more often. > > The problem does not happen if there are no cache devices. > > > > > From: Conrad Meyer [cem@freebsd.org ] > > > > > > Sent: Tuesday, November 21, 2017 9:04 AM > > > > > > To: Shiva Bhanujan > > > > > > Cc: Andriy Gapon; freebsd-fs@freebsd.org freebsd-fs@freebsd.org> > > > > > > Subject: Re: zio_done panic in 10.3 > > > > > > > > > > > > > > > > > > > > > > > > Have you tried compressing it with e.g. xz or zstd? > > > > > > -- > > Andriy Gapon > > _______________________________________________ > > freebsd-fs@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > > > > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org > > " > > > > > > > -- > Andriy Gapon >