-
Bug
-
Resolution: Fixed
-
P3
-
6.0, 7u25, 8u60, 9
-
b107
-
os_x, windows
FULL PRODUCT VERSION :
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Platform-independent
A DESCRIPTION OF THE PROBLEM :
The javax.imageio.spi.ServiceRegistry javadoc does not mention whether it is thread-safe or not. Looking at source code on JDK 7, we see java.util.HashMap fields without any synchronization. We see no synchronization for the IIORegistry static instance used by javax.imageio.ImageIO neither. This may result in ConcurrentModificationException or other exceptions hard to reproduce.
A possibly related ConcurrentModificationException has been reported by other user here: http://stackoverflow.com/questions/15432462/java-servlets-and-imageio-error
A possibly related bug may be 8019623. But while IIORegistry uses AppContext.getAppContext() under the hood, it may still needs its own synchronization too.
REPRODUCIBILITY :
This bug can be reproduced rarely.
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Platform-independent
A DESCRIPTION OF THE PROBLEM :
The javax.imageio.spi.ServiceRegistry javadoc does not mention whether it is thread-safe or not. Looking at source code on JDK 7, we see java.util.HashMap fields without any synchronization. We see no synchronization for the IIORegistry static instance used by javax.imageio.ImageIO neither. This may result in ConcurrentModificationException or other exceptions hard to reproduce.
A possibly related ConcurrentModificationException has been reported by other user here: http://stackoverflow.com/questions/15432462/java-servlets-and-imageio-error
A possibly related bug may be 8019623. But while IIORegistry uses AppContext.getAppContext() under the hood, it may still needs its own synchronization too.
REPRODUCIBILITY :
This bug can be reproduced rarely.