Bug #8739
openztest may crash with Assertion failed: (IS_P2ALIGNED((psize), 1U << SPA_MINBLOCKSHIFT))
0%
Description
The assertion is in arc_hdr_alloc.
The problem happens when ztest_dmu_read_write_zcopy picks 512 as blocksize and chunksize,
because the function has the following call:
dmu_request_arcbuf(bonus_db, chunksize / 2)
GDB stack trace:
(gdb) bt #0 thr_kill () at thr_kill.S:3 #1 0x00000008020601a4 in __raise (s=6) at /usr/devel/svn/head/lib/libc/gen/raise.c:52 #2 0x0000000802060119 in abort () at /usr/devel/svn/head/lib/libc/stdlib/abort.c:65 #3 0x00000008011a8c73 in arc_hdr_alloc (spa=12579934214558102961, psize=<value optimized out>, lsize=<value optimized out>, compression_type=ZIO_COMPRESS_OFF, type=ARC_BUFC_DATA) at assfail.h:57 #4 0x00000008011a804f in arc_alloc_buf (spa=<value optimized out>, tag=0x801234560, type=<value optimized out>, size=256) at /usr/devel/svn/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:3316 #5 0x00000008011a7f86 in arc_loan_buf (spa=<value optimized out>, is_metadata=<value optimized out>, size=256) at /usr/devel/svn/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:2832 #6 0x000000000040ab6c in ztest_dmu_read_write_zcopy (zd=<value optimized out>, id=<value optimized out>) at /usr/devel/svn/head/cddl/contrib/opensolaris/cmd/ztest/ztest.c:3923 #7 0x000000000041950a in ztest_thread (arg=0x6) at /usr/devel/svn/head/cddl/contrib/opensolaris/cmd/ztest/ztest.c:5478 #8 0x0000000801d4cc55 in thread_start (curthread=0x805179300) at /usr/devel/svn/head/lib/libthr/thread/thr_create.c:289
Updated by Andriy Gapon over 5 years ago
Could anyone with admin. rights please change the category to zfs?
Updated by Igor Kozhukhov over 5 years ago
- Category changed from zones to zfs - Zettabyte File System
Updated by Nick Wolff over 5 years ago
We are also seeing this on freebsd. I'm not certain that it's SPA_MINBLOCKSHIFT being divided by two but I'm looking into this further along with the help from some other colleagues at iXsystems.
Updated by Andriy Gapon over 5 years ago
Well, you can see size=256
in
arc_alloc_buf (spa=<value optimized out>, tag=0x801234560, type=<value optimized out>, size=256)
Updated by Nick Wolff over 5 years ago
Sorry I meant that even when I statically assign 4096 or 8192 to BLOCKSIZE and recompile instead of calling ztest_random_blocksize() to dynamically assign it I still get the same issue.
Updated by Sevan Janiyan over 4 years ago
Please try this [[https://reviews.freebsd.org/D18485]]