You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexander D Shipilov (JIRA)" <ji...@apache.org> on 2006/12/06 17:11:22 UTC

[jira] Created: (HARMONY-2504) If method throws exception after monitorenter, JIT does not release the lock.

If method throws exception after monitorenter, JIT does not release the lock.
-----------------------------------------------------------------------------

                 Key: HARMONY-2504
                 URL: http://issues.apache.org/jira/browse/HARMONY-2504
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: Intel x86 IA32, WinXP
            Reporter: Alexander D Shipilov


 Thread makes monitorenter, and throws exception (NPE) to the output.
java.lang.IllegalMonitorStateException expected to appear at the output
(because, according to the specification, the last exception should appear).
Then other thread tries to get a lock.
DRLVM hangs up. It's throws NPE instead of IllegalMonitorStateException and does not release the
lock.


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

        

[jira] Commented: (HARMONY-2504) [drlvm] If method throws exception after monitorenter, JIT does not release the lock.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466733 ] 

Alexey Varlamov commented on HARMONY-2504:
------------------------------------------

Alexander, 
Could you please clarify why you expect IllegalMonitorStateException?
As for the deadlock, I believe it works as expected, see JVM specification paragraph 7.14, which hints that monitorexit should be guarded via try/finally block.
BTW, BEA's JRockit 1.5 behaves exactly as drlvm.

> [drlvm] If method throws exception after monitorenter, JIT does not release the lock.
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2504
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2504
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Intel x86 IA32, WinXP
>            Reporter: Alexander D Shipilov
>         Attachments: Harmony-2504test.zip
>
>
>  Thread makes monitorenter, and throws exception (NPE) to the output.
> java.lang.IllegalMonitorStateException expected to appear at the output
> (because, according to the specification, the last exception should appear).
> Then other thread tries to get a lock.
> DRLVM hangs up. It's throws NPE instead of IllegalMonitorStateException and does not release the
> lock.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2504) [drlvm] If method throws exception after monitorenter, JIT does not release the lock.

Posted by "Alexander D Shipilov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2504?page=comments#action_12459962 ] 
            
Alexander D Shipilov commented on HARMONY-2504:
-----------------------------------------------

Evgueni,
 Test2.class should be compiled from Test2.j source. Jasmin compiler should be used. It is a java-assembler language. Test2 couldn't be compiled using common java language. You can use already compiled Test2.class in the attachement.

Alexander

> [drlvm] If method throws exception after monitorenter, JIT does not release the lock.
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2504
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2504
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Intel x86 IA32, WinXP
>            Reporter: Alexander D Shipilov
>         Attachments: Harmony-2504test.zip
>
>
>  Thread makes monitorenter, and throws exception (NPE) to the output.
> java.lang.IllegalMonitorStateException expected to appear at the output
> (because, according to the specification, the last exception should appear).
> Then other thread tries to get a lock.
> DRLVM hangs up. It's throws NPE instead of IllegalMonitorStateException and does not release the
> lock.

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

        

[jira] Commented: (HARMONY-2504) [drlvm] If method throws exception after monitorenter, JIT does not release the lock.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466907 ] 

Alexey Varlamov commented on HARMONY-2504:
------------------------------------------

Sure, feel free to appeal on dev@. Please try to provide specific arguments, why and how it should work. My POV that VM *must* hang while executing a code which is designed to hang.

> [drlvm] If method throws exception after monitorenter, JIT does not release the lock.
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2504
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2504
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Intel x86 IA32, WinXP
>            Reporter: Alexander D Shipilov
>         Attachments: Harmony-2504test.zip
>
>
>  Thread makes monitorenter, and throws exception (NPE) to the output.
> java.lang.IllegalMonitorStateException expected to appear at the output
> (because, according to the specification, the last exception should appear).
> Then other thread tries to get a lock.
> DRLVM hangs up. It's throws NPE instead of IllegalMonitorStateException and does not release the
> lock.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2504) [drlvm] enforce structurted locking behaviour

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-2504:
-------------------------------------

             Component/s: Non-bug differences from RI
                Priority: Minor  (was: Major)
             Environment:     (was: Intel x86 IA32, WinXP)
    Estimated Complexity: Moderate
              Issue Type: Task  (was: Bug)
                 Summary: [drlvm] enforce structurted locking behaviour  (was: [drlvm] If method throws exception after monitorenter, JIT does not release the lock.)

Updated the issue accordingly to feedback from dev@.
This may be considered as RI compatibilty issue thus has lower priority. Possible ways to fix: 
- issue warnings during verification on Java code breaking structured locking;
- do post-mortem releasing of held monitors.

> [drlvm] enforce structurted locking behaviour
> ---------------------------------------------
>
>                 Key: HARMONY-2504
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2504
>             Project: Harmony
>          Issue Type: Task
>          Components: DRLVM, Non-bug differences from RI
>            Reporter: Alexander D Shipilov
>            Priority: Minor
>         Attachments: Harmony-2504test.zip
>
>
>  Thread makes monitorenter, and throws exception (NPE) to the output.
> java.lang.IllegalMonitorStateException expected to appear at the output
> (because, according to the specification, the last exception should appear).
> Then other thread tries to get a lock.
> DRLVM hangs up. It's throws NPE instead of IllegalMonitorStateException and does not release the
> lock.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2504) [drlvm] If method throws exception after monitorenter, JIT does not release the lock.

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2504?page=all ]

Alexei Zakharov updated HARMONY-2504:
-------------------------------------

    Summary: [drlvm] If method throws exception after monitorenter, JIT does not release the lock.  (was: If method throws exception after monitorenter, JIT does not release the lock.)

adding [drlvm] prefix to summary

> [drlvm] If method throws exception after monitorenter, JIT does not release the lock.
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2504
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2504
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Intel x86 IA32, WinXP
>            Reporter: Alexander D Shipilov
>         Attachments: Harmony-2504test.zip
>
>
>  Thread makes monitorenter, and throws exception (NPE) to the output.
> java.lang.IllegalMonitorStateException expected to appear at the output
> (because, according to the specification, the last exception should appear).
> Then other thread tries to get a lock.
> DRLVM hangs up. It's throws NPE instead of IllegalMonitorStateException and does not release the
> lock.

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

        

[jira] Assigned: (HARMONY-2504) [drlvm] enforce structurted locking behaviour

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn reassigned HARMONY-2504:
----------------------------------------

    Assignee: weldon washburn

> [drlvm] enforce structurted locking behaviour
> ---------------------------------------------
>
>                 Key: HARMONY-2504
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2504
>             Project: Harmony
>          Issue Type: Task
>          Components: DRLVM, Non-bug differences from RI
>            Reporter: Alexander D Shipilov
>         Assigned To: weldon washburn
>            Priority: Minor
>         Attachments: Harmony-2504test.zip
>
>
>  Thread makes monitorenter, and throws exception (NPE) to the output.
> java.lang.IllegalMonitorStateException expected to appear at the output
> (because, according to the specification, the last exception should appear).
> Then other thread tries to get a lock.
> DRLVM hangs up. It's throws NPE instead of IllegalMonitorStateException and does not release the
> lock.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2504) If method throws exception after monitorenter, JIT does not release the lock.

Posted by "Alexander D Shipilov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2504?page=all ]

Alexander D Shipilov updated HARMONY-2504:
------------------------------------------

    Attachment: Harmony-2504test.zip

Zip-file contains:
sources:
  1 java-file
  1 jasmin file (http://jasmin.sourceforge.net/)
and 
  2 class-files from this sources

> If method throws exception after monitorenter, JIT does not release the lock.
> -----------------------------------------------------------------------------
>
>                 Key: HARMONY-2504
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2504
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Intel x86 IA32, WinXP
>            Reporter: Alexander D Shipilov
>         Attachments: Harmony-2504test.zip
>
>
>  Thread makes monitorenter, and throws exception (NPE) to the output.
> java.lang.IllegalMonitorStateException expected to appear at the output
> (because, according to the specification, the last exception should appear).
> Then other thread tries to get a lock.
> DRLVM hangs up. It's throws NPE instead of IllegalMonitorStateException and does not release the
> lock.

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

        

[jira] Commented: (HARMONY-2504) [drlvm] If method throws exception after monitorenter, JIT does not release the lock.

Posted by "Alexander D Shipilov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466770 ] 

Alexander D Shipilov commented on HARMONY-2504:
-----------------------------------------------

Alexey, I steel belive that Vm shouldn't hangs up even if it is bad try/catch block without finally. I think that it is better to ask community.

> [drlvm] If method throws exception after monitorenter, JIT does not release the lock.
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2504
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2504
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Intel x86 IA32, WinXP
>            Reporter: Alexander D Shipilov
>         Attachments: Harmony-2504test.zip
>
>
>  Thread makes monitorenter, and throws exception (NPE) to the output.
> java.lang.IllegalMonitorStateException expected to appear at the output
> (because, according to the specification, the last exception should appear).
> Then other thread tries to get a lock.
> DRLVM hangs up. It's throws NPE instead of IllegalMonitorStateException and does not release the
> lock.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2504) [drlvm] If method throws exception after monitorenter, JIT does not release the lock.

Posted by "Evgueni Brevnov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2504?page=comments#action_12459942 ] 
            
Evgueni Brevnov commented on HARMONY-2504:
------------------------------------------

I looked into the attached archive but it seems to be incomplete :-( where is Test2.java?

Evgueni

> [drlvm] If method throws exception after monitorenter, JIT does not release the lock.
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2504
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2504
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Intel x86 IA32, WinXP
>            Reporter: Alexander D Shipilov
>         Attachments: Harmony-2504test.zip
>
>
>  Thread makes monitorenter, and throws exception (NPE) to the output.
> java.lang.IllegalMonitorStateException expected to appear at the output
> (because, according to the specification, the last exception should appear).
> Then other thread tries to get a lock.
> DRLVM hangs up. It's throws NPE instead of IllegalMonitorStateException and does not release the
> lock.

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