CodeCache::find_blob_and_oopmap should not assert during error reporting

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 22
    • Component/s: hotspot

      In crashes involving the stackoverflow reserved stack access processing we see secondary errors during error reporting:

      [error occurred during error reporting (printing native stack (with source info)), id 0xe0000000, Internal Error (/opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S962/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/4617b13b-f7b5-4dd3-a7fa-995fb1d128ce/runs/4874e9ea-7ae3-4f8d-9c41-5ddda318700a/workspace/open/src/hotspot/share/code/codeCache.inline.hpp:49)]

      This relates to the assertion at the end of this method:

      inline CodeBlob* CodeCache::find_blob_and_oopmap(void* pc, int& slot) {
        NativePostCallNop* nop = nativePostCallNop_at((address) pc);
        CodeBlob* cb;
        if (nop != nullptr && nop->displacement() != 0) {
          int offset = (nop->displacement() & 0xffffff);
          cb = (CodeBlob*) ((address) pc - offset);
          slot = ((nop->displacement() >> 24) & 0xff);
          assert(cb == CodeCache::find_blob(pc), "must be");
        } else {
          cb = CodeCache::find_blob(pc);
          slot = -1;
        }
        assert(cb != nullptr, "must be");
        return cb;
      }

      The secondary assertion failure here does not help with debugging so we should suppress it and try to deal with the null value when error reporting.

            Assignee:
            Unassigned
            Reporter:
            David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: