Project

General

Profile

Bug #8739

ztest may crash with Assertion failed: (IS_P2ALIGNED((psize), 1U << SPA_MINBLOCKSHIFT))

Added by Andriy Gapon about 2 years ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2017-10-27
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

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

History

#1

Updated by Andriy Gapon about 2 years ago

Could anyone with admin. rights please change the category to zfs?

#2

Updated by Igor Kozhukhov about 2 years ago

  • Category changed from zones to zfs - Zettabyte File System
#3

Updated by Nick Wolff almost 2 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.

#4

Updated by Andriy Gapon almost 2 years ago

Well, you can see size=256 in

arc_alloc_buf (spa=<value optimized out>, tag=0x801234560, type=<value optimized out>, size=256)

#5

Updated by Nick Wolff almost 2 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.

#6

Updated by Sevan Janiyan over 1 year ago

Just hit this on FreeBSD 11.2-RC1

#7

Updated by Sevan Janiyan about 1 year ago

And FreeBSD 12.0-RC2

Also available in: Atom PDF