[Smartfrog.org-JIRA] Created: (SFOS-21) some code is undersynchronized on Java1.4
"Steve Loughran (JIRA)" <[email protected]> Fri, 13 Oct 2006 15:30:20 +0100 (BST)
| Newsgroups | gmane.comp.java.smartfrog.devel |
|---|---|
| Message-ID | <31765751.1160749820562.JavaMail.tomcat@webapps-ext-br1.hpl.hp.com> |
some code is undersynchronized on Java1.4
-----------------------------------------
Key: SFOS-21
URL: http://jira.smartfrog.org/browse/SFOS-21
Project: SmartFrog
Issue Type: Bug
Environment: Java1.4
Reporter: Steve Loughran
Assigned To: Julio Guijarro
Priority: Minor
As covered in
http://www.cs.umd.edu/~pugh/java/memoryModel/
http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html
http://www.cs.umd.edu/users/jmanson/java/popl05.pdf
and
http://www.cs.umd.edu/~pugh/java/broken.pdf
the java spec and the JVMs pre Java1.5 do not have a good model for ordering all operations, and even volatile-annotated fields may be accessed out of order. This could lead to race conditions. We have no evidence that this has happened, but that does not mean the risk is not there, especially as multi-core CPUs are becoming more frequent.
1. all read/write fields shared across threads should be volatile, or accessed in synchronized blocks. The cost of volatile is less, but not free, as it stops compiler and CPU optimisations.
2. we should not create and start Threads in constructors that are bound to the object under creation, as they may access data before it is ready.
This bug can be used to file specific problems underneath, or link to other bugreps that are caused by these problems.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.smartfrog.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642