From owner-freebsd-stable@FreeBSD.ORG Sun Nov 16 07:29:27 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 707E36F6 for ; Sun, 16 Nov 2014 07:29:27 +0000 (UTC) Received: from mail-yk0-x22e.google.com (mail-yk0-x22e.google.com [IPv6:2607:f8b0:4002:c07::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B4165FB for ; Sun, 16 Nov 2014 07:29:27 +0000 (UTC) Received: by mail-yk0-f174.google.com with SMTP id 10so377340ykt.5 for ; Sat, 15 Nov 2014 23:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=xNvbATkoTQZey4yJDYzGsLD1+1YROAE98BeLGfstgl4=; b=PwZ3dEc5ImAweRG3XFqcOOJayw0CDTqoVBVEdkojW/tCQmMsCpEDCmEs9r0Sx5UshN pAfgpWsiPb9bzWUeHyCmunZcNoRNt12CUc+DcNCG22izjRNSqEPaLG1QMlOp5GDwguFi DrHA3XpHZYRaNk3CbVXGBGBQV7VQXwT09T6g+yONwAZYacvG77XM2bUGw3RGcKNZPJp/ qaUnm+ymuaYaEDXC/sWEzyAi6i8jHoC0XECMdN+sqtsaypeiJFmjPp3mVNU8Fwd1Y/YN 5+II/kZvz4tJazVPaj2J6uz7DVL3HbMQWirVxcWISJGsjCYuQgJjTfRxi6TaN3Byvv6b tFKg== MIME-Version: 1.0 X-Received: by 10.170.98.84 with SMTP id p81mr851774yka.40.1416122966265; Sat, 15 Nov 2014 23:29:26 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.170.82.197 with HTTP; Sat, 15 Nov 2014 23:29:26 -0800 (PST) In-Reply-To: References: Date: Sat, 15 Nov 2014 23:29:26 -0800 X-Google-Sender-Auth: FkUwLtMG54fg-g2QUnpaBE4RH8Q Message-ID: Subject: Re: ZFS pool creation from files leads to a crash From: "K. Macy" To: Bogdan SOLGA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 07:29:27 -0000 I can reproduce this easily on head and have a deoptimized kernel so that gdb gives useful information. It looks like the trim changes might have broken this. It's too late for me in PST to try and track this down tonight. Maybe others who have spent more time in this code can chime in in a timely fashion. Otherwise I'll look at it on Monday or Tuesday. Unread portion of the kernel message buffer: Fatal trap 12: page fault while in kernel mode cpuid =3D 3; apic id =3D 04 fault virtual address =3D 0x0 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff80d8373a stack pointer =3D 0x28:0xfffffe01219f66a0 frame pointer =3D 0x28:0xfffffe01219f66b0 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 1280 (zpool) Reading symbols from /boot/kernel/zfs.ko.symbols...done. Loaded symbols for /boot/kernel/zfs.ko.symbols Reading symbols from /boot/kernel/opensolaris.ko.symbols...done. Loaded symbols for /boot/kernel/opensolaris.ko.symbols Reading symbols from /boot/kernel/sem.ko.symbols...done. Loaded symbols for /boot/kernel/sem.ko.symbols #0 doadump (textdump=3D564092400) at /usr/home/kmacy/devel/freebsd-head/sys/kern/kern_shutdown.c:261 261 dumptid =3D curthread->td_tid; (kgdb) bt #0 doadump (textdump=3D564092400) at /usr/home/kmacy/devel/freebsd-head/sys/kern/kern_shutdown.c:261 #1 0xffffffff80361e48 in db_fncall_generic (addr=3D-2137746016, rv=3D0xfffffe01219f5d80, nargs=3D0, args=3D0xfffffe01219f5d90) at /usr/home/kmacy/devel/freebsd-head/sys/ddb/db_command.c:568 #2 0xffffffff80361b1a in db_fncall (dummy1=3D0, dummy2=3D0, dummy3=3D-2199= 009086476, dummy4=3D0xfffffe01219f5e70 " ^\237!\001=C3=BE=C3=BF=C3=BF\231\022\215\= 200\001") at /usr/home/kmacy/devel/freebsd-head/sys/ddb/db_command.c:616 #3 0xffffffff80361794 in db_command (last_cmdp=3D0xffffffff812a67d8, cmd_table=3D0x0, dopager=3D1) at /usr/home/kmacy/devel/freebsd-head/sys/ddb/db_command.c:440 #4 0xffffffff803613ad in db_command_loop () at /usr/home/kmacy/devel/freebsd-head/sys/ddb/db_command.c:493 #5 0xffffffff803658f8 in db_trap (type=3D12, code=3D0) at /usr/home/kmacy/devel/freebsd-head/sys/ddb/db_main.c:251 #6 0xffffffff809a310c in kdb_trap (type=3D12, code=3D0, tf=3D0xfffffe01219= f65f0) at /usr/home/kmacy/devel/freebsd-head/sys/kern/subr_kdb.c:654 #7 0xffffffff80d87036 in trap_fatal (frame=3D0xfffffe01219f65f0, eva=3D0) at /usr/home/kmacy/devel/freebsd-head/sys/amd64/amd64/trap.c:861 #8 0xffffffff80d872aa in trap_pfault (frame=3D0xfffffe01219f65f0, usermode= =3D0) at /usr/home/kmacy/devel/freebsd-head/sys/amd64/amd64/trap.c:709 #9 0xffffffff80d86240 in trap (frame=3D0xfffffe01219f65f0) at /usr/home/kmacy/devel/freebsd-head/sys/amd64/amd64/trap.c:426 #10 0xffffffff80d87918 in trap_check (frame=3D0xfffffe01219f65f0) at /usr/home/kmacy/devel/freebsd-head/sys/amd64/amd64 /trap.c:620 #11 0xffffffff80d5b9f2 in calltrap () at /usr/home/kmacy/devel/freebsd-head/sys/amd64/amd64/exception.S:231 #12 0xffffffff80d8373a in bcopy () at /usr/home/kmacy/devel/freebsd-head/sys/amd64/amd64/support.S:119 #13 0xffffffff809c6f97 in uiomove_faultflag (cp=3D0xfffffe0005e0e000, n=3D131072, uio=3D0xfffffe01219f6d78, nofault=3D0) at /usr/home/kmacy/devel/freebsd-head/sys/kern/subr_uio.c:208 #14 0xffffffff809c6cd5 in uiomove (cp=3D0xfffffe0005e0e000, n=3D131072, uio=3D0xfffffe01219f6d78) at /usr/home/kmacy/devel/freebsd-head/sys/kern/subr_uio.c:142 #15 0xffffffff8191810d in zfs_uiomove (cp=3D0xfffffe0005e0e000, n=3D131072, dir=3DUIO_WRITE, uio=3D0xfffffe01219f6d78) at uio.h:81 #16 0xffffffff81914df6 in dmu_write_uio_dnode (dn=3D0xfffff8006e78cb70, uio=3D0xfffffe01219f6d78, size=3D131072, tx=3D0xfffff800098f5600) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/common/= fs/zfs/dmu.c:1171 #17 0xffffffff81914be3 in dmu_write_uio_dbuf (zdb=3D0xfffff8005d975408, uio=3D0xfffffe01219f6d78, size=3D131072, tx=3D0xfffff800098f5600) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/common/= fs/zfs/dmu.c:1209 #18 0xffffffff81a4a698 in zfs_write (vp=3D0xfffff8005d94a3b0, uio=3D0xfffffe01219f6d78, ioflag=3D128, cr=3D0xfffff80002cd9000, ct=3D0x0) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/openso= laris/uts/common/fs/zfs/zfs_vnops.c:1051 #19 0xffffffff81a4106e in zfs_freebsd_write (ap=3D0xfffffe01219f6ca8) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/zfs_vnops.c:6104 #20 0xffffffff80e9fc50 in VOP_WRITE_APV (vop=3D0xffffffff81ae6600, a=3D0xfffffe01219f6ca8) at vnode_if.c:997 #21 0xffffffff80a7508e in VOP_WRITE (vp=3D0xfffff8005d94a3b0, uio=3D0xfffffe01219f6d78, ioflag=3D128, cred=3D0xfffff80002cd9000) at vnode_if.h:413 #22 0xffffffff80a74932 in vn_rdwr (rw=3DUIO_WRITE, vp=3D0xfffff8005d94a3b0, base=3D0x0, len=3D104857600, offset=3D0, segflg=3DUIO_SYSSPACE, ioflg=3D128, active_cred=3D0xfffff80002cd9000, file_cred=3D0x0, aresid=3D0xfffffe01219f6e50, td=3D0xfffff80009ac14a0) at /usr/home/kmacy/devel/freebsd-head/sys/kern/vfs_vnops.c:559 #23 0xffffffff819b9a2c in zfs_vn_rdwr (rw=3DUIO_WRITE, vp=3D0xfffff8005d94a3b0, base=3D0x0, len=3D104857600, offset=3D0, seg=3DUIO_SYSSPACE, ioflag=3D128, ulimit=3D0, cr=3D0xfffff80002cd9000, residp=3D0xfffffe01219f6f18) at vnode.h:237 #24 0xffffffff819b9706 in vdev_file_io_start (zio=3D0xfffff80009ebb000) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/vdev_file.c:188 #25 0xffffffff819fcea3 in zio_vdev_io_start (zio=3D0xfffff80009ebb000) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/zio.c:2709 #26 0xffffffff819f51f1 in zio_execute (zio=3D0xfffff80009ebb000) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/zio.c:1409 #27 0xffffffff819f368a in zio_wait (zio=3D0xfffff80009ebb000) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/zio.c:1433 #28 0xffffffff819bb51e in vdev_label_init (vd=3D0xfffff80009919800, crtxg=3D4, reason=3DVDEV_LABEL_CREATE) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/vdev_label.c:718 #29 0xffffffff819bb0f9 in vdev_label_init (vd=3D0xfffff8000991a000, crtxg=3D4, reason=3DVDEV_LABEL_CREATE) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/vdev_label.c:642 #30 0xffffffff819b2ab6 in vdev_create (vd=3D0xfffff8000991a000, txg=3D4, isreplacing=3D0) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/vdev.c:1662 #31 0xffffffff8198cd7b in spa_create (pool=3D0xfffffe0005e4e000 "test-pool", nvroot=3D0xfffff80009511d60, props=3D0xfffff8006e277580, zplprops=3D0xfffff800097317e0) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/spa.c:3617 #32 0xffffffff81a218fe in zfs_ioc_pool_create (zc=3D0xfffffe0005e4e000) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/zfs_ioctl.c:1542 #33 0xffffffff81a1de0d in zfsdev_ioctl (dev=3D0xfffff80007125c00, zcmd=3D3222821376, arg=3D0xfffffe01219f78a0 "\004", flag=3D3, td=3D0xfffff80009ac14a0) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/zfs_ioctl.c:6198 #34 0xffffffff80783c23 in devfs_ioctl_f (fp=3D0xfffff800096b4280, com=3D3222821376, data=3D0xfffffe01219f78a0, cred=3D0xfffff80002cd6600, td=3D0xfffff80009ac14a0) at /usr/home/kmacy#13 0xffffffff809c6f97 in uiomove_faultflag (cp=3D0xfffffe0005e0e000, n=3D131072, uio=3D0xfffffe01219f6d78, nofault=3D0= ) at /usr/home/kmacy/devel/freebsd-head/sys/kern/subr_uio.c:208 208 bcopy(iov->iov_base, cp, cnt); Current language: auto; currently minimal (kgdb) p iov->iov_base $1 =3D (void *) 0x0 (kgdb) p *iov $2 =3D {iov_base =3D 0x0, iov_len =3D 104857600} /devel/freebsd-head/sys/fs/devfs/devfs_vnops.c:775 (kgdb) f 28 #28 0xffffffff819bb51e in vdev_label_init (vd=3D0xfffff80009919800, crtxg=3D4, reason=3DVDEV_LABEL_CREATE) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/vdev_label.c:718 718 zio_wait(zio_trim(NULL, spa, vd, 0, vd->vdev_psize));kgdb) down #27 0xffffffff819f368a in zio_wait (zio=3D0xfffff80009ebb000) at /usr/home/kmacy/devel/freebsd-head/sys/cddl/contrib/opensolaris/uts/= common/fs/zfs/zio.c:1433 1433 zio_execute(zio); (kgdb) p zio->io_data $2 =3D (void *) 0x0 (kgdb) f 23 #23 0xffffffff819b9a2c in zfs_vn_rdwr (rw=3DUIO_WRITE, vp=3D0xfffff8005d94a3b0, base=3D0x0, len=3D104857600, offset=3D0, seg=3DUIO_SYSSPACE, ioflag=3D128, ulimit=3D0, cr=3D0xfffff80002cd9000, residp=3D0xfffffe01219f6f18) at vnode.h:237 237 error =3D vn_rdwr(rw, vp, base, len, offset, seg, ioflag, cr, NOCRED, (kgdb) p base $3 =3D 0x0 On Sat, Nov 15, 2014 at 10:38 PM, Bogdan SOLGA wro= te: > Hello, everyone! > > Yesterday I have started to test FreeBSD-10.1-RELEASE, using VirtualBox V= Ms > created from the mfsBSD 10.1 image. I installed th= e > system on a 2 GB zpool, with fletcher4 checksumming and LZJB compression. > > As I need some other ZFS zpools for testing purposes, I have tried to > create them from a few empty files, created as follows: > # truncate -s 100M /tmp/file1 > # truncate -s 100M /tmp/file2 > # zpool create test-pool /tmp/zfile1 /tmp/file2 > > When the 'zpool create' command is executed, it leads to a crash and the = VM > is automatically restarted. I have searched the crash dump in the logs, b= ut > coulnd't find it. > > The same operation (creating a ZFS pool from files) works properly on > FreeBSD-10-RELEASE. > > Any help is appreciated :) > > Thank you! > > Kind regards, > Bogdan > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"