Issue Details (XML | Word | Printable)

Key: RVM-35
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Ian Rogers
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RVM

Make unknown error and virtual machine errors more verbose

Created: 13/Jun/07 09:17 AM   Updated: 11/Apr/08 09:24 AM
Component/s: Runtime
Affects Version/s: None
Fix Version/s: 1000

Time Tracking:
Not Specified

Issue Links:
Related
 


 Description  « Hide
Currently any unhandled signals and memory faults terminate the VM with an unknown error. Whilst correct, it could be more useful for debugging if these faults were turned into a Jikes RVM virtual machine error and these virtual machine errors had access to the context when the fault occurred.

In more detail our existing scheme is:

1) get signal
2) trap into libvm.C hardware signal hander
3) decipher signal, if the VM processor address is bad die, if the stack frame address in the VM_Processor is bad die, set context up for entry into VM_Runtime.deliverHardwareException
4) determine in VM_Runtime.delieverHardwareException if this is a known or unknown exception and then deliver that exception
5) for unknown errors no signal handler will be found so we dump the stack and leave the VM

(NB it looks like we're not respecting thread uncaught exception handler properly in the VM_Runtime code)

This proposal is to implement Jikes RVM specific virtual machine error and unknown error classes in java.lang, for these objects to carry the context that caused their fault and for this to be printed if they are uncaught. This same context information could be accessed via JikesRVMSupport function to support code that wants to catch and debug virtual machine errors properly.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
David Grove added a comment - 14/Jun/07 12:33 AM
The thing to be careful of is to make sure that recursive failures don't hang the VM. At some point we need to give up and exit quickly and with a 100% chance of success. (If the VM is really hosed, then trying to do anything to raise a "real" exception/error will result in a new crash sequence and we never get anywhere).

We can probably do better than we currently are, but we do need a way out when things go horribly wrong.


Ian Rogers added a comment - 21/Jun/07 08:35 AM
It'd be nice to use the virtual machine error mechanism for Intel faults as there's the possibility that debugging could be performed by simply writing:
throw new VirtualMachineError();
in your code.