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

Data corruption dependent on -server/-client/-Xbatch

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • hs14
    • 6, 6u10
    • hotspot
    • b04
    • x86
    • linux, solaris_10
    • Verified

    Backports

      Description

        FULL PRODUCT VERSION :
        java version "1.6.0_06"
        Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
        Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)


        ADDITIONAL OS VERSION INFORMATION :
        Linux 2.6.24-19-generic (Ubuntu 8.04) i686, also reported on Debian Lenny amd64.

        A DESCRIPTION OF THE PROBLEM :
        Downstream bug report: https://bugzilla.wikimedia.org/show_bug.cgi?id=14610

        Data corruption is observed in our application when JVM is run with -server, but not with -client or "-server -Xbatch". I suspect it's due to background compilation in the region of com.fluendo.jheora.Decode.ExtractToken(). It's a heisenbug: attempting to instrument this function with debugging statements changed the behaviour of the function in odd ways.

        Reported to be a regression from 5.0, I haven't confirmed this personally.


        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        * svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/cortado
        * cd cortado
        * ant applet-ovt
        (alternatively get a jar from http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/OggHandler/cortado-ovt-stripped-wm_r31776.jar)
        * wget http://pozimski.eu/itheora/data/bd1_pp.ogg

        appletviewer test file test.html (adjust the .jar version number if necessary):

        <html>
         <head>
         </head>
         <body>
           <applet code="com.fluendo.player.Cortado.class"
                   archive="output/dist/applet/cortado-ovt-debug-wm_r36880.jar"
        width="384" height="288">
             <param name="url" value="bd1_pp.ogg"/>
             <param name="local" value="true"/>
             <param name="duration" value="224"/>
             <param name="keepAspect" value="true"/>
             <param name="video" value="true"/>
             <param name="audio" value="false"/>
             <param name="debug" value="1"/>
           </applet>
         </body>
        </html>

        Then:
        * appletviewer -J-Xbatch -J-server test.html
        * appletviewer -J-server test.html
        * appletviewer -J-client test.html


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        A video will play. Apparently some sort of German-speaking pirate.
        ACTUAL -
        With -J-server, it does a frame or two before the bug kicks in. Then you get corruption of the video frame, with blocks of colour appearing, and finally the corrupted token stream causes an ArrayIndexOutOfBoundsException in the application code.

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        Details may vary, depending on the exact contents of the garbage returned by ExtractToken() post-bug.

        java.lang.ArrayIndexOutOfBoundsException: 66
        at com.fluendo.jheora.DCTDecode.ExpandToken(DCTDecode.java:542)
        at com.fluendo.jheora.Decode.unpackAndExpandToken(Decode.java:460)
        at com.fluendo.jheora.Decode.unPackVideo(Decode.java:603)
        at com.fluendo.jheora.Decode.loadAndDecode(Decode.java:655)
        at com.fluendo.jheora.State.decodePacketin(State.java:74)
        at com.fluendo.plugin.TheoraDec$2.chainFunc(TheoraDec.java:212)
        at com.fluendo.jst.Pad.chain(Pad.java:257)
        at com.fluendo.jst.Pad.push(Pad.java:271)
        at com.fluendo.plugin.Queue$1.taskFunc(Queue.java:135)
        at com.fluendo.jst.Pad.run(Pad.java:339)
        at java.lang.Thread.run(Thread.java:619)


        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        Sorry, I haven't been able to isolate this any further.
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        Use -Xbatch.
        Customer later clarified that -Xbatch workaround is not really sufficient as it's quite invasive. A workaround that can be used in the HTML tag or some other simple approach is needed.

        Attachments

          Issue Links

            Activity

              People

                never Tom Rodriguez
                rlewis Roger Lewis (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: