Closed Bug 1598461 Opened 5 years ago Closed 4 years ago

Remove vestigial TLS in XPCJSContext::Get()

Categories

(Core :: XPConnect, defect, P2)

Unspecified
All
defect

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: bryce, Assigned: mccr8)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

When running mochitests against GeckoView and using the --no-autorun flag the harness crashes after running the test. The test being run does not appear to matter, and I've encountered this with various Media tests.

Edit: I originally thought this was a --no-autorun issue, but it appears to be happening regardless of that flag being used.

The testing process appears to work correctly for the most part. Tests are run, but when transitioning to the mochitests result screen the crash happens. Sometimes I'm able to briefly see the results before the crash, sometimes not.

The logs from the test run indicate that dumps have been saved, but I'm unable to locate these and I'm not sure how to debug further.

Full output of running a test and getting a crash locally.

MOZCONFIG=.mozconfig-android-i686-dbg ./mach mochitest --no-autorun dom/media/test/test_paused.html 
Requirement already satisfied: six==1.10.0 in /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/_virtualenvs/init/lib/python2.7/site-packages (from -r /home/b/projects/mozilla/mozilla-unified/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements.txt (line 2))
Requirement already satisfied: twisted==10.2.0 in /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/_virtualenvs/init/lib/python2.7/site-packages (from -r /home/b/projects/mozilla/mozilla-unified/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements.txt (line 4))
Requirement already satisfied: txws==0.9.1 in /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/_virtualenvs/init/lib/python2.7/site-packages (from -r /home/b/projects/mozilla/mozilla-unified/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements.txt (line 7))
Requirement already satisfied: psutil>=5.6.3 in /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/_virtualenvs/init/lib/python2.7/site-packages (from -r /home/b/projects/mozilla/mozilla-unified/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements.txt (line 9))
Requirement already satisfied: ipaddr==2.1.11 in /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/_virtualenvs/init/lib/python2.7/site-packages (from -r /home/b/projects/mozilla/mozilla-unified/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements.txt (line 12))
Requirement already satisfied: passlib==1.6.5 in /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/_virtualenvs/init/lib/python2.7/site-packages (from -r /home/b/projects/mozilla/mozilla-unified/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements.txt (line 13))
Requirement already satisfied: zope.interface in /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/_virtualenvs/init/lib/python2.7/site-packages (from twisted==10.2.0->-r /home/b/projects/mozilla/mozilla-unified/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements.txt (line 4))
Requirement already satisfied: setuptools in /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/_virtualenvs/init/lib/python2.7/site-packages (from zope.interface->twisted==10.2.0->-r /home/b/projects/mozilla/mozilla-unified/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements.txt (line 4))
You are using pip version 9.0.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
 0:00.81 adb INFO Using adb 1.0.41
 0:01.35 adb INFO adbd running as root
 0:01.48 adb INFO su -c setenforce 0 exitcode 0, stdout: None
 0:01.86 adb INFO su 0 supported
 0:02.12 adb INFO /system/bin/ls -1A supported
 0:02.24 adb INFO Native cp support: True
 0:02.37 adb INFO Native chmod -R support: True
 0:02.50 adb INFO Native chown -R support: True
 0:02.63 adb INFO Setting SELinux Permissive
 0:02.88 adb INFO Native pidof support: True
Re-install geckoview AndroidTest? (Y/n) y
Installing geckoview AndroidTest...
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=utf-8

> Task :machBuildFaster
Executing task :machBuildFaster
:machBuildFaster>  0:00.72 /usr/bin/make -C faster -j16 -s
:machBuildFaster>  0:00.90 Elapsed: 0.00s; From /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/dist/bin/localization: Kept 31 existing; Added/updated 0; Removed 0 files and 0 directories.
:machBuildFaster>  0:00.90 Elapsed: 0.00s; From /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/dist/bin/gmp-fake/1.0: Kept 1 existing; Added/updated 0; Removed 0 files and 0 directories.
:machBuildFaster>  0:00.91 Elapsed: 0.00s; From /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/dist/bin/gmp-fakeopenh264/1.0: Kept 1 existing; Added/updated 0; Removed 0 files and 0 directories.
:machBuildFaster>  0:00.92 Elapsed: 0.01s; From /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/dist/bin/gmp-clearkey/0.1: Kept 0 existing; Added/updated 1; Removed 0 files and 0 directories.
:machBuildFaster>  0:01.14 Elapsed: 0.21s; From /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/dist/bin: Kept 1742 existing; Added/updated 30; Removed 0 files and 0 directories.
:machBuildFaster>  0:01.73  0:00.75 /home/b/projects/mozilla/mozilla-unified/gradlew geckoview:generateJNIWrappersForGeneratedWithGeckoBinariesDebug -x lint
:machBuildFaster>  0:01.76 Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=utf-8
:machBuildFaster>  0:02.36 Starting a Gradle Daemon, 1 busy and 2 stopped Daemons could not be reused, use --status for details
:machBuildFaster>  0:11.46 > Task :geckoview:preBuild UP-TO-DATE
:machBuildFaster>  0:11.46 > Task :geckoview:preWithGeckoBinariesDebugBuild UP-TO-DATE
:machBuildFaster>  0:11.65 > Task :annotations:compileJava UP-TO-DATE
:machBuildFaster>  0:11.65 > Task :annotations:processResources NO-SOURCE
:machBuildFaster>  0:11.65 > Task :annotations:classes UP-TO-DATE
:machBuildFaster>  0:11.65 > Task :annotations:jar UP-TO-DATE
:machBuildFaster>  0:11.75 > Task :geckoview:compileWithGeckoBinariesDebugAidl UP-TO-DATE
:machBuildFaster>  0:11.75 > Task :geckoview:compileWithGeckoBinariesDebugRenderscript NO-SOURCE
:machBuildFaster>  0:11.75 > Task :geckoview:checkWithGeckoBinariesDebugManifest UP-TO-DATE
:machBuildFaster>  0:11.75 > Task :geckoview:generateWithGeckoBinariesDebugBuildConfig UP-TO-DATE
:machBuildFaster>  0:11.75 > Task :geckoview:generateWithGeckoBinariesDebugResValues UP-TO-DATE
:machBuildFaster>  0:11.75 > Task :geckoview:generateWithGeckoBinariesDebugResources UP-TO-DATE
:machBuildFaster>  0:11.75 > Task :geckoview:packageWithGeckoBinariesDebugResources UP-TO-DATE
:machBuildFaster>  0:11.75 > Task :geckoview:processWithGeckoBinariesDebugManifest UP-TO-DATE
:machBuildFaster>  0:11.86 > Task :geckoview:generateWithGeckoBinariesDebugRFile UP-TO-DATE
:machBuildFaster>  0:12.45 > Task :geckoview:compileWithGeckoBinariesDebugKotlin UP-TO-DATE
:machBuildFaster>  0:12.45 > Task :geckoview:prepareLintJar UP-TO-DATE
:machBuildFaster>  0:12.45 > Task :geckoview:generateWithGeckoBinariesDebugSources UP-TO-DATE
:machBuildFaster>  0:12.45 > Task :geckoview:javaPreCompileWithGeckoBinariesDebug UP-TO-DATE
:machBuildFaster>  0:12.85 > Task :geckoview:compileWithGeckoBinariesDebugJavaWithJavac UP-TO-DATE
:machBuildFaster>  0:12.85 > Task :geckoview:bundleLibRuntimeWithGeckoBinariesDebug UP-TO-DATE
:machBuildFaster>  0:12.85 > Task :geckoview:generateJNIWrappersForGeneratedWithGeckoBinariesDebug UP-TO-DATE
:machBuildFaster>  0:12.85 Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
:machBuildFaster>  0:12.85 Use '--warning-mode all' to show the individual deprecation warnings.
:machBuildFaster>  0:12.85 See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
:machBuildFaster>  0:12.85 BUILD SUCCESSFUL in 10s
:machBuildFaster>  0:12.85 15 actionable tasks: 15 up-to-date
:machBuildFaster>  0:13.36 351 compiler warnings present.
:machBuildFaster>  0:13.43 Overall system resources - Wall time: 13s; CPU: 22%; Read bytes: 4157440; Write bytes: 1671168; Read time: 36; Write time: 56
:machBuildFaster> To view resource usage of the build, run |mach resource-usage|.
:machBuildFaster>  0:13.45 Your build was successful!

> Task :machStagePackageForGeckoview
Executing task :machStagePackageForGeckoview
:machStagePackageForGeckoview> make: Entering directory '/home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/mobile/android/installer'
:machStagePackageForGeckoview> /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/_virtualenvs/init/bin/python -m mozbuild.action.file_generate /home/b/projects/mozilla/mozilla-unified/toolkit/locales/gen_multilocale.py main '../../../dist/bin/res/multilocale.txt' .deps/multilocale.txt.pp '../../../dist/bin/res/multilocale.txt'  en-US
:machStagePackageForGeckoview> printf '\n[multilocale]\n' > locale-manifest.in
:machStagePackageForGeckoview> printf '@BINPATH@/res/multilocale.txt\n' >> locale-manifest.in
:machStagePackageForGeckoview> for LOCALE in  en-US ;\
:machStagePackageForGeckoview> do \
:machStagePackageForGeckoview>   for ENTRY in @BINPATH@/chrome/ ;\
:machStagePackageForGeckoview>  do \
:machStagePackageForGeckoview>    printf "$ENTRY""$LOCALE"'@JAREXT@\n' >> locale-manifest.in; \
:machStagePackageForGeckoview>    printf "$ENTRY""$LOCALE"'.manifest\n' >> locale-manifest.in; \
:machStagePackageForGeckoview>   done \
:machStagePackageForGeckoview> done
:machStagePackageForGeckoview> NO_PKG_FILES="core bsdecho js js-config jscpucfg nsinstall viewer TestGtkEmbed elf-dynstr-gc mangle* maptsv* mfc* msdump* msmap* nm2tsv* nsinstall* res/samples res/throbber shlibsign* certutil* pk12util* BadCertAndPinningServer* DelegatedCredentialsServer* OCSPStaplingServer* SanctionsTestServer* GenerateOCSPResponse* chrome/chrome.rdf chrome/app-chrome.manifest chrome/overlayinfo components/compreg.dat components/xpti.dat content_unit_tests necko_unit_tests *.dSYM " \
:machStagePackageForGeckoview> /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/_virtualenvs/init/bin/python /home/b/projects/mozilla/mozilla-unified/toolkit/mozapps/installer/packager.py -DPKG_LOCALE_MANIFEST=/home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/mobile/android/installer/locale-manifest.in -DMOZ_APP_NAME=fennec -DPREF_DIR=defaults/pref -DJAREXT= -DMOZ_CHILD_PROCESS_NAME=libplugin-container.so -DANDROID_CPU_ARCH=x86  -DNSS_DISABLE_DBM=1 -DMOZ_DEBUG=1 -DMOZ_ANDROID_EXCLUDE_FONTS=1 -DMOZ_GECKOVIEW_JAR=1 -DDLL_PREFIX=lib -DDLL_SUFFIX=.so -DBIN_SUFFIX= -DDIR_MACOS= -DDIR_RESOURCES= -DMOZ_FOLD_LIBS=1 -DBINPATH=bin -DENABLE_MARIONETTE=1 -DA11Y_LOG=1 -DACCESSIBILITY=1 -DANDROID=1 -DBROWSER_CHROME_URL=chrome://browser/content/browser.xul -DBROWSER_CHROME_URL_QUOTED='"chrome://browser/content/browser.xul"' -DBUILD_CTYPES=1 -DCROSS_COMPILE=1 -DEARLY_BETA_OR_EARLIER=1 -DENABLE_INTL_API=1 -DENABLE_SYSTEM_EXTENSION_DIRS=1 -DENABLE_TESTS=1 -DENABLE_TYPED_OBJECTS=1 -DENABLE_WASM_BIGINT=1 -DENABLE_WASM_BULKMEM_OPS=1 -DENABLE_WASM_CRANELIFT=1 -DENABLE_WASM_GC=1 -DENABLE_WASM_REFTYPES=1 -DFORCE_PR_LOG=1 -DGTEST_HAS_CLONE=0 -DGTEST_HAS_RTTI=0 -DGTEST_OS_LINUX_ANDROID=1 -DGTEST_USE_OWN_TR1_TUPLE=1 -DHAVE_ALLOCA_H=1 -DHAVE_ARC4RANDOM=1 -DHAVE_ARC4RANDOM_BUF=1 -DHAVE_BYTESWAP_H=1 -DHAVE_CLOCK_MONOTONIC=1 -DHAVE_CPUID_H=1 -DHAVE_DIRENT_H=1 -DHAVE_DLADDR=1 -DHAVE_DLOPEN=1 -DHAVE_FT_BITMAP_SIZE_Y_PPEM=1 -DHAVE_FT_GLYPHSLOT_EMBOLDEN=1 -DHAVE_FT_LOAD_SFNT_TABLE=1 -DHAVE_GETOPT_H=1 -DHAVE_GETTID=1 -DHAVE_GMTIME_R=1 -DHAVE_INTTYPES_H=1 -DHAVE_LCHOWN=1 -DHAVE_LINUX_IF_ADDR_H=1 
:machStagePackageForGeckoview> -DHAVE_LINUX_PERF_EVENT_H=1 -DHAVE_LINUX_QUOTA_H=1 -DHAVE_LINUX_RTNETLINK_H=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MALLINFO=1 -DHAVE_MALLOC_H=1 -DHAVE_MEMALIGN=1 -DHAVE_MEMMEM=1 -DHAVE_NETINET_IN_H=1 -DHAVE_NL_TYPES_H=1 -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC=1 -DHAVE_PTHREAD_H=1 -DHAVE_SETPRIORITY=1 -DHAVE_STDINT_H=1 -DHAVE_STRERROR=1 -DHAVE_STRNDUP=1 -DHAVE_SYSCALL=1 -DHAVE_SYS_QUEUE_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_VA_COPY=1 -DHAVE_VISIBILITY_ATTRIBUTE=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE__UNWIND_BACKTRACE=1 -DJS_BUILD_BINAST=1 -DJS_CODEGEN_X86=1 -DJS_DEFAULT_JITREPORT_GRANULARITY=3 -DJS_GC_SMALL_CHUNK_SIZE=1 -DJS_GC_ZEAL=1 -DJS_JITSPEW=1 -DJS_MASM_VERBOSE=1 -DJS_NUNBOX32=1 -DJS_STRUCTURED_SPEW=1 -DJS_TRACE_LOGGING=1 -DMALLOC_H='<malloc.h>' -DMALLOC_USABLE_SIZE_CONST_PTR=const -DMOZILLA_UAVERSION='"72.0"' -DMOZILLA_VERSION='"72.0a1"' -DMOZILLA_VERSION_U=72.0a1 -DMOZ_ALLOW_LEGACY_EXTENSIONS=1 -DMOZ_ANDROID_HISTORY=1 -DMOZ_APP_UA_NAME='"Firefox"' -DMOZ_APP_UA_VERSION='"72.0a1"' -DMOZ_AV1=1 -DMOZ_BUILD_APP=mobile/android -DMOZ_CRASHREPORTER=1 -DMOZ_DATA_REPORTING=1 -DMOZ_DEBUG=1 -DMOZ_DEBUG_RUST=1 -DMOZ_DISTRIBUTION_ID='"org.mozilla"' -DMOZ_DLL_PREFIX='"lib"' -DMOZ_DLL_SUFFIX='".so"' -DMOZ_DUMP_PAINTING=1 -DMOZ_ENABLE_SKIA=1 -DMOZ_ENABLE_SKIA_PDF=1 -DMOZ_ENABLE_SKIA_PDF_SFNTLY=1 -DMOZ_FFVPX=1 -DMOZ_FFVPX_AUDIOONLY=1 -DMOZ_FMP4=1 -DMOZ_GECKO_PROFILER=1 -DMOZ_GECKO_PROFILER_PARSE_ELF=1 -DMOZ_GFX_OPTIMIZE_MOBILE=1 -DMOZ_IGNORE_PAINT_WILL_RESAMPLE=1 -DMOZ_INSTRUMENT_EVENT_LOOP=1 -DMOZ_LINKER=1 -DMOZ_LOGGING=1 -DMOZ_MACBUNDLE_ID=org.mozilla.fennecbdebug -DMOZ_MEMORY=1 -DMOZ_NEW_CERT_STORAGE=1 -DMOZ_NEW_NOTIFICATION_STORE=1 -DMOZ_NEW_XULSTORE=1 -DMOZ_NO_SMART_CARDS=1 -DMOZ_PEERCONNECTION=1 -DMOZ_PROFILER_MEMORY=1 -DMOZ_PROFILING=1 -DMOZ_RAW=1 -DMOZ_REFLOW_PERF=1 -DMOZ_REFLOW_PERF_DSP=1 -DMOZ_REPLACE_MALLOC=1 -DMOZ_SAMPLE_TYPE_S16=1 -DMOZ_SCTP=1 -DMOZ_SERVICES_HEALTHREPORT=1 -DMOZ_SRTP=1 -DMOZ_STATIC_JS=1 -DMOZ_TREE_CAIRO=1 -DMOZ_TREE_FREETYPE=1 -DMOZ_TREE_PIXMAN=1 -DMOZ_TREMOR=1 -DMOZ_UPDATE_CHANNEL=de
:machStagePackageForGeckoview> fault -DMOZ_USER_DIR='".mozilla"' -DMOZ_USE_NATIVE_POPUP_WINDOWS=1 -DMOZ_VERIFY_MAR_SIGNATURE=1 -DMOZ_WEBM_ENCODER=1 -DMOZ_WEBRTC=1 -DMOZ_WEBRTC_ASSERT_ALWAYS=1 -DMOZ_WEBRTC_SIGNALING=1 -DMOZ_WEBSPEECH=1 -DMOZ_WEBSPEECH_TEST_BACKEND=1 -DMOZ_WIDGET_ANDROID=1 -DMOZ_XUL=1 -DNIGHTLY_BUILD=1 -DNO_NSPR_10_SUPPORT=1 -DNS_PRINTING=1 -DNS_PRINT_PREVIEW=1 -DSTATIC_JS_API=1 -DSTDC_HEADERS=1 -DTARGET_XPCOM_ABI='"x86-gcc3"' -DUSE_SKIA=1 -DU_STATIC_IMPLEMENTATION=1 -DU_USING_ICU_NAMESPACE=0 -DVA_COPY=va_copy -DWASM_CODEGEN_DEBUG=1 -DWASM_PRIVATE_REFTYPES=1 -DXP_LINUX=1 -DXP_UNIX=1 -DX_DISPLAY_MISSING=1 -DZLIB_IN_MOZGLUE=1 -D_LIBCPP_ALWAYS_INLINE='' -D_LIBCPP_HIDE_FROM_ABI='__attribute__((__exclude_from_explicit_instantiation__))' -D_LIBCPP_INLINE_VISIBILITY='' -D_REENTRANT=1 -DAB_CD=en-US \
:machStagePackageForGeckoview>  --format omni \
:machStagePackageForGeckoview>  --removals /home/b/projects/mozilla/mozilla-unified/mobile/android/installer/removed-files.in \
:machStagePackageForGeckoview>  --ignore-errors \
:machStagePackageForGeckoview>  --ignore-broken-symlinks \
:machStagePackageForGeckoview>  --minify \
:machStagePackageForGeckoview>   \
:machStagePackageForGeckoview>   \
:machStagePackageForGeckoview>   \
:machStagePackageForGeckoview>  /home/b/projects/mozilla/mozilla-unified/mobile/android/installer/package-manifest.in '../../../dist' '../../../dist'/geckoview \
:machStagePackageForGeckoview>  
:machStagePackageForGeckoview> Warning: $SRCDIR/mobile/android/installer/package-manifest.in:90: Missing file(s): bin/package-name.txt
:machStagePackageForGeckoview> Warning: $SRCDIR/mobile/android/installer/package-manifest.in:96: Missing file(s): bin/blocklist.xml
:machStagePackageForGeckoview> Warning: $SRCDIR/mobile/android/installer/package-manifest.in:101: Missing file(s): bin/components/components.manifest
:machStagePackageForGeckoview> Warning: $SRCDIR/mobile/android/installer/package-manifest.in:159: Missing file(s): bin/features/*
:machStagePackageForGeckoview> Warning: $SRCDIR/mobile/android/installer/package-manifest.in:179: Missing file(s): bin/defaults/pref/channel-prefs.js
:machStagePackageForGeckoview> Warning: $SRCDIR/mobile/android/installer/package-manifest.in:235: Missing file(s): bin/crashreporter-override.ini
:machStagePackageForGeckoview> make: Leaving directory '/home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/mobile/android/installer'

> Task :geckoview:installWithGeckoBinariesDebugAndroidTest
04:44:08 V/ddms: execute: running am get-config
04:44:08 V/ddms: execute 'am get-config' on 'emulator-5554' : EOF hit. Read: -1
04:44:08 V/ddms: execute: returning
Installing APK 'geckoview-withGeckoBinaries-debug-androidTest.apk' on 'mozemulator-x86-7.0(AVD) - 7.0' for geckoview:withGeckoBinariesDebugAndroidTest
04:44:08 D/geckoview-withGeckoBinaries-debug-androidTest.apk: Uploading geckoview-withGeckoBinaries-debug-androidTest.apk onto device 'emulator-5554'
04:44:08 D/Device: Uploading file onto device 'emulator-5554'
04:44:08 D/ddms: Reading file permision of /home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/gradle/build/mobile/android/geckoview/outputs/apk/androidTest/withGeckoBinaries/debug/geckoview-withGeckoBinaries-debug-androidTest.apk as: rw-r--r--
04:44:10 V/ddms: execute: running pm install -r -t "/data/local/tmp/geckoview-withGeckoBinaries-debug-androidTest.apk"
04:44:15 V/ddms: execute 'pm install -r -t "/data/local/tmp/geckoview-withGeckoBinaries-debug-androidTest.apk"' on 'emulator-5554' : EOF hit. Read: -1
04:44:15 V/ddms: execute: returning
04:44:15 V/ddms: execute: running rm "/data/local/tmp/geckoview-withGeckoBinaries-debug-androidTest.apk"
04:44:15 V/ddms: execute 'rm "/data/local/tmp/geckoview-withGeckoBinaries-debug-androidTest.apk"' on 'emulator-5554' : EOF hit. Read: -1
04:44:15 V/ddms: execute: returning
Installed on 1 device.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 25s
47 actionable tasks: 3 executed, 44 up-to-date
 0:32.87 adb INFO Using adb 1.0.41
 0:33.41 adb INFO adbd running as root
 0:33.54 adb INFO su -c setenforce 0 exitcode 0, stdout: None
 0:33.93 adb INFO su 0 supported
 0:34.19 adb INFO /system/bin/ls -1A supported
 0:34.32 adb INFO Native cp support: True
 0:34.44 adb INFO Native chmod -R support: True
 0:34.57 adb INFO Native chown -R support: True
 0:34.70 adb INFO Setting SELinux Permissive
 0:34.94 adb INFO Native pidof support: True
 0:41.38 INFO Android sdk version '24'; will use this to filter manifests
 0:41.38 INFO Checking for ssltunnel processes...
 0:41.42 INFO Checking for xpcshell processes...
 0:41.44 SUITE_START: mochitest-plain - running 1 tests
 0:41.44 INFO Running manifest: dom/media/test/mochitest.ini
pk12util: PKCS12 IMPORT SUCCESSFUL
 0:43.21 INFO MochitestServer : launching [u'/home/b/.mozbuild/android-device/host-utils-71.0a1.en-US.linux-x86_64/xpcshell', '-g', '/home/b/.mozbuild/android-device/host-utils-71.0a1.en-US.linux-x86_64', '-f', '/home/b/.mozbuild/android-device/host-utils-71.0a1.en-US.linux-x86_64/components/httpd.js', '-e', "const _PROFILE_PATH = '/tmp/tmpKi_6pG.mozrunner'; const _SERVER_PORT = '8888'; const _SERVER_ADDR = '192.168.154.128'; const _TEST_PREFIX = undefined; const _DISPLAY_RESULTS = false;", '-f', '/home/b/projects/mozilla/mozilla-builds/obj-droid-i686-dbg/_tests/testing/mochitest/server.js']
 0:43.21 INFO runtests.py | Server pid: 7997
 0:43.23 INFO runtests.py | Websocket server pid: 8001
 0:43.25 INFO runtests.py | websocket/process bridge pid: 8006
 0:43.38 INFO runtests.py | SSL tunnel pid: 8024
 0:44.58 INFO runtests.py | Running with scheme: http
 0:44.58 INFO runtests.py | Running with e10s: True
 0:44.58 INFO runtests.py | Running with fission: False
 0:44.58 INFO runtests.py | Running with serviceworker_e10s: True
 0:44.58 INFO runtests.py | Running with socketprocess_e10s: False
 0:44.58 INFO runtests.py | Running tests: start.

 0:44.97 adb INFO Granting important runtime permissions to org.mozilla.geckoview.test
 0:47.15 adb INFO launch_application: am start -W -n org.mozilla.geckoview.test/org.mozilla.geckoview.test.TestRunnerActivity -a android.intent.action.MAIN --es env9 MOZ_UPLOAD_DIR=/sdcard/tests/mozlog --es env8 R_LOG_DESTINATION=stderr --es args "-no-remote -profile /sdcard/tests/profile//" --es env3 R_LOG_VERBOSE=1 --es env2 XPCOM_DEBUG_BREAK=stack --es env1 MOZ_WEBRENDER=0 --es env0 MOZ_CRASHREPORTER=1 --es env7 MOZ_CRASHREPORTER_SHUTDOWN=1 --es env6 MOZ_IN_AUTOMATION=1 --es env5 MOZ_DISABLE_NONLOCAL_CONNECTIONS=1 --es env4 DISABLE_UNSAFE_CPOW_WARNINGS=1 --ez use_multiprocess True --es env13 MOZ_HIDE_RESULTS_TABLE=1 --es env12 R_LOG_LEVEL=6 --es env11 MOZ_DEVELOPER_REPO_DIR=/home/b/projects/mozilla/mozilla-unified --es env10 MOZ_CRASHREPORTER_NO_REPORT=1 -d "http://mochi.test:8888/tests?closeWhenDone=1&logFile=%2Fsdcard%2Ftests%2Flogs%2Fmochitest.log&fileLevel=INFO&consoleLevel=INFO&hideResultsTable=1&manifestFile=tests.json&dumpOutputDirectory=%2Fsdcard%2Ftests"
remoteautomation.py | Application pid: 26732
 1:05.87 INFO SimpleTest START
 1:05.89 TEST_START: dom/media/test/test_paused.html
 1:09.63 INFO Buffered messages logged at 16:44:50
 1:07.25 PASS A valid string reason is expected
 1:07.26 PASS Reason cannot be empty
 1:07.31 PASS v1.paused must initially be true
 1:07.31 PASS a1.paused must initially be true
 1:09.64 INFO Buffered messages finished
 1:07.62 ERROR unexpected-crash-dump-found - This test left crash dumps behind, but we weren't expecting it to!
 1:07.62 INFO Found unexpected crash dump file /storage/emulated/0/tests/profile/minidumps/3ad984fd-fbcd-9061-c897-2c0277f49e24.dmp.
 1:07.63 INFO Found unexpected crash dump file /storage/emulated/0/tests/profile/minidumps/3ad984fd-fbcd-9061-c897-2c0277f49e24.extra.
 1:07.67 TEST_END: Test CRASH, expected OK. Subtests passed 4/5. Unexpected 1
 1:07.70 INFO TEST-START | Shutdown
 1:07.70 INFO Passed:  4
 1:07.70 INFO Failed:  1
 1:07.70 INFO Todo:    0
 1:07.70 INFO Mode:    e10s
 1:07.70 INFO Slowest: 1784ms - /tests/dom/media/test/test_paused.html
 1:07.71 INFO SimpleTest FINISHED
wait for org.mozilla.geckoview.test complete; top activity=org.mozilla.geckoview_example
remoteautomation.py | Application ran for: 0:00:27.478717
 1:13.05 CRASH: pid:7046. Test:dom/media/test/test_paused.html. Minidump analysed:False. Signature:[None]
Crash dump filename: /tmp/tmp30BfhR/3ad984fd-fbcd-9061-c897-2c0277f49e24.dmp
MINIDUMP_STACKWALK not set, can't process dump.

 1:13.05 INFO Stopping web server
 1:13.07 INFO Stopping web socket server
 1:13.09 INFO Stopping ssltunnel
websocket/process bridge listening on port 8191
 1:13.15 INFO Stopping websocket/process bridge
 1:13.16 WARNING leakcheck | refcount logging is off, so leaks can't be detected!
 1:13.16 INFO runtests.py | Running tests: end.
 1:15.13 INFO Buffered messages finished
0 INFO TEST-START | Shutdown
1 INFO Passed:  4
2 INFO Failed:  1
3 INFO Todo:    0
4 INFO Mode:    e10s
5 INFO SimpleTest FINISHED
 1:16.41 INFO Buffered messages finished
 1:16.41 SUITE_END
 1:16.41 
Overall Summary
===============

mochitest-plain
~~~~~~~~~~~~~~~
Ran 7 checks (1 asserts, 5 subtests, 1 tests)
Expected results: 5
Unexpected results: 2
  test: 1 (1 crash)
  subtest: 1 (1 error)

Unexpected Results
------------------
dom/media/test/test_paused.html
  ERROR unexpected-crash-dump-found - This test left crash dumps behind, but we weren't expecting it to!
  CRASH dom/media/test/test_paused.html - Finished in 1784ms
{u'runtime': 1784}
Summary: Mochitests run with --no-autorun crash → Mochitests crash at end of run

After some wrangling I got a backtrace out of the crash dump

Thread 11 (crashed)
 0  libxul.so!mozilla::detail::ThreadLocal<XPCJSContext*, mozilla::detail::ThreadLocalKeyStorage>::get() const [ThreadLocal.h : 202 + 0x29]
 1  libxul.so!XPCJSContext::RecordScriptActivity(bool) [XPCJSContext.cpp : 556 + 0x5]
 2  libxul.so!xpc::AutoScriptActivity::AutoScriptActivity(bool) [XPCJSContext.cpp : 586 + 0x7]
 3  libxul.so!void mozilla::Maybe<xpc::AutoScriptActivity>::emplace<bool>(bool&&) [Maybe.h : 526 + 0x16]
 4  libxul.so!mozilla::SharedThreadPool::SpinUntilEmpty() [SharedThreadPool.cpp : 91 + 0x2b]
 5  libxul.so!mozilla::SharedThreadPoolShutdownObserver::Observe(nsISupports*, char const*, char16_t const*) [SharedThreadPool.cpp : 65 + 0x5]
 6  libxul.so!nsObserverList::NotifyObservers(nsISupports*, char const*, char16_t const*) [nsObserverList.cpp : 66 + 0x1d]
 7  libxul.so!nsObserverService::NotifyObservers(nsISupports*, char const*, char16_t const*) [nsObserverService.cpp : 291 + 0x19]
 8  libxul.so!mozilla::ShutdownXPCOM(nsIServiceManager*) [XPCOMInit.cpp : 636 + 0x18]
 9  libxul.so!mozilla::net::SocketProcessChild::CleanUp() [SocketProcessChild.cpp : 125 + 0x7]
10  libxul.so!XRE_InitChildProcess(int, char**, XREChildData const*) [nsEmbedFunctions.cpp : 773 + 0xe]
11  libmozglue.so!Java_org_mozilla_gecko_mozglue_GeckoLoader_nativeRun [APKOpen.cpp : 389 + 0xc]

What appears to happen is we create a process type of GeckoProcessType_Socket which never initializes xpconnect modules (usually done in nsLayoutModuleInitialize->xpcModuleCtor ) . Then on shutdown we create an AutoScriptActivity that in turn uses thread local storage that was suppose to be initialized by the above xpcModuleCtor.

Still looking, but I think we need to either call xpcModuleCtor or if that hasn't been called change how xpcom shutdown works.

Hey Andrew,
I'm not very familiar with how the above xpconnect initialization should work, do you have a recommendation on how to fix the above?

Flags: needinfo?(continuation)

Do these socket processes run JS? How are you starting up XPCOM?

Flags: needinfo?(continuation)

Looking at bug 1513059, it sounds like the socket process uses the minimal XPCOM startup.

So, the use of minimal XPCOM startup implies that this kind of process does not run JS, but it uses this SharedThreadPool thing is using AutoScriptActivity, which I think is basically keeping an eye on when we call into JS, for some kind of reason, but it clearly is not resilient enough to be run in a process that has never initialized XPConnect.

I don't know if we want to land this as-is, but you could at least try this patch to see if it fixes your crash. The idea is that it makes XPCJSContext::get() return null if the TLS hasn't been initialized.

Does that patch fix the crash?

Flags: needinfo?(bdahl)

This use of TLS is a little goofy, because it was added in https://hg.mozilla.org/mozilla-central/rev/12cbd8e08e62d7997971081fed58041ed8abb021 as part of Quantum DOM, which has since been ripped out.

That patch fixes the crash.

Flags: needinfo?(bdahl)

Great. I think I can just remove this use of TLS altogether.

Component: General → XPConnect
Product: GeckoView → Core
Summary: Mochitests crash at end of run → Remove vestigial TLS in XPCJSContext::Get()

This was added for Quantum DOM, but we only have a single XPCJSContext
in each process. This patch goes back to the old way of storing a
pointer to the XPCJSContext on nsXPConnect. It probably won't be any
faster because nsXPConnect::XPConnect() involves a TLS lookup to do
the thread safety check.

This was needed because SharedThreadPool::SpinUntilEmpty() can be used
in a minimal XPCOM process that does not set up XPConnect, and it uses
AutoScriptActivity, which calls
XPCJSContext::RecordScriptActivity(false), which should succeed even
in a process where XPConnect has not been initialized. That function
is in fact already set up to deal with XPCJSContext::Get() returning
null, so we just need to make it return null when there is no
XPConnect.

Assignee: nobody → continuation
Attachment #9114304 - Attachment is obsolete: true

The new patch is a little more involved, but it should still solve the crash. Let me know if it doesn't.

Patch works locally for me, thanks!

Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7b5f84e13213
Remove vestigial TLS in XPCJSContext::Get(). r=jandem
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: