fix: disable spark async profiler on non-arm based systems #1533
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The async profiler version bundled with spark (which itself is bundled in modern paper versions) does not support java 23 and causes a seqfault when being executed which crashes at least all modern paper services running on amd64 systems:
Modification
Disable the async profiler integration in spark when an old version of the async profiler is used. The detection process of the async profiler version relies on a pull request to spark which is not yet merged (so we might need to change the detection process again when that happened). Additionally the issue does not happen on arm systems, therefore the async profiler is left enabled on these systems. The
load
method ofAsyncProfilerAccess
on matching spark versions is changed so that it always throws an exception that the async profiler is not available. The message of the exception is printed into the console when starting the profiler so that the user is informed why the profiler is disabled:Result
Non-arm servers that run modern paper versions and all servers running spark with an old version of async-profiler will no longer segfault when starting up/the plugin is enabled.