Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-253901

"Failed to add PDH Counter" issues (caused by outdated OSHI)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 22w43a
    • 1.19, 1.19.1 Pre-release 2, 1.19.2
    • None
    • Community Consensus
    • Debug, Performance
    • Normal

      I'm the primary maintainer of the OSHI project.  There is a current dependency on oshi-core version 5.8.5.

      I recommend you update to oshi-core version 6.2.1.  (I realize this is a "New Feature" request and not a bug but the dialog did not give me any option to choose other than "bug".)

      There has been a longstanding bug in OSHI regarding localization of performance counters.  This has resulted in various secondary issues including slow startup issues associated with the WMI fallback and RPC delays.  I had been doing either "all" or "nothing" on localization but only recently realized that "instances" still needed to be localized while "counters" did not.  This bug was resolved in 6.2.1 in https://github.com/oshi/oshi/pull/2089

      In addition to this fix, there is far better detection of disabled performance counters which will provide more useful/verbose log warnings to impacted users which will likely allow better self-remediation of issues without bug reports here.

      Finally, this version includes the transitive dependency JNA 5.12.1 which significantly improves performance by removing finalizers. This reduces GC pressure and associated JVM overhead and promptly releases native memory allocations.

            Unassigned Unassigned
            dbwiddis Daniel Widdis
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: