Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8166129

hitting vmassert during gtest execution doesn't generate core and hs_err files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • b143

      if a gtest test hits vmassert/guarantee/fatal/etc, no core or hs_err file will be generated, even if we are using fully inited jvm. that makes it really hard to understand a root cause of a failure and hence fix a defect.

      currently, we won't even get file name and line number for an assert, here is a small patch which fixes that and can be used as a temp. workaround till we fix this bug. this patch also will help to investigate "vmassert failures" from tests which do not have a inited jvm :

      diff -r 602a51769ce8 src/share/vm/utilities/vmError.cpp
      --- a/src/share/vm/utilities/vmError.cpp Fri Sep 02 19:19:03 2016 +0300
      +++ b/src/share/vm/utilities/vmError.cpp Fri Sep 02 20:40:33 2016 +0300
      @@ -1137,6 +1137,14 @@ void VMError::report_and_die(int id, con
                                   Thread* thread, address pc, void* siginfo, void* context, const char* filename,
                                   int lineno, size_t size)
      {
      + if (ExecutingUnitTests) {
      + fprintf(stderr, "%s:%d %s ", filename, lineno, message);
      + va_list va;
      + va_copy(va, detail_args);
      + vfprintf(stderr, detail_fmt, va);
      + va_end(va);
      + fprintf(stderr, "\n");
      + }

            iignatyev Igor Ignatyev (Inactive)
            iignatyev Igor Ignatyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: