New issue
Advanced search Search tips

Issue 617935 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Android Tests dbg failing a number of DexLoaderTests

Project Member Reported by timvolod...@chromium.org, Jun 7 2016

Issue description

https://uberchromegw.corp.google.com/i/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/34743

(chrome_public_test_apk)

Instrumentation test chrome_public_test_apk Instrumentation test chrome_public_test_apk 
failures:
org.chromium.webapk.shell_apk.DexLoaderTest#testPreviouslyLoadedFromLocalDataDir
org.chromium.webapk.shell_apk.DexLoaderTest#testLoadFromRemoteDataDir
org.chromium.webapk.shell_apk.DexLoaderTest#testLoadFromLocalDataDir
org.chromium.webapk.shell_apk.DexLoaderTest#testLoadDifferentDexInLocalDataDir
 
I  870.405s Main  4 failed tests remain.
C  870.411s Main  ********************************************************************************
C  870.411s Main  Detailed Logs
C  870.411s Main  ********************************************************************************
C  870.414s Main  [FAIL] org.chromium.webapk.shell_apk.DexLoaderTest#testLoadDifferentDexInLocalDataDir:
C  870.414s Main  junit.framework.AssertionFailedError
C  870.414s Main  	at org.chromium.webapk.shell_apk.DexLoaderTest.testLoadDifferentDexInLocalDataDir(DexLoaderTest.java:233)
C  870.414s Main  	at java.lang.reflect.Method.invokeNative(Native Method)
C  870.414s Main  	at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
C  870.414s Main  	at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
C  870.414s Main  	at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:129)
C  870.414s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
C  870.414s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
C  870.414s Main  	at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
C  870.415s Main  	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
C  870.415s Main  
C  870.415s Main  [FAIL] org.chromium.webapk.shell_apk.DexLoaderTest#testLoadFromLocalDataDir:
C  870.415s Main  junit.framework.AssertionFailedError
C  870.415s Main  	at org.chromium.webapk.shell_apk.DexLoaderTest.testLoadFromLocalDataDir(DexLoaderTest.java:166)
C  870.415s Main  	at java.lang.reflect.Method.invokeNative(Native Method)
C  870.415s Main  	at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
C  870.415s Main  	at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
C  870.415s Main  	at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:129)
C  870.415s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
C  870.415s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
C  870.415s Main  	at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
C  870.415s Main  	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
C  870.415s Main  
C  870.415s Main  [FAIL] org.chromium.webapk.shell_apk.DexLoaderTest#testLoadFromRemoteDataDir:
C  870.415s Main  junit.framework.AssertionFailedError
C  870.415s Main  	at org.chromium.webapk.shell_apk.DexLoaderTest.isDexOptNeeded(DexLoaderTest.java:310)
C  870.416s Main  	at org.chromium.webapk.shell_apk.DexLoaderTest.testLoadFromRemoteDataDir(DexLoaderTest.java:146)
C  870.416s Main  	at java.lang.reflect.Method.invokeNative(Native Method)
C  870.416s Main  	at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
C  870.416s Main  	at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
C  870.416s Main  	at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:129)
C  870.416s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
C  870.416s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
C  870.416s Main  	at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
C  870.416s Main  	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
C  870.416s Main  
C  870.416s Main  [FAIL] org.chromium.webapk.shell_apk.DexLoaderTest#testPreviouslyLoadedFromLocalDataDir:
C  870.416s Main  junit.framework.AssertionFailedError
C  870.416s Main  	at org.chromium.webapk.shell_apk.DexLoaderTest.testPreviouslyLoadedFromLocalDataDir(DexLoaderTest.java:199)
C  870.416s Main  	at java.lang.reflect.Method.invokeNative(Native Method)
C  870.416s Main  	at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
C  870.416s Main  	at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
C  870.416s Main  	at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:129)
C  870.417s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
C  870.417s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
C  870.417s Main  	at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
C  870.417s Main  	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
C  870.417s Main  ********************************************************************************
Cc: pkotw...@chromium.org
looking at build #34738 where it started looks like the reason could be patch
https://codereview.chromium.org/2033953002

reverted it here : https://codereview.chromium.org/2041333003/
+cc:pkotwicz@
also similar failures on Lollipop bots (Lollipop Phone Testere, Lollipop tablet test tester and Lollipop Low-end tester)
hopefully the revert will help resolve these issues ;)
Owner: pkotw...@chromium.org
Status: Assigned (was: Untriaged)
looking at the latest build https://uberchromegw.corp.google.com/i/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/34745

it seems the revert didn't help, although it could be due to stale directory (?)
I would try a clobber build
ok forced a clobber build, will see what that gives

Comment 9 by boliu@chromium.org, Jun 7 2016

> I would try a clobber build

can you explain why that would help? is this a bug in the build system?

> ok forced a clobber build, will see what that gives

link?
I am not familiar with the tests but it seems they actually write/read something from file system, so that's why I was suspecting a stale directory

clobber link:
https://uberchromegw.corp.google.com/i/chromium.linux/builders/Android%20Tests%20(dbg)

I think it's still pending
not sure though, clobber build may not clean the directory in question
clobber clobers the build directory, not files on the device, if it's files on the device, then clobber doesn't help at all
fddae:  06-07 16:44:05.919 21691 21705 I TestRunner: started: testLoadFromRemoteDataDir(org.chromium.webapk.shell_apk.DexLoaderTest)
fddae:  06-07 16:44:05.919 21691 21695 D dalvikvm: GC_CONCURRENT freed 320K, 3% free 16809K/17160K, paused 2ms+2ms, total 15ms
fddae:  06-07 16:44:05.929 21706 21706 D dalvikvm: Late-enabling CheckJNI
fddae:  06-07 16:44:05.929   780 15709 I ActivityManager: Start proc org.chromium.webapk.shell_apk.test.dex_optimizer for service org.chromium.webapk.shell_apk.test.dex_optimizer/.DexOptimizerServiceImpl: pid=21706 uid=10082 gids={50082}
fddae:  06-07 16:44:05.949 21706 21717 I dalvikvm: Zip is good, but no classes.dex inside, and no .odex file in the same directory
fddae:  06-07 16:44:05.949 21706 21717 E cr_DexOptimzer: Failed to check optimization status: java.io.IOException: /data/data/org.chromium.webapk.shell_apk.test.dex_optimizer/app_dex/canary0.dex : /data/data/org.chromium.webapk.shell_apk.test.dex_optimizer/app_dex/canary0.dex
fddae:  06-07 16:44:05.959 21706 21717 D dalvikvm: DexOpt: --- BEGIN 'canary0.dex' (bootstrap=0) ---
fddae:  06-07 16:44:05.979 21719 21719 E dalvikvm: Map is missing field_ids entry
fddae:  06-07 16:44:05.979 21719 21719 E dalvikvm: ERROR: Byte swap + verify failed
fddae:  06-07 16:44:05.989 21719 21719 E dalvikvm: Optimization failed
fddae:  06-07 16:44:05.989 21706 21717 W dalvikvm: DexOpt: --- END 'canary0.dex' --- status=0xff00, process failed
fddae:  06-07 16:44:05.989 21706 21717 E dalvikvm: Unable to extract+optimize DEX from '/data/data/org.chromium.webapk.shell_apk.test.dex_optimizer/app_dex/canary0.dex'
fddae:  06-07 16:44:05.989 21706 21717 I dalvikvm: Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
fddae:  06-07 16:44:05.989 21706 21717 E System  : Unable to load dex file: /data/data/org.chromium.webapk.shell_apk.test.dex_optimizer/app_dex/canary0.dex
fddae:  06-07 16:44:05.989 21706 21717 E System  : java.io.IOException: unable to open DEX file
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at dalvik.system.DexFile.openDexFileNative(Native Method)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at dalvik.system.DexFile.openDexFile(DexFile.java:296)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at dalvik.system.DexFile.<init>(DexFile.java:111)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at dalvik.system.DexFile.loadDex(DexFile.java:151)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at dalvik.system.DexPathList.loadDexFile(DexPathList.java:266)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at dalvik.system.DexPathList.makeDexElements(DexPathList.java:221)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at dalvik.system.DexPathList.<init>(DexPathList.java:112)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at dalvik.system.DexClassLoader.<init>(DexClassLoader.java:57)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at org.chromium.webapk.lib.client.DexOptimizer.optimize(DexOptimizer.java:64)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at org.chromium.webapk.shell_apk.test.dex_optimizer.DexOptimizerServiceImpl$1.extractAndOptimizeDex(DexOptimizerServiceImpl.java:60)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at org.chromium.webapk.shell_apk.test.dex_optimizer.IDexOptimizerService$Stub.onTransact(IDexOptimizerService.java:59)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at android.os.Binder.execTransact(Binder.java:404)
fddae:  06-07 16:44:05.989 21706 21717 E System  :  at dalvik.system.NativeStart.run(Native Method)
fddae:  06-07 16:44:05.989 21691 21705 D dalvikvm: DexOpt: incorrect opt magic number (0xff ff ff ff)
fddae:  06-07 16:44:05.989 21691 21705 E dalvikvm: /data/data/org.chromium.webapk.shell_apk.test.dex_optimizer/app_dex/canary0.dex odex has stale dependencies
fddae:  06-07 16:44:05.989 21691 21705 I dalvikvm: Zip is good, but no classes.dex inside, and no .odex file in the same directory
fddae:  06-07 16:44:05.989 21691 21705 W System.err: java.io.IOException: /data/data/org.chromium.webapk.shell_apk.test.dex_optimizer/app_dex/canary0.dex
fddae:  06-07 16:44:05.989 21691 21705 W System.err:  at dalvik.system.DexFile.isDexOptNeeded(Native Method)
fddae:  06-07 16:44:05.989 21691 21705 W System.err:  at org.chromium.webapk.shell_apk.DexLoaderTest.isDexOptNeeded(DexLoaderTest.java:318)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at org.chromium.webapk.shell_apk.DexLoaderTest.testLoadFromRemoteDataDir(DexLoaderTest.java:143)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at java.lang.reflect.Method.invokeNative(Native Method)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at java.lang.reflect.Method.invoke(Method.java:515)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at junit.framework.TestCase.runBare(TestCase.java:134)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at junit.framework.TestResult$1.protect(TestResult.java:115)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at junit.framework.TestResult.runProtected(TestResult.java:133)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at junit.framework.TestResult.run(TestResult.java:118)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:129)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at junit.framework.TestCase.run(TestCase.java:124)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
fddae:  06-07 16:44:05.999 21691 21705 W System.err:  at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
fddae:  06-07 16:44:06.019 21691 21705 D dalvikvm: GC_EXPLICIT freed 38K, 3% free 16803K/17160K, paused 2ms+1ms, total 19ms
fddae:  06-07 16:44:06.029 21691 21705 D dalvikvm: GC_EXPLICIT freed 1K, 3% free 16802K/17160K, paused 1ms+2ms, total 12ms
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener: Failure while running testLoadFromRemoteDataDir(org.chromium.webapk.shell_apk.DexLoaderTest)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener: junit.framework.AssertionFailedError
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at junit.framework.Assert.fail(Assert.java:48)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at junit.framework.Assert.fail(Assert.java:56)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at org.chromium.webapk.shell_apk.DexLoaderTest.isDexOptNeeded(DexLoaderTest.java:321)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at org.chromium.webapk.shell_apk.DexLoaderTest.testLoadFromRemoteDataDir(DexLoaderTest.java:143)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at java.lang.reflect.Method.invokeNative(Native Method)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at java.lang.reflect.Method.invoke(Method.java:515)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at junit.framework.TestCase.runBare(TestCase.java:134)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at junit.framework.TestResult$1.protect(TestResult.java:115)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at junit.framework.TestResult.runProtected(TestResult.java:133)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at junit.framework.TestResult.run(TestResult.java:118)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:129)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at junit.framework.TestCase.run(TestCase.java:124)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
fddae:  06-07 16:44:06.029 21691 21705 E TestStatusListener:  at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner: failed: testLoadFromRemoteDataDir(org.chromium.webapk.shell_apk.DexLoaderTest)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner: ----- begin exception -----
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner: 
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner: junit.framework.AssertionFailedError
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at junit.framework.Assert.fail(Assert.java:48)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at junit.framework.Assert.fail(Assert.java:56)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at org.chromium.webapk.shell_apk.DexLoaderTest.isDexOptNeeded(DexLoaderTest.java:321)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at org.chromium.webapk.shell_apk.DexLoaderTest.testLoadFromRemoteDataDir(DexLoaderTest.java:143)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at java.lang.reflect.Method.invokeNative(Native Method)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at java.lang.reflect.Method.invoke(Method.java:515)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at junit.framework.TestCase.runBare(TestCase.java:134)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at junit.framework.TestResult$1.protect(TestResult.java:115)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at junit.framework.TestResult.runProtected(TestResult.java:133)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at junit.framework.TestResult.run(TestResult.java:118)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:129)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at junit.framework.TestCase.run(TestCase.java:124)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner:  at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
fddae:  06-07 16:44:06.029 21691 21705 I TestRunner: ----- end exception -----
fddae:  06-07 16:44:06.039 21691 21705 I TestRunner: finished: testLoadFromRemoteDataDir(org.chromium.webapk.shell_apk.DexLoaderTest)
fddae:  06-07 16:44:06.039 21674 21674 D AndroidRuntime: Shutting down VM
Components: Mobile>WebAPKs
Did the new test leave around files on the device that the old tests can't handle or something?

Anyway, clobber isn't going to help. I'm disabling these tests
Labels: -Pri-3 Pri-2
Disable in the cq: https://codereview.chromium.org/2048593003/
this didn't appear to affect the release testers (so not affecting cq), only the debug one failed
Cc: hanxi@chromium.org
Project Member

Comment 18 by bugdroid1@chromium.org, Jun 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e2999632a30dcffc8655e1ad19c127d872d88a4e

commit e2999632a30dcffc8655e1ad19c127d872d88a4e
Author: boliu <boliu@chromium.org>
Date: Tue Jun 07 18:21:00 2016

android: Disable DexLoaderTests

Failing on main waterfall. See bug for details.

BUG= 617935 
TBR=pkotwicz@chromium.org

Review-Url: https://codereview.chromium.org/2048593003
Cr-Commit-Position: refs/heads/master@{#398346}

[modify] https://crrev.com/e2999632a30dcffc8655e1ad19c127d872d88a4e/chrome/android/webapk/shell_apk/javatests/src/org/chromium/webapk/shell_apk/DexLoaderTest.java

The tests pass if I build chrome_public_test_apk from scratch. (Regardless of whether https://codereview.chromium.org/2033953002/ is applied or not)

An incremental build of chrome_public_test_apk causes the test to fail. I do not know why yet. Looks like something which should be rebuilt is not being rebuilt
o_O
what did you touch between incremental builds?
(fwiw, no-op builds for chrome_public_apk hasn't been no-op for at least a week now :( probably not related though)
Owner: agrieve@chromium.org
I can get the tests to fail locally too. I was able to fix the tests locally by removing the --incremental flag in dex.py https://cs.chromium.org/chromium/src/build/android/gyp/dex.py?rcl=0&l=125

Relevant logcat - Android Tests (dbg)
fddae:  06-07 11:05:27.239 24755 24769 D dalvikvm: DexOpt: --- BEGIN 'canary.dex' (bootstrap=0) ---
fddae:  06-07 11:05:27.259 24784 24784 E dalvikvm: Map is missing field_ids entry
fddae:  06-07 11:05:27.259 24784 24784 E dalvikvm: ERROR: Byte swap + verify failed
fddae:  06-07 11:05:27.269 24784 24784 E dalvikvm: Optimization failed
fddae:  06-07 11:05:27.269 24755 24769 W dalvikvm: DexOpt: --- END 'canary.dex' --- status=0xff00, process failed

Relevant logcat - Lollipop Tablet Tester
94402:  06-07 09:06:18.983 20804 20804 W dex2oat : Failed to open .dex from file '/data/data/org.chromium.chrome/app_dex/canary.dex': Failure to verify dex file '/data/data/org.chromium.chrome/app_dex/canary.dex': Offset(160) should be zero when size is zero for field-ids.

Assigning to agrieve@ who knows more about dex.py than I do
With no modifications to dex.py the test passes if I delete out/gn_Debug and build dex_optimizer_apk from scratch
Error message seems earily similar to:
https://bugs.chromium.org/p/chromium/issues/detail?id=616075

The idea behind dx --incremental is that it will reuse already dexed classes that haven't changed, and just re-dex changed classes. When classes are removed, we disable --incremental since it doesn't handle that case itself.

Right now we set enable_incremental_dx = is_debug in our gn args.

Seems like solutions here would be to:
a) disable incremental dexing on bots
b) disable incremental dexing for this one target
c) disable incremental dexing by default

What's the actual bug in dex.py? It either has to be:
a) dx --incremental has a bug, or
b) dex.py fails to pass the complete list of changed .class files to dx --incremental.
c) dex.py fails to recognize a case where it shouldn't use --incremental


OH OH OH!!!

It looks like both dom_distiller_content_java.dex and canary.dex are comprised of only a single .java file. I bet there's a bug with --incremental for single-class libs!
Project Member

Comment 26 by bugdroid1@chromium.org, Jun 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1cc61f54ccbd4048afc6f6f09d1bf98c8c1a48ab

commit 1cc61f54ccbd4048afc6f6f09d1bf98c8c1a48ab
Author: agrieve <agrieve@chromium.org>
Date: Thu Jun 09 04:33:42 2016

Disable dx --incremental for libraries with only 1 .java file

The theory is that there is a bug for libraries with only a single .java
file.

BUG= 617935 ,616075

Review-Url: https://codereview.chromium.org/2045313002
Cr-Commit-Position: refs/heads/master@{#398782}

[modify] https://crrev.com/1cc61f54ccbd4048afc6f6f09d1bf98c8c1a48ab/build/android/gyp/dex.py
[modify] https://crrev.com/1cc61f54ccbd4048afc6f6f09d1bf98c8c1a48ab/build/android/gyp/util/md5_check.py

Project Member

Comment 27 by bugdroid1@chromium.org, Jun 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab92c217cd5792ea92b9e52d2dc65d03992b6f68

commit ab92c217cd5792ea92b9e52d2dc65d03992b6f68
Author: pkotwicz <pkotwicz@chromium.org>
Date: Thu Jun 09 21:34:08 2016

Re-enable DexLoaderTests

https://codereview.chromium.org/2045313002/ fixed the bug with dx --incremental
causing the DexLoaderTests to fail on partial rebuilds of chrome_public_test_apk

BUG= 617935 

Review-Url: https://codereview.chromium.org/2056783002
Cr-Commit-Position: refs/heads/master@{#399023}

[modify] https://crrev.com/ab92c217cd5792ea92b9e52d2dc65d03992b6f68/chrome/android/webapk/shell_apk/javatests/src/org/chromium/webapk/shell_apk/DexLoaderTest.java

Project Member

Comment 28 by bugdroid1@chromium.org, Jun 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2155e5ec527a8dace3a2aa3dd5f331c36fe8d255

commit 2155e5ec527a8dace3a2aa3dd5f331c36fe8d255
Author: boliu <boliu@chromium.org>
Date: Fri Jun 10 03:19:46 2016

Revert of Re-enable DexLoaderTests (patchset #1 id:1 of https://codereview.chromium.org/2056783002/ )

Reason for revert:
Still red on the debug bot :(

https://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/34786

Original issue's description:
> Re-enable DexLoaderTests
>
> https://codereview.chromium.org/2045313002/ fixed the bug with dx --incremental
> causing the DexLoaderTests to fail on partial rebuilds of chrome_public_test_apk
>
> BUG= 617935 
>
> Committed: https://crrev.com/ab92c217cd5792ea92b9e52d2dc65d03992b6f68
> Cr-Commit-Position: refs/heads/master@{#399023}

TBR=hanxi@chromium.org,pkotwicz@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 617935 

Review-Url: https://codereview.chromium.org/2057953002
Cr-Commit-Position: refs/heads/master@{#399072}

[modify] https://crrev.com/2155e5ec527a8dace3a2aa3dd5f331c36fe8d255/chrome/android/webapk/shell_apk/javatests/src/org/chromium/webapk/shell_apk/DexLoaderTest.java

Comment 29 by boliu@chromium.org, Jun 10 2016

The bots on chromium.android didn't turn red this time though. So #26 definitely did help..
Project Member

Comment 30 by bugdroid1@chromium.org, Jun 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab92c217cd5792ea92b9e52d2dc65d03992b6f68

commit ab92c217cd5792ea92b9e52d2dc65d03992b6f68
Author: pkotwicz <pkotwicz@chromium.org>
Date: Thu Jun 09 21:34:08 2016

Re-enable DexLoaderTests

https://codereview.chromium.org/2045313002/ fixed the bug with dx --incremental
causing the DexLoaderTests to fail on partial rebuilds of chrome_public_test_apk

BUG= 617935 

Review-Url: https://codereview.chromium.org/2056783002
Cr-Commit-Position: refs/heads/master@{#399023}

[modify] https://crrev.com/ab92c217cd5792ea92b9e52d2dc65d03992b6f68/chrome/android/webapk/shell_apk/javatests/src/org/chromium/webapk/shell_apk/DexLoaderTest.java

Project Member

Comment 31 by bugdroid1@chromium.org, Jun 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2155e5ec527a8dace3a2aa3dd5f331c36fe8d255

commit 2155e5ec527a8dace3a2aa3dd5f331c36fe8d255
Author: boliu <boliu@chromium.org>
Date: Fri Jun 10 03:19:46 2016

Revert of Re-enable DexLoaderTests (patchset #1 id:1 of https://codereview.chromium.org/2056783002/ )

Reason for revert:
Still red on the debug bot :(

https://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/34786

Original issue's description:
> Re-enable DexLoaderTests
>
> https://codereview.chromium.org/2045313002/ fixed the bug with dx --incremental
> causing the DexLoaderTests to fail on partial rebuilds of chrome_public_test_apk
>
> BUG= 617935 
>
> Committed: https://crrev.com/ab92c217cd5792ea92b9e52d2dc65d03992b6f68
> Cr-Commit-Position: refs/heads/master@{#399023}

TBR=hanxi@chromium.org,pkotwicz@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 617935 

Review-Url: https://codereview.chromium.org/2057953002
Cr-Commit-Position: refs/heads/master@{#399072}

[modify] https://crrev.com/2155e5ec527a8dace3a2aa3dd5f331c36fe8d255/chrome/android/webapk/shell_apk/javatests/src/org/chromium/webapk/shell_apk/DexLoaderTest.java

Project Member

Comment 32 by bugdroid1@chromium.org, Jul 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/14dae967f38c1314ac7b2e3b0cc061f4b39da6ff

commit 14dae967f38c1314ac7b2e3b0cc061f4b39da6ff
Author: pkotwicz <pkotwicz@chromium.org>
Date: Tue Jul 05 18:36:20 2016

Reland: Re-enable DexLoaderTests

https://codereview.chromium.org/2045313002/ fixed the bug with dx --incremental
causing the DexLoaderTests to fail on partial rebuilds of chrome_public_test_apk

BUG= 617935 

Review-Url: https://codereview.chromium.org/2117413002
Cr-Commit-Position: refs/heads/master@{#403808}

[modify] https://crrev.com/14dae967f38c1314ac7b2e3b0cc061f4b39da6ff/chrome/android/webapk/shell_apk/javatests/src/org/chromium/webapk/shell_apk/DexLoaderTest.java

Cc: -pkotw...@chromium.org agrieve@chromium.org
Owner: pkotw...@chromium.org
Status: Fixed (was: Assigned)
 Issue 616923  has some of the CLs which made DexLoaderTest no longer flaky
Project Member

Comment 35 by bugdroid1@chromium.org, Jul 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/00696c0b365c35bd738110960a3886964f390356

commit 00696c0b365c35bd738110960a3886964f390356
Author: pkotwicz <pkotwicz@chromium.org>
Date: Tue Jul 19 20:08:08 2016

💥 Fail compile if dx has input paths which do not end with .jar

dx tool ignores .dex input files and fails with message
"no classfiles specified".

BUG= 617935 

Review-Url: https://codereview.chromium.org/2155363002
Cr-Commit-Position: refs/heads/master@{#406362}

[modify] https://crrev.com/00696c0b365c35bd738110960a3886964f390356/build/android/gyp/dex.py

Sign in to add a comment