FreeBSD Bugzilla – Attachment 209178 Details for
Bug 241980
panic: I/O to pool appears to be hung on vdev
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
more debug logging
deadman.diff (text/plain), 2.91 KB, created by
Eugene Grosbein
on 2019-11-16 09:59:22 UTC
(
hide
)
Description:
more debug logging
Filename:
MIME Type:
Creator:
Eugene Grosbein
Created:
2019-11-16 09:59:22 UTC
Size:
2.91 KB
patch
obsolete
>Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c >=================================================================== >--- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c (revision 354667) >+++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c (working copy) >@@ -373,7 +373,7 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman > SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_checktime_ms, CTLFLAG_RDTUN, > &zfs_deadman_checktime_ms, 0, > "Period of checks for stalled ZFS I/O in milliseconds"); >-SYSCTL_INT(_vfs_zfs, OID_AUTO, deadman_enabled, CTLFLAG_RDTUN, >+SYSCTL_INT(_vfs_zfs, OID_AUTO, deadman_enabled, CTLFLAG_RWTUN, > &zfs_deadman_enabled, 0, "Kernel panic on stalled ZFS I/O"); > SYSCTL_INT(_vfs_zfs, OID_AUTO, spa_asize_inflation, CTLFLAG_RWTUN, > &spa_asize_inflation, 0, "Worst case inflation factor for single sector writes"); >Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c >=================================================================== >--- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c (revision 354667) >+++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c (working copy) >@@ -29,6 +29,8 @@ > * Copyright 2017 Joyent, Inc. > */ > >+#include <sys/syslog.h> >+ > #include <sys/zfs_context.h> > #include <sys/fm/fs/zfs.h> > #include <sys/spa.h> >@@ -4336,6 +4338,8 @@ vdev_split(vdev_t *vd) > vdev_propagate_state(cvd); > } > >+extern int zfs_deadman_enabled; >+ > void > vdev_deadman(vdev_t *vd) > { >@@ -4347,12 +4351,13 @@ vdev_deadman(vdev_t *vd) > > if (vd->vdev_ops->vdev_op_leaf) { > vdev_queue_t *vq = &vd->vdev_queue; >+ ulong_t num; > > mutex_enter(&vq->vq_lock); >- if (avl_numnodes(&vq->vq_active_tree) > 0) { >+ if ((num = avl_numnodes(&vq->vq_active_tree)) > 0) { > spa_t *spa = vd->vdev_spa; > zio_t *fio; >- uint64_t delta; >+ uint64_t delta, early; > > /* > * Look at the head of all the pending queues, >@@ -4361,11 +4366,28 @@ vdev_deadman(vdev_t *vd) > */ > fio = avl_first(&vq->vq_active_tree); > delta = gethrtime() - fio->io_timestamp; >+ early = delta / 8; >+ >+ if (zfs_deadman_enabled > 1 && >+ early > spa_deadman_synctime(spa)) { >+ log(LOG_ERR, "%s SLOW IO: zio io_type %u " >+ "timestamp %lluns, delta/8 %lluns, " >+ "last io %lluns", >+ spa_name(spa), fio->io_type, >+ fio->io_timestamp, (u_longlong_t)early, >+ vq->vq_io_complete_ts); >+ log(LOG_ERR, "I/O to pool '%s' appears to be " >+ "hung on vdev guid %llu at '%s' active zio %lu.", >+ spa_name(spa), >+ (long long unsigned int) vd->vdev_guid, >+ vd->vdev_path, num); >+ } else > if (delta > spa_deadman_synctime(spa)) { > vdev_dbgmsg(vd, "SLOW IO: zio timestamp " > "%lluns, delta %lluns, last io %lluns", > fio->io_timestamp, (u_longlong_t)delta, > vq->vq_io_complete_ts); >+ if(zfs_deadman_enabled == 1) > fm_panic("I/O to pool '%s' appears to be " > "hung on vdev guid %llu at '%s'.", > spa_name(spa),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 241980
:
209178
|
209374