From owner-freebsd-geom@FreeBSD.ORG Mon Dec 2 11:06:46 2013 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7972EB0A for ; Mon, 2 Dec 2013 11:06:46 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 62D2D1948 for ; Mon, 2 Dec 2013 11:06:46 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2B6kWW007717 for ; Mon, 2 Dec 2013 11:06:46 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rB2B6jqH007715 for freebsd-geom@FreeBSD.org; Mon, 2 Dec 2013 11:06:45 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 2 Dec 2013 11:06:45 GMT Message-Id: <201312021106.rB2B6jqH007715@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-geom@FreeBSD.org Subject: Current problem reports assigned to freebsd-geom@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 11:06:46 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/183866 geom [geom] graid cannot remove loader detected BIOS RAIDS o kern/183803 geom [geom] FreeBSD 10 Beta 2 geom module does not understa o kern/181704 geom [geom] ggatec crash the system when I write something o kern/179889 geom [geli] geli stopped work after updating RELEASE 9.* so o kern/178684 geom gpart(8) cannot get my GEOM tree o kern/178359 geom [geom] [patch] geom_eli: support external metadata o kern/176744 geom [geom] [patch] BIO_FLUSH not recorded by devstats o kern/170038 geom [geom] geom_mirror always starts degraded after reboot o kern/169539 geom [geom] [patch] fix ability to run gmirror on MSI MegaR a bin/169077 geom bsdinstall(8) does not use partition labels in /etc/fs f kern/165745 geom [geom] geom_multipath page fault on removed drive o kern/165428 geom [glabel][patch] Add xfs support to glabel o kern/164254 geom [geom] gjournal not stopping on GPT partitions o kern/164252 geom [geom] gjournal overflow o kern/164143 geom [geom] Partition table not recognized after upgrade R8 a kern/163020 geom [geli] [patch] enable the Camellia-XTS on GEOM ELI o kern/162690 geom [geom] gpart label changes only take effect after a re o kern/162010 geom [geli] panic: Provider's error should be set (error=0) o kern/161979 geom [geom] glabel doesn't update after newfs, and glabel s o bin/161807 geom [patch] add option for explicitly specifying metadata o kern/161752 geom [geom] glabel(8) doesn't get gpt label change o bin/161677 geom gpart(8) Probably bug in gptboot o kern/160409 geom [geli] failed to attach provider f kern/159595 geom [geom] [panic] panic on gmirror unload in vbox [regres f kern/159414 geom [isp] isp(4)+gmultipath(8) : removing active fiber pat p kern/158398 geom [headers] [patch] includes o kern/158197 geom [geom] geom_cache with size>1000 leads to panics o kern/157879 geom [libgeom] [regression] ABI change without version bump o kern/157863 geom [geli] kbdmux prevents geli passwords from being enter o kern/157739 geom [geom] GPT labels with geom_multipath o kern/157724 geom [geom] gpart(8) 'add' command must preserve gap for sc o kern/157723 geom [geom] GEOM should not process 'c' (raw) partitions fo o kern/157108 geom [gjournal] dumpon(8) fails on gjournal providers o kern/155994 geom [geom] Long "Suspend time" when reading large files fr o bin/154570 geom [patch] gvinum(8) can't be built as part of the kernel o kern/154226 geom [geom] GEOM label does not change when you modify them o kern/150858 geom [geom] [geom_label] [patch] glabel(8) is not compatibl o kern/150626 geom [geom] [gjournal] gjournal(8) destroys label o kern/150555 geom [geom] gjournal unusable on GPT partitions o kern/150334 geom [geom] [udf] [patch] geom label does not support UDF o kern/149762 geom volume labels with rogue characters o bin/149215 geom [panic] [geom_part] gpart(8): Delete linux's slice via o kern/147667 geom [gmirror] Booting with one component of a gmirror, the o kern/145818 geom [geom] geom_stat_open showing cached information for n o kern/145042 geom [geom] System stops booting after printing message "GE o kern/143455 geom gstripe(8) in RELENG_8 (31st Jan 2010) broken o kern/142563 geom [geom] [hang] ioctl freeze in zpool o kern/141740 geom [geom] gjournal(8): g_journal_destroy concurrent error o kern/140352 geom [geom] gjournal + glabel not working o kern/135898 geom [geom] Severe filesystem corruption - large files or l o kern/134113 geom [geli] Problem setting secondary GELI key o kern/133931 geom [geli] [request] intentionally wrong password to destr o bin/132845 geom [geom] [patch] ggated(8) does not close files opened a o bin/131415 geom [geli] keystrokes are unregulary sent to Geli when typ o kern/131353 geom [geom] gjournal(8) kernel lock o kern/129674 geom [geom] gjournal root did not mount on boot o kern/129645 geom gjournal(8): GEOM_JOURNAL causes system to fail to boo o kern/129245 geom [geom] gcache is more suitable for suffix based provid o kern/127420 geom [geom] [gjournal] [panic] Journal overflow on gmirrore o kern/124973 geom [gjournal] [patch] boot order affects geom_journal con o kern/124969 geom gvinum(8): gvinum raid5 plex does not detect missing s o kern/123962 geom [panic] [gjournal] gjournal (455Gb data, 8Gb journal), o kern/123122 geom [geom] GEOM / gjournal kernel lock o kern/122738 geom [geom] gmirror list "losts consumers" after gmirror de o kern/122067 geom [geom] [panic] Geom crashed during boot o kern/120091 geom [geom] [geli] [gjournal] geli does not prompt for pass o kern/115856 geom [geli] ZFS thought it was degraded when it should have o kern/115547 geom [geom] [patch] [request] let GEOM Eli get password fro o kern/113837 geom [geom] unable to access 1024 sector size storage o kern/113419 geom [geom] geom fox multipathing not failing back o kern/107707 geom [geom] [patch] [request] add new class geom_xbox360 to o kern/94632 geom [geom] Kernel output resets input while GELI asks for o kern/90582 geom [geom] [panic] Restore cause panic string (ffs_blkfree o bin/90093 geom fdisk(8) incapable of altering in-core geometry o kern/87544 geom [gbde] mmaping large files on a gbde filesystem deadlo o bin/86388 geom [geom] [geom_part] periodic(8) daily should backup gpa o kern/84556 geom [geom] [panic] GBDE-encrypted swap causes panic at shu o kern/79251 geom [2TB] newfs fails on 2.6TB gbde device o kern/79035 geom [vinum] gvinum unable to create a striped set of mirro o bin/78131 geom gbde(8) "destroy" not working. 80 problems total. From owner-freebsd-geom@FreeBSD.ORG Wed Dec 4 12:59:40 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F0CFB80 for ; Wed, 4 Dec 2013 12:59:40 +0000 (UTC) Received: from work.netasq.com (gwlille.netasq.com [91.212.116.1]) by mx1.freebsd.org (Postfix) with ESMTP id 89EFB1EDC for ; Wed, 4 Dec 2013 12:59:38 +0000 (UTC) Received: from work.netasq.com (localhost [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id DBE5E2706418; Wed, 4 Dec 2013 13:59:31 +0100 (CET) Received: from [10.200.5.1] (unknown [10.2.200.254]) by work.netasq.com (Postfix) with ESMTPSA id A6A902706414; Wed, 4 Dec 2013 13:59:31 +0100 (CET) Message-ID: <529F2748.2060900@netasq.com> Date: Wed, 04 Dec 2013 13:59:52 +0100 From: Paolo Pinto User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: freebsd-geom@freebsd.org Subject: geom_uzip, panic: bio_length in mdstart_vnode() Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms050800030600090900040207" Cc: nicolas dumont X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 12:59:40 -0000 This is a cryptographically signed message in MIME format. --------------ms050800030600090900040207 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi list! My kernel is compiled with option INVARIANTS and I get a reproducible kernel panic when trying to read data from a GEOM based compressed memory disk: Unread portion of the kernel message buffer: panic: bio_length 140288 cpuid =3D 3 KDB: stack backtrace: #0 0xffffffff80909726 at kdb_backtrace+0x66 #1 0xffffffff808d0fa8 at panic+0x1d8 #2 0xffffffff80595949 at mdstart_vnode+0x619 #3 0xffffffff80594053 at md_kthread+0x143 #4 0xffffffff808a3145 at fork_exit+0x135 #5 0xffffffff80c6fabe at fork_trampoline+0xe Uptime: 16m21s Dumping 367 out of 6113 MB:..5%..14%..22%..31%..44%..53%..61%..74%..83%..= 92% Loaded symbols for /boot/kernel/geom_uzip.ko #0 doadump (textdump=3D) at pcpu.h:234 234 pcpu.h: No such file or directory. in pcpu.h (kgdb) #0 doadump (textdump=3D) at pcpu.h:234 #1 0xffffffff808d1552 in kern_reboot (howto=3D260) at /data/usr/home/fabient/fabient-freebsd/sys/kern/kern_shutdown.c:44= 9 #2 0xffffffff808d0f79 in panic (fmt=3D0x1
) at /data/usr/home/fabient/fabient-freebsd/sys/kern/kern_shutdown.c:63= 7 #3 0xffffffff80595949 in mdstart_vnode (sc=3D0xfffffe00070e5000, bp=3D0xfffffe0059bf38b8) at /data/usr/home/fabient/fabient-freebsd/sys/dev/md/md.c:742 #4 0xffffffff80594053 in md_kthread (arg=3D) at /data/usr/home/fabient/fabient-freebsd/sys/dev/md/md.c:945 #5 0xffffffff808a3145 in fork_exit (callout=3D0xffffffff80593f10 , arg=3D0xfffffe00070e5000, frame=3D0xffffff81bdc34c40) at /data/usr/home/fabient/fabient-freebsd/sys/kern/kern_fork.c:992 #6 0xffffffff80c6fabe in fork_trampoline () at /data/usr/home/fabient/fabient-freebsd/sys/amd64/amd64/exception.S:606 #7 0x0000000000000000 in ?? () (kgdb) Panic is coming from a KASSERT : KASSERT(bp->bio_length <=3D MAXPHYS, ("bio_length %jd", (uintmax_t)bp->bio_length)); with MAXPHYS =3D 128*1024 =3D 131072 Environment : $ uname -a FreeBSD refbench 9.2-RELEASE-p1 FreeBSD 9.2-RELEASE-p1 #75 r229873+c58f3c3-dirty: Wed Dec 4 11:22:54 CET 2013 fabient@refbench:/usr/obj/data/usr/home/fabient/fabient-freebsd/sys/GENER= IC amd64 How-To-Repeat : $ mkdir work && cd work $ dd if=3D/dev/random of=3Ddata.img bs=3D256k count=3D1 1+0 records in 1+0 records out 262144 bytes transferred in 0.002899 secs (90427801 bytes/sec) $ ls -lh total 272 -rw-r--r-- 1 paolop devel 256k Dec 4 10:47:51 2013 data.img $ cd - $ makefs -t ffs -o optimization=3Dtime -o version=3D2 foo.img work/ Calculated size of `foo.img': 311296 bytes, 3 inodes Extent size set to 8192 foo.img: 0.3MB (608 sectors) block size 8192, fragment size 1024 using 1 cylinder groups of 0.30MB, 38 blks, 32 inodes. super-block backups (for fsck -b #) at: 32, Populating `foo.img' makefs: Writing inode 3 (work//./data.img), bytes 253952 + 8192: No space left on device First issue; why does this happen? As workaround, I have to create another file/data : $ python -c "print 'a'*300000" > work/bar.txt $ ls -lh work/ total 592 -rw-r--r-- 1 paolop devel 293k Dec 4 10:49:22 2013 bar.txt -rw-r--r-- 1 paolop devel 256k Dec 4 10:47:51 2013 data.img $ makefs -t ffs -o optimization=3Dtime -o version=3D2 foo.img work/ Calculated size of `foo.img': 638976 bytes, 4 inodes Extent size set to 8192 foo.img: 0.6MB (1248 sectors) block size 8192, fragment size 1024 using 1 cylinder groups of 0.61MB, 78 blks, 32 inodes. super-block backups (for fsck -b #) at: 32, Populating `foo.img' Image `foo.img' complete $ mkuzip foo.img; echo $? 0 $ ls -lh foo* -rw-r--r-- 1 paolop devel 624k Dec 4 10:49:24 2013 foo.img -rwxr-xr-x 1 paolop devel 259k Dec 4 10:49:36 2013 foo.img.uzip* So, it's ok, I've my uzip file and I mount it : $ sudo kldload geom_uzip $ sudo mdconfig -a -t vnode -o readonly -f foo.img.uzip md0 $ sudo mount -o ro,noatime /dev/md0.uzip /mnt $ ls -al /mnt/ total 570 drwxr-xr-x 2 1023 1001 512 Dec 4 10:49 . drwxr-xr-x 6 admin wheel 512 Dec 4 09:23 .. -rw-r--r-- 1 1023 1001 300001 Dec 4 10:49 bar.txt -rw-r--r-- 1 1023 1001 262144 Dec 4 10:47 data.img $ cp /mnt/data.img /tmp/ And panic! Is there anything I could do to help debugging this problem? I have the core dump if that helps. Thanks! Regards, --=20 Paolo Pinto R&D System Engineer NETASQ - We secure IT --------------ms050800030600090900040207 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIEnTCC BJkwggOBoAMCAQICCnDGsUgWa/KQbFgwDQYJKoZIhvcNAQEFBQAwgZExCzAJBgNVBAYTAkZS MQ0wCwYDVQQIEwROb3JkMRowGAYDVQQHExFWaWxsZW5ldXZlIGQnQXNjcTEuMCwGA1UEChMl TkVUQVNRIC0gU2VjdXJlIEludGVybmV0IENvbm5lY3Rpdml0eTEnMCUGA1UECxMeTkVUQVNR IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDgxMzE0NDUzM1oXDTE0MDgxMzE0NDUz M1owgc4xCzAJBgNVBAYTAkZSMQ0wCwYDVQQIEwROb3JkMRowGAYDVQQHExFWaWxsZW5ldXZl IGQnQXNjcTEuMCwGA1UEChMlTkVUQVNRIC0gU2VjdXJlIEludGVybmV0IENvbm5lY3Rpdml0 eTEnMCUGA1UECxMeTkVU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B AQEFAASCAQBiUI91DKEx1ppfpTcJGQ/OCR/iL/MbD601nt+4W0SQk8uZEb4evgMsp8rr+dyh P6/DkoTAWJ3arnSC951Pb2Nz/gMGe9xuUkAMqWSJ7aaHGc3sN46JrXlndhOiZvteqV54R8mz UAfdodwQERwVrd/xYPHCXCRi20WGQcc/ZaDVYagxCnNXz6rXraOizT3VbIn+jCc783ti9ZSK BNQL0OyDjj9ZrgB1hq0R6FOgge/Kwn6InENjFyeGC8zoSSAvsAQe0dkyWR+o//E9oWuOPu7/ stbJ3//pADLilb1NzemmjuG0aKQLmpFzAeY4UGfXetwDWyiZ1oUu7bBpRNaDZGZCAAAAAAAA --------------ms050800030600090900040207-- From owner-freebsd-geom@FreeBSD.ORG Wed Dec 4 16:20:39 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2968D9D2 for ; Wed, 4 Dec 2013 16:20:39 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B16DE1D59 for ; Wed, 4 Dec 2013 16:20:38 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rB4GKTYa096328; Wed, 4 Dec 2013 18:20:29 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rB4GKTYa096328 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rB4GKTnQ096326; Wed, 4 Dec 2013 18:20:29 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 4 Dec 2013 18:20:29 +0200 From: Konstantin Belousov To: Paolo Pinto Subject: Re: geom_uzip, panic: bio_length in mdstart_vnode() Message-ID: <20131204162029.GV59496@kib.kiev.ua> References: <529F2748.2060900@netasq.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0hQvwEBO51ZK2gOw" Content-Disposition: inline In-Reply-To: <529F2748.2060900@netasq.com> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: nicolas dumont , freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 16:20:39 -0000 --0hQvwEBO51ZK2gOw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 04, 2013 at 01:59:52PM +0100, Paolo Pinto wrote: > Hi list! >=20 > My kernel is compiled with option INVARIANTS and I get a reproducible > kernel panic when trying to read data from a GEOM based compressed > memory disk: >=20 > Unread portion of the kernel message buffer: > panic: bio_length 140288 > cpuid =3D 3 > KDB: stack backtrace: > #0 0xffffffff80909726 at kdb_backtrace+0x66 > #1 0xffffffff808d0fa8 at panic+0x1d8 > #2 0xffffffff80595949 at mdstart_vnode+0x619 The issue is that geom_uzip creates bios which are larger than MAXPHYS. As a workaround, the following patch should be enough. It only fires assert when md really uses pbuf, and since geom_uzip knows nothing about unmapped bio, the assertion must not trigger. diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 8ae51d1..639677e 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -746,12 +746,12 @@ mdstart_vnode(struct md_s *sc, struct bio *bp) return (error); } =20 - KASSERT(bp->bio_length <=3D MAXPHYS, ("bio_length %jd", - (uintmax_t)bp->bio_length)); if ((bp->bio_flags & BIO_UNMAPPED) =3D=3D 0) { pb =3D NULL; aiov.iov_base =3D bp->bio_data; } else { + KASSERT(bp->bio_length <=3D MAXPHYS, ("bio_length %jd", + (uintmax_t)bp->bio_length)); pb =3D getpbuf(&md_vnode_pbuf_freecnt); pmap_qenter((vm_offset_t)pb->b_data, bp->bio_ma, bp->bio_ma_n); aiov.iov_base =3D (void *)((vm_offset_t)pb->b_data + --0hQvwEBO51ZK2gOw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSn1ZMAAoJEJDCuSvBvK1BrigQAJQpfjM4ycTdVKcJ7WgE4Nwt oIos29ut4baVWhD9Va0irsFo8FnzzX78EVSiNrmFtdsVHo017oP/bijqeBZfQMmd 0hmnDBXubN1wsbN/xSJ8yOyCEuZ1t/XziwlviaZlYzs/14nY8KNweDfE8fNEPfoC nPs9EICfqHn8XNmUAN0gRQ6oKfWxPFUHHeYGSNhwHWospUHimb4F4TzAb2OK+7XL AwLuVterXL1XAV7+hZfMrRvKKVRW8NL1DFLtmzHrQzvT6+M/VwdHLOYt3+m0UTYL L7AvHkgAJDGBF5jgqlsoQXA8pVz2kE3RWnFh0jxi8uQjtFm22vt5gvzQ2A6XT2QU 4K4nEzVPRLmJ98RDjAxwleWgJztOfhl2z9BBwjwJ+v4gAFoHrurwQc9PbQ1lX4BF 0MmN5HVe1kq755MMKSef2TKZyHfjrJROqWKKewYkaXWZGckBJVT5WjnRwDGBGz0Y l3+AznXY/1K80XHV5nFbjZvIxEAiBNuMkyDXb4Y953DhI9oKXDK0virnlgy2CU2g C1iTI+HiHaexbv4eLd9g04QOYrmXOBwtvfa6LLNaqAz/OKYDFYauBLsqmAJ5Y31s LXknyzdRpMOdN3kCxNpv8eCR/RcgLzrkN8KIIv72H9xElO0vaF+/p6mnzLzThOn/ pBH8/mQxiP9SI+BEFl8L =1ztn -----END PGP SIGNATURE----- --0hQvwEBO51ZK2gOw-- From owner-freebsd-geom@FreeBSD.ORG Thu Dec 5 02:07:50 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FC35AEA for ; Thu, 5 Dec 2013 02:07:50 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 78AB4135C for ; Thu, 5 Dec 2013 02:07:50 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rB527hvZ056397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 4 Dec 2013 18:07:43 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rB527hJk056396; Wed, 4 Dec 2013 18:07:43 -0800 (PST) (envelope-from jmg) Date: Wed, 4 Dec 2013 18:07:43 -0800 From: John-Mark Gurney To: Konstantin Belousov Subject: Re: geom_uzip, panic: bio_length in mdstart_vnode() Message-ID: <20131205020742.GU55638@funkthat.com> Mail-Followup-To: Konstantin Belousov , Paolo Pinto , nicolas dumont , freebsd-geom@freebsd.org References: <529F2748.2060900@netasq.com> <20131204162029.GV59496@kib.kiev.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131204162029.GV59496@kib.kiev.ua> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 04 Dec 2013 18:07:44 -0800 (PST) Cc: nicolas dumont , Paolo Pinto , freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 02:07:50 -0000 Konstantin Belousov wrote this message on Wed, Dec 04, 2013 at 18:20 +0200: > On Wed, Dec 04, 2013 at 01:59:52PM +0100, Paolo Pinto wrote: > > Hi list! > > > > My kernel is compiled with option INVARIANTS and I get a reproducible > > kernel panic when trying to read data from a GEOM based compressed > > memory disk: > > > > Unread portion of the kernel message buffer: > > panic: bio_length 140288 > > cpuid = 3 > > KDB: stack backtrace: > > #0 0xffffffff80909726 at kdb_backtrace+0x66 > > #1 0xffffffff808d0fa8 at panic+0x1d8 > > #2 0xffffffff80595949 at mdstart_vnode+0x619 > > The issue is that geom_uzip creates bios which are larger than MAXPHYS. Shouldn't geom_uzip be fixed to honor MAXPHYS? > As a workaround, the following patch should be enough. It only fires > assert when md really uses pbuf, and since geom_uzip knows nothing > about unmapped bio, the assertion must not trigger. Ummm... what's the point of MAXPHYS if we allow IO larger than it? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-geom@FreeBSD.ORG Thu Dec 5 08:26:07 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCE4F54A for ; Thu, 5 Dec 2013 08:26:07 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 52FED173A for ; Thu, 5 Dec 2013 08:26:07 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rB58PuGs019685; Thu, 5 Dec 2013 10:25:56 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rB58PuGs019685 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rB58Puf4019683; Thu, 5 Dec 2013 10:25:56 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 5 Dec 2013 10:25:56 +0200 From: Konstantin Belousov To: Paolo Pinto , nicolas dumont , freebsd-geom@freebsd.org Subject: Re: geom_uzip, panic: bio_length in mdstart_vnode() Message-ID: <20131205082556.GA59496@kib.kiev.ua> References: <529F2748.2060900@netasq.com> <20131204162029.GV59496@kib.kiev.ua> <20131205020742.GU55638@funkthat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LStQImaUpO8G1Pdp" Content-Disposition: inline In-Reply-To: <20131205020742.GU55638@funkthat.com> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 08:26:07 -0000 --LStQImaUpO8G1Pdp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 04, 2013 at 06:07:43PM -0800, John-Mark Gurney wrote: > Konstantin Belousov wrote this message on Wed, Dec 04, 2013 at 18:20 +020= 0: > > On Wed, Dec 04, 2013 at 01:59:52PM +0100, Paolo Pinto wrote: > > > Hi list! > > >=20 > > > My kernel is compiled with option INVARIANTS and I get a reproducible > > > kernel panic when trying to read data from a GEOM based compressed > > > memory disk: > > >=20 > > > Unread portion of the kernel message buffer: > > > panic: bio_length 140288 > > > cpuid =3D 3 > > > KDB: stack backtrace: > > > #0 0xffffffff80909726 at kdb_backtrace+0x66 > > > #1 0xffffffff808d0fa8 at panic+0x1d8 > > > #2 0xffffffff80595949 at mdstart_vnode+0x619 > >=20 > > The issue is that geom_uzip creates bios which are larger than MAXPHYS. >=20 > Shouldn't geom_uzip be fixed to honor MAXPHYS? By all means, fix it. >=20 > > As a workaround, the following patch should be enough. It only fires > > assert when md really uses pbuf, and since geom_uzip knows nothing > > about unmapped bio, the assertion must not trigger. >=20 > Ummm... what's the point of MAXPHYS if we allow IO larger than it? This is rhetorical question, right ? --LStQImaUpO8G1Pdp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSoDiTAAoJEJDCuSvBvK1BGcwP/Rocdfagi0MjGmqknHJC3Xg2 X/nG0tr6nY/sga7Hbsip5v/jwp9wt3Pfd3v1q6UQ2qPQgNR+Gbs+4XHnLuFf/Ap1 8YZRn7lvVJ/jEZY8OeM/srOOlEddC9oOPTTQ0XIgpP5z3rlSHiy+8ab+s+suS1X1 H25Fhr9gkNFwNWl489+oitzJldfjp0/7oY2jIaIy4jzTAiwCUuz8hBUbeVZxXM0Y K8KGlsWdgSRWh9JmPKKTr6ycGYxwKkysktwQ+fKXRtm8j/3pQ1fJ11vRLDopDM8d +oj+s075rzylrcLlrrLiUtOZ6ykTZ7RQ3YPQkw5AikbBtFq2xP/jyQRpNKahzED4 vY5FhbH9OFuURb9n2AAtv0YWy/sCl2SmZLI3CkmmhVE8IBLdB/fWBUFGCwhNeyHZ 6J8ZU3jAXoFGcXfEzkJYULYnnPyrOeFp2TJuogjHRA/AUDwoWG5uDjtzjyKLJYBj WY5NiDCn8CpLACX1xw3VjHUBP2Y2OTITUMl5gaicQWd7YzORae1Lf6y3YkzTj627 s0mHwnSGVYvODhuQTav3NwOTitwEuf49q8QrpQ3QDX2ylSnd/WMF3Vf3nuA8pxTk jmNl58/mXSAl7i5ynv3b1+H3vbx2qYjny9nhvKFKwDb3VZVpJS3dUP8/QRK1/H2T OJLBJlwJdEyaVZv0m/ST =MGua -----END PGP SIGNATURE----- --LStQImaUpO8G1Pdp--