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.
Updated by Electric Monk about 7 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 255ca53cb863784f137aca02aa15c67d8dce73de Author: Prakash Surya <email@example.com> Date: 2015-05-16T18:53:22.000Z 5816 mdb '::status' truncates assertion messages Reviewed by: Sebastien Roy <firstname.lastname@example.org> Reviewed by: Matthew Ahrens <email@example.com> Reviewed by: Gordon Ross <firstname.lastname@example.org> Reviewed by: Rich Lowe <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>