Review request 6985422: flush the output streams before OnError commands
David.Holmes at oracle.com
Mon Sep 20 16:58:35 PDT 2010
Chuck Rasbold said the following on 09/21/10 04:15:
> The "aborting" that ostream_abort() does is to flush and merge the
> LogCompilation files. That behavior is what we desire before OnError
> commands are processed.
flush I can understand.
> I could factor out an ostream_flush() function, but ithere's no place
> we'd want to call it.
> So is this OK?
Yes, in that calling ostream_abort() a second time in os::shutdown will
be a no-op.
My only lingering concern is that while one thread is reporting this
fatal error the rest of the VM continues to execute, and those other
threads might encounter a stream/log-file that has now been closed. I
don't know if this would be handled gracefully or whether we care one
way or the other. We have the same issue with the ostream_abort in
os::shutdown but the window between closing the files and blowing away
the process is very small. In this case your onError commands could take
an indeterminate amount of time during which the rest of the VM
continues to execute.
> -- Chuck
More information about the hotspot-dev