[jbossts-issues] [JBoss JIRA] Commented: (JBTM-377) XAResourceRecord save/restore state insufficiently paranoid

Jonathan Halliday (JIRA) jira-events at lists.jboss.org
Tue Jul 22 06:00:27 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBTM-377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12422087#action_12422087 ] 

Jonathan Halliday commented on JBTM-377:
----------------------------------------

I think there is still room for improvement in restore_state. A ClassNotFoundException for example will still leave the pointer into the buffer at the wrong location. A record on disk will always have the output from super.save_state(os, t), therefore the restore_state method should always read it, regardless of any errors it may encounter along the way. The 'if (res)' check should be removed in restore_state?

> XAResourceRecord save/restore state insufficiently paranoid
> -----------------------------------------------------------
>
>                 Key: JBTM-377
>                 URL: https://jira.jboss.org/jira/browse/JBTM-377
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JTA Implementation, Recovery
>    Affects Versions: 4.3.0.GA
>            Reporter: Jonathan Halliday
>            Assignee: Mark Little
>             Fix For: 4.4.CR2
>
>
> The XAResourceRecord save state method writes meta-data into the objectstore before attempting to Serialize and write the actual bytes for an XAResource that it believes, on the basis of it implementing the marker interface, is Serializable. If the serialization fails at runtime, the objectstore record is left in an invalid state and can cause the recovery pass to blow up in horrible ways.
> We should obtain the byte[] representing the serialized resource before writing anything to the record so that this does not occur. If serialization fails, the record will therefore be useless but at least not otherwise broken.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbossts-issues mailing list