Ignored IOException

Erik Gahlin erik.gahlin at oracle.com
Wed Mar 31 03:55:58 UTC 2021


Hi Denghui, 

Sorry for the late reply.

I was able to track down the bug number to an issue in JRockit in 2009 where the IOException was written to jrcmd, the predecessor of jcmd. 

I think it’s fine to remove the comment and log the issue, perhaps with log level ERROR. We have tried to avoid printing file path to the log unless a user has opted in for more logging. So perhaps:

Logger.log(LogTag.JFR, LogLevel.ERROR, "Unable to complete I/O operation when dump recording \"" + getName() + "\" (" + getId() + ");

It should be sufficient information to dump it manually later.

Thanks
Erik

On 2021-03-08, 04:12, "hotspot-jfr-dev on behalf of Denghui Dong" <hotspot-jfr-dev-retn at openjdk.java.net on behalf of denghui.ddh at alibaba-inc.com> wrote:

    Hi,
    I noticed that there is an ignored IO Exception in jdk.jfr.internal.PlatformRecording#stop, but I cannot open the related issue(8925030).
    
    The problem I have is that when users use `java -XX:StartFlightRecording=name=test,duration=5m,filename=./dumped.jfr <App>`,
    and the 'dumped.jfr' is accidentally deleted(e.g. by clean task), the final jfr file will not exist, and also no exception will be generated after the recording is ended.
    Users need an extra step to generate the jfr file.
    
    If there is a problem with throwing this exception, maybe we can print the exception information there, so that at least a reminder can be given to the user.
    
    Any input is appreciated.
    
    Thanks,
    Denghui



More information about the hotspot-jfr-dev mailing list