-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Describe the problem you're observing
One of the major remaining failure modes for ztest that causes it to be flaky relates to the device replacement code when it comes to ztest. Approximately half of all ztest failures are related to this code. This is a diagnosis for one of them, but others are present. It would be helpful if someone with more experience with draid would investigate the remaining issues and attempt to run them down. In this one, we get an error message like ztest: attach (/var/tmp/zloop-run/ztest.9b 642008133, draid1-1-0 532152320, 1) returned 22, expected 95. The issue is that the vdev_open fails with EINVAL when asize< vd->vdev_min_asize. In the case I tested, it was much smaller; approximately an 8th of the min asize. This is either a bug in the size calculation code (less likely) or a case we need to add to the expected_error code in ztest.c (more likely).
Describe how to reproduce the problem
Run zloop for 6-12 hours and it is likely to appear.
Include any warning/errors/backtraces from the system logs
ztest: attach (/var/tmp/zloop-run/ztest.9b 642008133, draid1-1-0 532152320, 1) returned 22, expected 95
/export/home/delphix/zfs/.libs/ztest(+0xcf99)[0x55a40539af99]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7f9b4018c420]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f9b3ffc900b]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f9b3ffa8859]
/export/home/delphix/zfs/.libs/ztest(+0xa6c5)[0x55a4053986c5]
/export/home/delphix/zfs/.libs/ztest(+0x14dde)[0x55a4053a2dde]
/export/home/delphix/zfs/.libs/ztest(+0xdab4)[0x55a40539bab4]
/export/home/delphix/zfs/.libs/ztest(+0x11ce9)[0x55a40539fce9]
/export/home/delphix/zfs/lib/.libs/libzpool.so.5(+0x6383c)[0x7f9b433a583c]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8609)[0x7f9b40180609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7f9b400a5133]
vdev.c:2182:vdev_open(): open asize 62390272 min_asize 532152320
vdev.c:2800:vdev_create(): create error 22
spa.c:7193:spa_vdev_attach(): error 22