JDK-8294411 : SA should provide more useful info when it fails to start up due to "failed to workaround classshareing"
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-09-27
  • Updated: 2022-10-03
  • Resolved: 2022-09-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20 masterFixed
Related Reports
Relates :  
Description
Sometimes SA fails to startup with the following error message:

ERROR: failed to workaround classshareing
Unable to open core file 

The code in question is init_classsharing_workaround() in ps_core_common.c. There a number of reasons why the class sharing work around can fail, and the reason is usually pretty well described with a print_debug() statement. However, since this is an error, these should really just be print_error() statements so the user doesn't need to figure out how to get more info by setting LIBSAPROC_DEBUG (which may also produce a ton of output unrelated to the error).
Comments
Changeset: 3b7fc80b Author: Chris Plummer <cjplummer@openjdk.org> Date: 2022-09-28 17:17:12 +0000 URL: https://git.openjdk.org/jdk/commit/3b7fc80b1887db957a0134592eb0711c225ba64c
28-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10438 Date: 2022-09-27 05:16:35 +0000
27-09-2022