mdb '::status' truncates assertion messages
zfs - Zettabyte File System
When running mdb's ::status command, certain assertion message appear to be truncated. For example, this message has its file and line number truncated: $ mdb core.14 Loading modules: [ libumem.so.1 libc.so.1 libzpool.so.1 libcmdutils.so.1 libavl.so.1 libnvpair.so.1 libtopo.so.1 ld.so.1 ] > ::status debugging core file of zdb (32-bit) from psurya-zloop-1.dcenter file: /net/galaxy/data/jenkins/zfs-make/psurya/DLPX-34056/proto/root_i386/usr/sbin/i86/zdb initial argv: /net/galaxy/data/jenkins/zfs-make/psurya/DLPX-34056/proto/root_i386/usr/sbin/i8 threading model: native threads status: process terminated by SIGABRT (Abort) panic message: assertion failed for thread 0xfec32a40, thread-id 1: svr->svr_vdev->vdev_removing, file ../../../uts/common/fs/zfs/vdev_removal mdb currently uses a 128 character buffer to copy the 'panicstr' into when displaying the string to the user; e.g. when using '::status'. The functions collecting the panic message (e.g. assfail()) use a buffer ranging from 400 bytes to 1000 bytes, so it makes sense for mdb to use a buffer that is at least as big, if not bigger, than these so it can print the full message. Thus, this patch increases the size of the buffer mdb uses to print these messages from 128 bytes to 1024 bytes.