From owner-freebsd-fs@FreeBSD.ORG Mon Nov 26 17:17:11 2012 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FEF8AC2; Mon, 26 Nov 2012 17:17:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id AD3548FC0C; Mon, 26 Nov 2012 17:17:10 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qAQHGwbN049728; Mon, 26 Nov 2012 19:16:58 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.1 kib.kiev.ua qAQHGwbN049728 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qAQHGwq6049727; Mon, 26 Nov 2012 19:16:58 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 26 Nov 2012 19:16:58 +0200 From: Konstantin Belousov To: sig6247 Subject: Re: clang compiled kernel panic when mounting zfs root on i386 Message-ID: <20121126171658.GD3013@kib.kiev.ua> References: <50b37d46.8584440a.735c.ffffb4e6@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="maH1Gajj2nflutpK" Content-Disposition: inline In-Reply-To: <50b37d46.8584440a.735c.ffffb4e6@mx.google.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, 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: freebsd-current@freebsd.org, fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2012 17:17:11 -0000 --maH1Gajj2nflutpK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 26, 2012 at 06:31:34AM -0800, sig6247 wrote: >=20 > Hi, >=20 > Just checked out r243529, this only happens when the kernel is compiled > by clang, and only on i386, either recompiling the kernel with gcc or > booting from a UFS root works fine. Is it a known problem? It looks like that clang uses more stack than gcc, and zfs makes quite deep call chains. It would be a waste, generally, to increase the init process kernel stack size only to pacify zfs. And I suspect that it would not help in the similar situations when the same procedure initiated for non-root mounts. >=20 > Thanks, >=20 > ---------------------------------------------------------------------- > WARNING: WITNESS option enabled, expect reduced performance. > Trying to mount root from zfs:zroot []... >=20 > Fatal double fault: > eip =3D 0xc0adc37d > esp =3D 0xc86bffc8 > ebp =3D 0xc86c003c > cpuid =3D 1; apic id =3D 01 > panic: double fault > cpuid =3D 1 > KDB: enter: panic > [ thread pid 1 tid 100002 ] > Stopped at kdb_enter+0x3d: movl $0,kdb_why > db> bt > Tracing pid 1 tid 100002 td 0xc89efbc0 > kdb_enter(c1064aa4,c1064aa4,c10b806f,c139e3b8,f5eacada,...) at kdb_enter+= 0x3d > panic(c10b806f,1,1,1,c86c003c,...) at panic+0x14b > dblfault_handler() at dblfault_handler+0xab > --- trap 0x17, eip =3D 0xc0adc37d, esp =3D 0xc86bffc8, ebp =3D 0xc86c003c= --- > witness_checkorder(c1fd7508,9,c109df18,7fa,0,...) at witness_checkorder+0= x37d > __mtx_lock_flags(c1fd7518,0,c109df18,7fa,c135d918,...) at __mtx_lock_flag= s+0x87 > uma_zalloc_arg(c1fd66c0,0,1,4d3,c86c0110,...) at uma_zalloc_arg+0x605 > vm_map_insert(c1fd508c,c13dfc10,bb1f000,0,cba1e000,...) at vm_map_insert+= 0x499 > kmem_back(c1fd508c,cba1e000,1000,3,c86c01d4,...) at kmem_back+0x76 > kmem_malloc(c1fd508c,1000,3) at kmem_malloc+0x250 > page_alloc(c1fd1d80,1000,c86c020b,3,c1fd1d80,...) at page_alloc+0x27 > keg_alloc_slab(103,4,c109df18,870,cb99ef6c,...) at keg_alloc_slab+0xc3 > keg_fetch_slab(103,c1fd1d80,cb99ef6c,c1fc8230,c86c02c0,...) at keg_fetch_= slab+0xe2 > zone_fetch_slab(c1fd1d80,c1fd0480,103,826,0,...) at zone_fetch_slab+0x43 > uma_zalloc_arg(c1fd1d80,0,102,3,2,...) at uma_zalloc_arg+0x3f2 > malloc(4c,c1686100,102,c86c0388,c173d09a,...) at malloc+0xe9 > zfs_kmem_alloc(4c,102,cb618820,c89efbc0,cb618820,...) at zfs_kmem_alloc+0= x20 > vdev_mirror_io_start(cb8218a0,10,cb8218a0,1,0,...) at vdev_mirror_io_star= t+0x14a > zio_vdev_io_start(cb8218a0,c89efbc0,0,cb8218a0,c86c0600,...) at zio_vdev_= io_start+0x228 > zio_execute(cb8218a0,cb618000,cba1b640,cb900000,400,...) at zio_execute+0= x106 > spa_load_verify_cb(cb618000,0,cba1b640,cb884b40,c86c0600,...) at spa_load= _verify_cb+0x89 > traverse_visitbp(cb884b40,cba1b640,c86c0600,c86c0ba0,0,...) at traverse_v= isitbp+0x29f > traverse_dnode(cb884b40,0,0,8b,0,...) at traverse_dnode+0x92 > traverse_visitbp(cb884bb8,cba07200,c86c0890,cb884bf4,c16ce7e0,...) at tra= verse_visitbp+0xe47 > traverse_visitbp(cb884bf4,cb9bf840,c86c0968,c86c0ba0,0,...) at traverse_v= isitbp+0xf32 > traverse_dnode(cb884bf4,0,0,0,0,...) at traverse_dnode+0x92 > traverse_visitbp(0,cb618398,c86c0b50,2,cb9f1c78,...) at traverse_visitbp+= 0x96d > traverse_impl(0,0,cb618398,3e1,0,...) at traverse_impl+0x268 > traverse_pool(cb618000,3e1,0,d,c1727830,...) at traverse_pool+0x79 > spa_load(0,1,c86c0ec4,1e,0,...) at spa_load+0x1dde > spa_load(0,0,c13d8c94,1,3,...) at spa_load+0x11a5 > spa_load_best(0,ffffffff,ffffffff,1,c0adc395,...) at spa_load_best+0x71 > spa_open_common(c17e0e1e,0,0,c86c1190,c16f5a1c,...) at spa_open_common+0x= 11a > spa_open(c86c1078,c86c1074,c17e0e1e,c135d918,c1fd7798,...) at spa_open+0x= 27 > dsl_dir_open_spa(0,cb770030,c17e11b1,c86c11f8,c86c11f4,...) at dsl_dir_op= en_spa+0x6c > dsl_dataset_hold(cb770030,cb613800,c86c1240,cb613800,cb613800,...) at dsl= _dataset_hold+0x3a > dsl_dataset_own(cb770030,0,cb613800,c86c1240,c1684e30,...) at dsl_dataset= _own+0x21 > dmu_objset_own(cb770030,2,1,cb613800,c86c1290,...) at dmu_objset_own+0x2a > zfsvfs_create(cb770030,c86c13ac,c17ee05d,681,0,...) at zfsvfs_create+0x4c > zfs_mount(cb78ed20,c17f411c,c9ff4600,c89cae80,0,...) at zfs_mount+0x42c > vfs_donmount(c89efbc0,4000,0,c86c1790,cb6c0800,...) at vfs_donmount+0xc6d > kernel_mount(cb7700b0,4000,0,0,1,...) at kernel_mount+0x6b > parse_mount(cb7700e0,c1194498,0,1,0,...) at parse_mount+0x606 > vfs_mountroot(c13d95b0,4,c105c042,2bb,0,...) at vfs_mountroot+0x6cf > start_init(0,c86c1d08,c105e94c,3db,0,...) at start_init+0x6a > fork_exit(c0a42090,0,c86c1d08) at fork_exit+0x7f > fork_trampoline() at fork_trampoline+0x8 > --- trap 0, eip =3D 0, esp =3D 0xc86c1d40, ebp =3D 0 --- > db>=20 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --maH1Gajj2nflutpK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCzpAoACgkQC3+MBN1Mb4j9FQCfX/BKJvG1317xh1X9RQQaCRmb FG0AoJTD3ObL+l6uWhI4ORT8GkSsGtIJ =/qn9 -----END PGP SIGNATURE----- --maH1Gajj2nflutpK--