From owner-freebsd-current@freebsd.org Fri Oct 9 22:22:48 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 6784942F102 for ; Fri, 9 Oct 2020 22:22:48 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oo1-f53.google.com (mail-oo1-f53.google.com [209.85.161.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4C7Myb37wxz3VBb for ; Fri, 9 Oct 2020 22:22:47 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oo1-f53.google.com with SMTP id o20so2726995ook.1 for ; Fri, 09 Oct 2020 15:22:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x+Qrxf88V+yImIvXBJN+f1OksZ9aDecMUK9iWvcm+oY=; b=G7arTMVZ8J1AqX3gMqsFHF0+k83HUTI2RyHf4RZn5FTveOtIONla3gRPqR0besrsOX gSYp5kHxbhq1uofbDpI80UrH2O3n3T1wK4w2LGrhQ0z0t8PR7Vf9C03POVGK9fqbModX GFZV8U25fpd3Sm8Pa5Y1hz6wulygSEhVgJ0NUBuwo9pce5mhots2r4pZJUcUATek9Vf9 6oCxXvkcgaqjaIyBgnfg9NjDCKd3gVhwsdi6r3/POD3qoORW9bN2YwNOGMyg37/FR9i1 YUnLftUTMNj/rXF8btCKLC+VAWLa7Rc6mSXSuwEtm0bp44I3vSi7U6kHzsURPQSgsqL3 A/8g== X-Gm-Message-State: AOAM533qKu64ILf7cgg4+GCQLutEuxeXUVS5k+qm4DTrBKut5UmK4Ty5 RGkLm4omnxL6crXm4VHxOpBVKwClNBf3WuwugQrbdDHO X-Google-Smtp-Source: ABdhPJxm2OXqVUynOTcjUr+BusAdkqOz0V10wJJyGeIeGhlbSls08Kau6zHNldcK9K1DFN5OuZ1obAdfGo1ObDIATF0= X-Received: by 2002:a4a:d04c:: with SMTP id x12mr10613178oor.61.1602282166319; Fri, 09 Oct 2020 15:22:46 -0700 (PDT) MIME-Version: 1.0 References: <1dfaf797-f23b-af97-d2d3-efa0f5bb88d9@vangyzen.net> <95636bbf-2367-f226-f462-d5581581c18f@vangyzen.net> In-Reply-To: <95636bbf-2367-f226-f462-d5581581c18f@vangyzen.net> From: Alan Somers Date: Fri, 9 Oct 2020 16:22:34 -0600 Message-ID: Subject: Re: ZFS crash -- zvol_geom_bio_getattr called when volmode=dev To: Eric van Gyzen Cc: FreeBSD CURRENT X-Rspamd-Queue-Id: 4C7Myb37wxz3VBb X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.49 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[asomers]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[209.85.161.53:from]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.004]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.58)[-0.578]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[209.85.161.53:from]; NEURAL_HAM_MEDIUM(-0.91)[-0.905]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; MAILMAN_DEST(0.00)[freebsd-current] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 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: Fri, 09 Oct 2020 22:22:48 -0000 This sounds like it might be a regression introduced by the OpenZFS merge. Have you compared vdev_geom.c in OpenZFS vs the old version? -Alan On Fri, Oct 9, 2020 at 3:48 PM Eric van Gyzen wrote: > On 10/9/20 4:39 PM, Eric van Gyzen wrote: > > Does this look familiar? I'm creating a zvol with volmode=dev, but some > > geom code paths were taken. If this looks new, I'll provide more > details. > > primarycache=none also seems to be a factor. I can easily repro with: > > zfs create -s -V 10G -o primarycache=none -o volmode=dev .../testvol > > > 13.0-CURRENT r366500+84ccaf49083c-c272054 GENERIC > > > > #8 > > #9 zvol_geom_bio_getattr (bp=0xfffff80376132900) > > at /usr/src/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c:545 > > #10 zvol_geom_bio_start (bp=0xfffff80376132900) > > at /usr/src/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c:519 > > #11 0xffffffff80b1c684 in g_io_schedule_down (tp=) > > at /usr/src/sys/geom/geom_io.c:848 > > #12 0xffffffff80b1cfcc in g_down_procbody (arg=) > > at /usr/src/sys/geom/geom_kern.c:111 > > > > (kgdb) f 9 > > #9 zvol_geom_bio_getattr (bp=0xfffff80376132900) > > at /usr/src/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c:545 > > 545 spa_t *spa = dmu_objset_spa(zv->zv_objset); > > > > (kgdb) l > > 540 zvol_state_t *zv; > > 541 > > 542 zv = bp->bio_to->private; > > 543 ASSERT(zv != NULL); > > 544 > > 545 spa_t *spa = dmu_objset_spa(zv->zv_objset); > > 546 uint64_t refd, avail, usedobjs, availobjs; > > 547 > > 548 if (g_handleattr_int(bp, "GEOM::candelete", 1)) > > 549 return (0); > > > > (kgdb) p zv > > $1 = (zvol_state_t *) 0x0 > > > > (kgdb) p *bp > > $3 = { > > bio_cmd = 4, > > bio_flags = 0, > > bio_cflags = 0, > > bio_pflags = 0, > > bio_dev = 0x0, > > bio_disk = 0x0, > > bio_offset = 0, > > bio_bcount = 0, > > bio_data = 0xfffff801fa687c00 "", > > bio_ma = 0x0, > > bio_ma_offset = 0, > > bio_ma_n = 0, > > bio_error = 0, > > bio_resid = 0, > > bio_done = 0x0, > > bio_driver1 = 0x0, > > bio_driver2 = 0x0, > > bio_caller1 = 0x0, > > bio_caller2 = 0x0, > > bio_queue = { > > tqe_next = 0xffffffffffffffff, > > tqe_prev = 0xffffffffffffffff > > }, > > bio_attribute = 0xffffffff81223c03 "GEOM::physpath", > > bio_zone = { > > zone_cmd = 0 '\000', > > zone_params = { > > disk_params = { > > zone_mode = 0, > > flags = 0, > > optimal_seq_zones = 0, > > optimal_nonseq_zones = 0, > > max_seq_zones = 0 > > }, > > rwp = { > > id = 0, > > flags = 0 '\000' > > }, > > report = { > > starting_id = 0, > > rep_options = 0 '\000', > > header = { > > same = 0 '\000', > > maximum_lba = 0, > > reserved = '\000' > > }, > > entries_allocated = 0, > > entries_filled = 0, > > entries_available = 0, > > entries = 0x0 > > } > > } > > }, > > bio_from = 0xfffff80006b92880, > > bio_to = 0xfffff80006972500, > > bio_length = 1024, > > bio_completed = 0, > > bio_children = 0, > > bio_inbed = 0, > > bio_parent = 0x0, > > bio_t0 = { > > sec = 50, > > frac = 10248368299661698441 > > }, > > bio_task = 0x0, > > bio_task_arg = 0x0, > > bio_spare1 = 0x0, > > bio_spare2 = 0x0, > > bio_track_bp = 0x0, > > bio_pblkno = 0 > > } > > > > (kgdb) p *bp->bio_to > > $4 = { > > name = 0xfffff80006972598 "zvol/disco_fast/vm/onefs1-1/disk7", > > provider = { > > le_next = 0x0, > > le_prev = 0xfffff80006972428 > > }, > > geom = 0xfffff80006972400, > > consumers = { > > lh_first = 0xfffff80006b92880 > > }, > > acr = 1, > > acw = 0, > > ace = 0, > > error = 0, > > orphan = { > > tqe_next = 0x0, > > tqe_prev = 0x0 > > }, > > mediasize = 5368709120, > > sectorsize = 512, > > stripesize = 8192, > > stripeoffset = 0, > > stat = 0xfffff80006d3d120, > > spare1 = 0, > > spare2 = 0, > > flags = 48, > > aliases = { > > lh_first = 0x0 > > }, > > private = 0x0, > > index = 0 > > } > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >