Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8197812

(ref) Data race in Finalizer

XMLWordPrintable

    • b02
    • Not verified

      Google's experimental java-tsan tool reports the race below.
      Examining the source, we see that most but not all accesses to next links are protected by "lock". The one occurrence of synchronized (this) appears bogus (was synthronized (lock) intended?)

      WARNING: ThreadSanitizer: data race (pid=5727)
        Read of size 8 at 0x7f889aec15f0 by thread T18 (mutexes: write M948147946252932544):
          #0 java.lang.ref.Finalizer.runFinalizer(Lsun/misc/JavaLangAccess;)V (Finalizer.java:163)
          #1 java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;Lsun/misc/JavaLangAccess;)V (Finalizer.java:37)
          #2 java.lang.ref.Finalizer$FinalizerThread.run()V (Finalizer.java:313)
          #3 (Generated Stub)

        Previous write of size 8 at 0x7f889aec15f0 by thread T40 (mutexes: write M665265594339316864, write M666110019269449240, write M666391494246159920, write M194920908232491176, write M665265594653827776, write M666110019583960152, write M666391494560670832, write M619948123401274448, write M622762873168381280, write M920844873141023256, write M922815197978005512, write M829365506068091856):
          #0 java.lang.ref.Finalizer.register(Ljava/lang/Object;)V (Finalizer.java:146)
          #1 (Generated Stub)
          #2 java.util.zip.ZipFile$ZipFileInflaterInputStream.<init>(Ljava/util/zip/ZipFile;Ljava/util/zip/ZipFile$ZipFileInputStream;Ljava/util/zip/Inflater;I)V (ZipFile.java:398)
          #3 java.util.jar.JarFile.getInputStream(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream; (JarFile.java:449)
          #4 sun.misc.URLClassPath$JarLoader$2.getInputStream()Ljava/io/InputStream;

            martin Martin Buchholz
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: