Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2017 10:34:32 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r323528 - head/cddl/contrib/opensolaris/lib/libzpool/common
Message-ID:  <201709131034.v8DAYWLg059844@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Wed Sep 13 10:34:31 2017
New Revision: 323528
URL: https://svnweb.freebsd.org/changeset/base/323528

Log:
  MFV r323527: 5815 libzpool's panic function doesn't set global panicstr, ::status not as useful
  
  illumos/illumos-gate@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@delphix.com>
  Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
  Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
  Reviewed by: Rich Lowe <richlowe@richlowe.net>
  Approved by: Dan McDonald <danmcd@omniti.com>
  Author: Prakash Surya <prakash.surya@delphix.com>
  MFC after:	4 weeks

Modified:
  head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c	Wed Sep 13 10:33:09 2017	(r323527)
+++ head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c	Wed Sep 13 10:34:31 2017	(r323528)
@@ -735,11 +735,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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709131034.v8DAYWLg059844>