Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android crashes with "fatal runtime error: allocator memory exhausted" #20149

Closed
jdm opened this issue Feb 28, 2018 · 13 comments
Closed

Android crashes with "fatal runtime error: allocator memory exhausted" #20149

jdm opened this issue Feb 28, 2018 · 13 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Feb 28, 2018

When I open the Servo app on my Pixel, it crashes after partially displaying the Rust wikipedia page. Logcat shows:

02-28 15:02:15.792 31546 31572 D RustAndroidGlueStdouterr: fatal runtime error: allocator memory exhausted
02-28 15:02:15.792 31546 31605 F libc    : Fatal signal 4 (SIGILL), code 1, fault addr 0xd88d4c92 in tid 31605 (LayoutThread Pi), pid 31546 (m.mozilla.servo)
02-28 15:02:15.855 31546 31571 V threaded_app: New input event: type=2
02-28 15:02:15.916 31546 31571 I chatty  : uid=10020(com.mozilla.servo) identical 3 lines
02-28 15:02:15.933 31546 31571 V threaded_app: New input event: type=2
02-28 15:02:16.015 31663 31663 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
02-28 15:02:16.018   744   744 I /system/bin/tombstoned: received crash request for pid 31546
02-28 15:02:16.026 31663 31663 I crash_dump32: performing dump of process 31546 (target tid = 31605)
02-28 15:02:16.027 31663 31663 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-28 15:02:16.027 31663 31663 F DEBUG   : Build fingerprint: 'google/sailfish/sailfish:8.1.0/OPM1.171019.016/4503492:user/release-keys'
02-28 15:02:16.027 31663 31663 F DEBUG   : Revision: '0'
02-28 15:02:16.027 31663 31663 F DEBUG   : ABI: 'arm'
02-28 15:02:16.027 31663 31663 F DEBUG   : pid: 31546, tid: 31605, name: LayoutThread Pi  >>> com.mozilla.servo <<<
02-28 15:02:16.027 31663 31663 F DEBUG   : signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0xd88d4c92
02-28 15:02:16.027 31663 31663 F DEBUG   :     r0 00000000  r1 d8d23235  r2 00000001  r3 d88d4da9
02-28 15:02:16.027 31663 31663 F DEBUG   :     r4 cd9f86f4  r5 00400000  r6 c0000001  r7 cd9f8520
02-28 15:02:16.027 31663 31663 F DEBUG   :     r8 00000001  r9 00000000  sl 00000000  fp cd9f8680
02-28 15:02:16.027 31663 31663 F DEBUG   :     ip cd9f8458  sp cd9f84f8  lr d88d4db3  pc d88d4c92  cpsr 40000030
02-28 15:02:16.042 31663 31663 F DEBUG   :
02-28 15:02:16.042 31663 31663 F DEBUG   : backtrace:
02-28 15:02:16.042 31663 31663 F DEBUG   :     #00 pc 0277fc92  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so (alloc_system::platform::_$LT$impl$u20$alloc..allocator..Alloc$u20$for$u20$$RF$$u27$a$u20$alloc_system..System$GT$::oom::h2ed84653f244611e+49)
02-28 15:02:16.042 31663 31663 F DEBUG   :     #01 pc 0277fc5b  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so (_$LT$alloc_system..System$u20$as$u20$alloc..allocator..Alloc$GT$::oom::hde3cc25712183ff5+20)
02-28 15:02:16.042 31663 31663 F DEBUG   :     #02 pc 018a3f89  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so (_$LT$$RF$$u27$a$u20$jemallocator..Jemalloc$u20$as$u20$alloc..allocator..Alloc$GT$::oom::hd42d7c2ab8fc0f85+22)
02-28 15:02:16.042 31663 31663 F DEBUG   :     #03 pc 018a3d83  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so (__rg_oom+26)
02-28 15:02:16.042 31663 31663 F DEBUG   :     #04 pc 01353c29  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #05 pc 01346d63  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #06 pc 0134972f  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so (_$LT$layout..inline..InlineFlow$u20$as$u20$layout..flow..Flow$GT$::assign_block_size::hfe4fa1f12102629a+4390)
02-28 15:02:16.042 31663 31663 F DEBUG   :     #07 pc 01332539  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #08 pc 013325b7  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #09 pc 013325b7  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #10 pc 013325b7  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #11 pc 0133262d  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #12 pc 0133262d  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #13 pc 013325b7  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #14 pc 013325b7  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #15 pc 013325b7  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #16 pc 013325b7  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #17 pc 013325b7  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #18 pc 013325b7  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #19 pc 013325b7  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #20 pc 012e07ff  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #21 pc 0134391b  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #22 pc 0277f529  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so (__rust_maybe_catch_panic+20)
02-28 15:02:16.042 31663 31663 F DEBUG   :     #23 pc 012fb487  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.042 31663 31663 F DEBUG   :     #24 pc 0134384b  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.043 31663 31663 F DEBUG   :     #25 pc 0277f529  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so (__rust_maybe_catch_panic+20)
02-28 15:02:16.043 31663 31663 F DEBUG   :     #26 pc 012ea759  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.043 31663 31663 F DEBUG   :     #27 pc 01ed7095  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.043 31663 31663 F DEBUG   :     #28 pc 01ed74a5  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.043 31663 31663 F DEBUG   :     #29 pc 01ed7b5f  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.043 31663 31663 F DEBUG   :     #30 pc 0277f529  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so (__rust_maybe_catch_panic+20)
02-28 15:02:16.043 31663 31663 F DEBUG   :     #31 pc 01ed4b2d  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.043 31663 31663 F DEBUG   :     #32 pc 02767f55  /data/app/com.mozilla.servo-KFiU5dJ52zHv6Xb6z_rT0A==/lib/arm/libservo.so
02-28 15:02:16.043 31663 31663 F DEBUG   :     #33 pc 00047ee7  /system/lib/libc.so (__pthread_start(void*)+22)
02-28 15:02:16.043 31663 31663 F DEBUG   :     #34 pc 0001b1d9  /system/lib/libc.so (__start_thread+32)
02-28 15:02:16.384  1933  1933 I BeaconBle: 'L' hardware scan: scan stopped, no clients
02-28 15:02:17.187   744   744 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_06
02-28 15:02:17.194   906 31665 W ActivityManager:   Force finishing activity com.mozilla.servo/.MainActivity
02-28 15:02:17.195   906   975 I BootReceiver: Copying /data/tombstones/tombstone_06 to DropBox (SYSTEM_TOMBSTONE)
02-28 15:02:17.209   696   696 E lowmemorykiller: Error writing /proc/31546/oom_score_adj; errno=22
02-28 15:02:17.222   906   946 I ActivityManager: Showing crash dialog for package com.mozilla.servo u0
@jdm
Copy link
Member Author

@jdm jdm commented Feb 28, 2018

Running ./mach run --android about:blank does not crash.

@jdm
Copy link
Member Author

@jdm jdm commented Feb 28, 2018

Interestingly, only release builds panic. Debug builds show the same pages without any issues.

@jdm jdm mentioned this issue Mar 1, 2018
@jdm
Copy link
Member Author

@jdm jdm commented Mar 8, 2018

This is from mozilla.org:

********** Crash dump: **********
Build fingerprint: 'google/sailfish/sailfish:8.1.0/OPM1.171019.016/4503492:user/release-keys'
pid: 3934, tid: 3994, name: LayoutThread Pi  >>> com.mozilla.servo <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
Stack frame #00 pc 0005e71c  /system/bin/linker (__dl_syscall+32)
Stack frame #01 pc 00019053  /system/bin/linker (__dl__ZL13resend_signalP7siginfob+54)
Stack frame #02 pc 00018eaf  /system/bin/linker (__dl__ZL24debuggerd_signal_handleriP7siginfoPv+774)
Stack frame #03 pc 00002261  /system/bin/app_process32 (art::SignalChain::Handler(int, siginfo*, void*)+220)
Stack frame #04 pc 000189a0  /system/lib/libc.so
Stack frame #05 pc 0132d67e  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::text::font_metrics_for_style::hfbabc9fe3dbc65be at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #06 pc 013170a3  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _$LT$std..thread..local..LocalKey$LT$T$GT$$GT$::with::hb9865e1f9b236245 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #07 pc 0132a4fb  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::fragment::Fragment::content_inline_metrics::inline_metrics_of_text::hb1af1c8a21a30c1f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #08 pc 0132a419  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::fragment::Fragment::content_inline_metrics::hd7339a9589574f44 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #09 pc 0132a6b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (layout::fragment::Fragment::aligned_inline_metrics::h03b8f14dfdb29f2d+22): Routine layout::fragment::Fragment::aligned_inline_metrics::h03b8f14dfdb29f2d at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #10 pc 013492fb  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (_$LT$layout..inline..InlineFlow$u20$as$u20$layout..flow..Flow$GT$::assign_block_size::hfe4fa1f12102629a+3314): Routine _$LT$layout..inline..InlineFlow$u20$as$u20$layout..flow..Flow$GT$::assign_block_size::hfe4fa1f12102629a at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #11 pc 01332539  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #12 pc 0133262d  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #13 pc 0133262d  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #14 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #15 pc 0133262d  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #16 pc 0133262d  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #17 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #18 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #19 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #20 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #21 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #22 pc 012e07ff  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h42ef15d743bf4ae3 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #23 pc 0134391b  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _ZN3std9panicking3try7do_call17he7ffc256ab2781d5E.llvm.B87D09E3 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #24 pc 0277f529  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (__rust_maybe_catch_panic+20): Routine __rust_maybe_catch_panic at /checkout/src/libpanic_unwind/lib.rs:102
Stack frame #25 pc 012fb487  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine rayon_core::registry::in_worker::heccaac516dc3b01c at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #26 pc 0134384b  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _ZN3std9panicking3try7do_call17h316a6145595d5d8fE.llvm.B87D09E3 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #27 pc 0277f529  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (__rust_maybe_catch_panic+20): Routine __rust_maybe_catch_panic at /checkout/src/libpanic_unwind/lib.rs:102
Stack frame #28 pc 012ea759  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _ZN93_$LT$rayon_core..job..StackJob$LT$L$C$$u20$F$C$$u20$R$GT$$u20$as$u20$rayon_core..job..Job$GT$7execute17h29a900180ba2068eE.llvm.B02226BC at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #29 pc 01ed7095  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine rayon_core::registry::WorkerThread::wait_until_cold::h26fdc27a7ba6e155 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #30 pc 01ed74a5  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine rayon_core::registry::main_loop::h1ce8c9703a4556d3 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #31 pc 01ed7b5f  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _ZN3std9panicking3try7do_call17h14bfc9d36743178cE.llvm.5B18BC03 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #32 pc 0277f529  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (__rust_maybe_catch_panic+20): Routine __rust_maybe_catch_panic at /checkout/src/libpanic_unwind/lib.rs:102
Stack frame #33 pc 01ed4b2d  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hd1a2d3991d461310 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #34 pc 02767f55  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _$LT$alloc..boxed..Box$LT$alloc..boxed..FnBox$LT$A$C$$u20$Output$u3d$R$GT$$u20$$u2b$$u20$$u27$a$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h55d7ff70607b3f81 at /checkout/src/liballoc/boxed.rs:798
Stack frame #35 pc 00047ee7  /system/lib/libc.so (__pthread_start(void*)+22)
Stack frame #36 pc 0001b1d9  /system/lib/libc.so (__start_thread+32)
@jdm
Copy link
Member Author

@jdm jdm commented Mar 8, 2018

And similarly from loading the default page in Servo:

********** Crash dump: **********
Build fingerprint: 'google/sailfish/sailfish:8.1.0/OPM1.171019.016/4503492:user/release-keys'
pid: 4571, tid: 4615, name: LayoutThread Pi  >>> com.mozilla.servo <<<
signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0xd87dcc92
Stack frame #00 pc 0277fc92  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (alloc_system::platform::_$LT$impl$u20$alloc..allocator..Alloc$u20$: Routine alloc_system::platform::_$LT$impl$u20$alloc..allocator..Alloc$u20$for$u20$$RF$$u27$a$u20$alloc_system..System$GT$::oom::h2ed84653f244611e at /checkout/src/liballoc_system/lib.rs:210
Stack frame #01 pc 0277fc5b  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (_$LT$alloc_system..System$u20$as$u20$alloc..allocator..Alloc$GT$::: Routine _$LT$alloc_system..System$u20$as$u20$alloc..allocator..Alloc$GT$::oom::hde3cc25712183ff5 at /checkout/src/liballoc_system/lib.rs:81
Stack frame #02 pc 018a3f89  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (_$LT$$RF$$u27$a$u20$jemallocator..Jemalloc$u20$as$u20$alloc..alloc: Routine _$LT$$RF$$u27$a$u20$jemallocator..Jemalloc$u20$as$u20$alloc..allocator..Alloc$GT$::oom::hd42d7c2ab8fc0f85 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #03 pc 018a3d83  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (__rg_oom+26): Routine __rg_oom at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #04 pc 01353c29  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _$LT$alloc..raw_vec..RawVec$LT$T$C$$u20$A$GT$$GT$::double::hac01a9c20e667aed at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #05 pc 01346d63  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::inline::LineBreaker::flush_current_line::hda31782bae5e50f8 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #06 pc 0134972f  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (_$LT$layout..inline..InlineFlow$u20$as$u20$layout..flow..Flow$GT$:: Routine _$LT$layout..inline..InlineFlow$u20$as$u20$layout..flow..Flow$GT$::assign_block_size::hfe4fa1f12102629a at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #07 pc 01332539  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #08 pc 0133262d  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #09 pc 0133262d  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #10 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #11 pc 0133262d  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #12 pc 0133262d  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #13 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #14 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #15 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #16 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #17 pc 013325b7  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine layout::parallel::top_down_flow::h0d30ca5628a8462f at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #18 pc 012e07ff  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h42ef15d743bf4ae3 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #19 pc 0134391b  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _ZN3std9panicking3try7do_call17he7ffc256ab2781d5E.llvm.B87D09E3 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #20 pc 0277f529  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (__rust_maybe_catch_panic+20): Routine __rust_maybe_catch_panic at /checkout/src/libpanic_unwind/lib.rs:102
Stack frame #21 pc 012fb487  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine rayon_core::registry::in_worker::heccaac516dc3b01c at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #22 pc 0134384b  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _ZN3std9panicking3try7do_call17h316a6145595d5d8fE.llvm.B87D09E3 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #23 pc 0277f529  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (__rust_maybe_catch_panic+20): Routine __rust_maybe_catch_panic at /checkout/src/libpanic_unwind/lib.rs:102
Stack frame #24 pc 012ea759  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _ZN93_$LT$rayon_core..job..StackJob$LT$L$C$$u20$F$C$$u20$R$GT$$u20$as$u20$rayon_core..job..Job$GT$7execute17h29a900180ba2068eE.llvm.B02226BC at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #25 pc 01ed7095  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine rayon_core::registry::WorkerThread::wait_until_cold::h26fdc27a7ba6e155 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #26 pc 01ed74a5  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine rayon_core::registry::main_loop::h1ce8c9703a4556d3 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #27 pc 01ed7b5f  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _ZN3std9panicking3try7do_call17h14bfc9d36743178cE.llvm.5B18BC03 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #28 pc 0277f529  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so (__rust_maybe_catch_panic+20): Routine __rust_maybe_catch_panic at /checkout/src/libpanic_unwind/lib.rs:102
Stack frame #29 pc 01ed4b2d  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hd1a2d3991d461310 at /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp:?
Stack frame #30 pc 02767f55  /data/app/com.mozilla.servo-IgO-xuBobsFDlwubGtgr2w==/lib/arm/libservo.so: Routine _$LT$alloc..boxed..Box$LT$alloc..boxed..FnBox$LT$A$C$$u20$Output$u3d$R$GT$$u20$$u2b$$u20$$u27$a$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h55d7ff70607b3f81 at /checkout/src/liballoc/boxed.rs:798
Stack frame #31 pc 00047ee7  /system/lib/libc.so (__pthread_start(void*)+22)
Stack frame #32 pc 0001b1d9  /system/lib/libc.so (__start_thread+32)
@jdm jdm added the I-perf-bloat label Mar 8, 2018
@mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented Mar 15, 2018

I can reproduce this on my Pixel

@mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented Mar 15, 2018

Possibly the same bug as #11642 and/or #19986.

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Mar 19, 2018

I can reproduce here as well. Looks like this: #11642 (comment)

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Mar 20, 2018

Any idea what could cause this? I'm trying to work on a ServoView for Android, and to get the scrolling performance right, I need a release build.

@jdm
Copy link
Member Author

@jdm jdm commented Mar 20, 2018

The cause is the layout algorithm attempting to split a line and getting trapped in a loop where it keeps creating endless empty lines.

@jdm
Copy link
Member Author

@jdm jdm commented Mar 21, 2018

This is a minimal testcase that reproduces the problem:

<style>
  div {
    font-size: 3em;
  }
</style>
<div>w wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww</div>
@jdm jdm added this to To do in Android MVP Mar 21, 2018
@jdm jdm moved this from To do to In progress in Android MVP Mar 21, 2018
@jdm
Copy link
Member Author

@jdm jdm commented Mar 22, 2018

There's something mysterious going on which makes me suspect a compiler bug. The difference in behaviour between desktop and mobile is that this code executes on desktop and successfully places the remainder of the fragment. On Android, that code is skipped because self.pending_line_is_empty() returns false. When I add printlns for self.pending_line around the mem::replace in reset_line, on desktop I see the expected update of self.pending_line that empties it. On android, self.pending_line does not actually change value at all.

@jdm
Copy link
Member Author

@jdm jdm commented Mar 22, 2018

Smoking gun: changing the mem::replace to a direct self.pending_line = makes the testcase load on Android.

jdm added a commit to jdm/servo that referenced this issue Mar 22, 2018
jdm added a commit to jdm/servo that referenced this issue Mar 22, 2018
bors-servo added a commit that referenced this issue Mar 22, 2018
Don't OOM when laying out basic web pages on Android

This is a workaround for the symptom described in #20149 (comment) which looks like either a standard library or compiler bug. My release android build can load all sorts of web pages as expected with this change.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20390)
<!-- Reviewable:end -->
@jdm jdm moved this from In progress to Done in Android MVP Mar 22, 2018
@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Mar 23, 2018

Looks like it's fixed.

@paulrouget paulrouget closed this Mar 23, 2018
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Mar 23, 2018
…droid (from jdm:android-layout-workaround); r=emilio

This is a workaround for the symptom described in servo/servo#20149 (comment) which looks like either a standard library or compiler bug. My release android build can load all sorts of web pages as expected with this change.

Source-Repo: https://github.com/servo/servo
Source-Revision: eaf59ca9b9dc3bf31c95555b8d43a5d476bfd7f4

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5dab5a2d32d23a490ecebebfa0708b82fc51ce10
pmocher pushed a commit to Brody-Eastwood/servo that referenced this issue Mar 30, 2018
# This is the 1st commit message:

resolved merge conflict

# This is the commit message servo#2:

getRandomValues uses ArrayBufferView now

# This is the commit message servo#3:

Workaround servo#20149 - presumed rustc bug on android.

# This is the commit message servo#4:

Update WR (accelerated webgl fix on mac, line decoration optimizations).

# This is the commit message servo#5:

build(mach): generate webrender revision via cargo lockfile
Moggers added a commit to Moggers/servo that referenced this issue Jun 13, 2018
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 2, 2019
…droid (from jdm:android-layout-workaround); r=emilio

This is a workaround for the symptom described in servo/servo#20149 (comment) which looks like either a standard library or compiler bug. My release android build can load all sorts of web pages as expected with this change.

Source-Repo: https://github.com/servo/servo
Source-Revision: eaf59ca9b9dc3bf31c95555b8d43a5d476bfd7f4

UltraBlame original commit: d9ceec63383560a74df250e12a52b1fc019b0cd0
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 2, 2019
…droid (from jdm:android-layout-workaround); r=emilio

This is a workaround for the symptom described in servo/servo#20149 (comment) which looks like either a standard library or compiler bug. My release android build can load all sorts of web pages as expected with this change.

Source-Repo: https://github.com/servo/servo
Source-Revision: eaf59ca9b9dc3bf31c95555b8d43a5d476bfd7f4

UltraBlame original commit: d9ceec63383560a74df250e12a52b1fc019b0cd0
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 2, 2019
…droid (from jdm:android-layout-workaround); r=emilio

This is a workaround for the symptom described in servo/servo#20149 (comment) which looks like either a standard library or compiler bug. My release android build can load all sorts of web pages as expected with this change.

Source-Repo: https://github.com/servo/servo
Source-Revision: eaf59ca9b9dc3bf31c95555b8d43a5d476bfd7f4

UltraBlame original commit: d9ceec63383560a74df250e12a52b1fc019b0cd0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Android MVP
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.