svn commit: r323527 - vendor/illumos/dist/lib/libzpool/common
Andriy Gapon
avg at FreeBSD.org
Wed Sep 13 10:33:11 UTC 2017
Author: avg
Date: Wed Sep 13 10:33:09 2017
New Revision: 323527
URL: https://svnweb.freebsd.org/changeset/base/323527
Log:
5815 libzpool's panic function doesn't set global panicstr, ::status not as useful
illumos/illumos-gate at fae6347731c9d3f46b26338313b0422927f29cf6
https://github.com/illumos/illumos-gate/commit/fae6347731c9d3f46b26338313b0422927f29cf6
https://www.illumos.org/issues/5815
When panic() is called from within ztest, the mdb ::status command isn't as
useful as it could be since the global panicstr variable isn't updated. We
should modify the function to make sure panicstr is set, so ::status can
present the error message just like it does on a failed assertion.
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy at delphix.com>
Reviewed by: Gordon Ross <gordon.ross at nexenta.com>
Reviewed by: Rich Lowe <richlowe at richlowe.net>
Approved by: Dan McDonald <danmcd at omniti.com>
Author: Prakash Surya <prakash.surya at delphix.com>
Modified:
vendor/illumos/dist/lib/libzpool/common/kernel.c
Modified: vendor/illumos/dist/lib/libzpool/common/kernel.c
==============================================================================
--- vendor/illumos/dist/lib/libzpool/common/kernel.c Wed Sep 13 10:25:44 2017 (r323526)
+++ vendor/illumos/dist/lib/libzpool/common/kernel.c Wed Sep 13 10:33:09 2017 (r323527)
@@ -699,11 +699,9 @@ static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n"
void
vpanic(const char *fmt, va_list adx)
{
- (void) fprintf(stderr, "error: ");
- (void) vfprintf(stderr, fmt, adx);
- (void) fprintf(stderr, "\n");
-
- abort(); /* think of it as a "user-level crash dump" */
+ char buf[512];
+ (void) vsnprintf(buf, 512, fmt, adx);
+ assfail(buf, NULL, 0);
}
void
More information about the svn-src-all
mailing list