Skip to content

Sending JFR RecordingOptions with a diagnostic command may fail on Java 8  #1338

Closed
@dsgrieve

Description

@dsgrieve

Component(s)

jfr-connection

What happened?

Description

Time based recording options (time and age) are sent with a space between the value and units, e.g. "6000 ms", which may cause an issue with Java 8/Diagnostic Command.

Steps to Reproduce

Create an application with FlightRecorderDiagnosticCommandConnection which sets the 'time' or 'age' option for a recording. This causes an issue with Oracle Java 8.

Expected Result

No exception returned from the diagnostic command mbean.

Actual Result

Component version

1.36.0

Log output

com.microsoft.jfr.JfrStreamingException: Java 8 currently only supports predefined configurations (default/profile)
      at com.microsoft.jfr.dcmd.FlightRecorderDiagnosticCommandConnection.formOptions(FlightRecorderDiagnosticCommandConnection.java:135)
      at com.microsoft.jfr.dcmd.FlightRecorderDiagnosticCommandConnection.startRecording(FlightRecorderDiagnosticCommandConnection.java:109)
      at com.microsoft.jfr.Recording.start(Recording.java:116)

Additional context

This is an issue that was reported by a third party using the com.microsoft:jfr-streaming classes, which is where jfr-connection comes from. So this issue is present in jfr-connection as well. This issue won't be fixed in com.microsoft:jfr-streaming since that code is no longer maintained.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions