This PR adds backtrace demangling to background hang monitor, thereby
removing a `TODO` in the component source.
The required `rustc-demangle` crate dependency is gated behind
`#[cfg(feature = "sampler")]` as it is my understanding that the
surrounding code is only called when `sampler` is enabled.
Testing: testing was done manually - I suppose a substring match for a
known demangled string could be used for adding a proper test case, and
checking `RUSTFLAGS` to discern whether `v0` demangling should be
expected? Open to suggestions. Manual testing was done by printf
debugging (not part of the PR):
```diff
diff --git a/components/background_hang_monitor/tests/hang_monitor_tests.rs b/components/background_hang_monitor/tests/hang_monitor_tests.rs
index a35ef7bfd..1ebd7d001 100644
--- a/components/background_hang_monitor/tests/hang_monitor_tests.rs
+++ b/components/background_hang_monitor/tests/hang_monitor_tests.rs
@@ -61,6 +61,7 @@ fn test_hang_monitoring() {
// Check for a permanent hang alert.
match background_hang_monitor_receiver.recv().unwrap() {
HangMonitorAlert::Hang(HangAlert::Permanent(component_id, _annotation, _profile)) => {
+ println!("{:?}", _profile);
let expected = MonitoredComponentId(TEST_PIPELINE_ID, MonitoredComponentType::Script);
assert_eq!(expected, component_id);
},
```
here is the output of running the test cases on my Linux (pop!_OS 2024)
system with both legacy mangling (the default) and "v0":
```
❯ cargo test --features background_hang_monitor/sampler --package background_hang_monitor -- --nocapture
Compiling background_hang_monitor v0.0.1 (/tmp/aec.25_06_30_20_04_42.P8A/servo/components/background_hang_monitor)
Finished `test` profile [unoptimized + debuginfo] target(s) in 1.07s
Running tests/hang_monitor_tests.rs (/tmp/cargo/debug/deps/hang_monitor_tests-2ef5768739c27dd6)
running 6 tests
Some(HangProfile backtrace:
- <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h2649f14f1b1c150d
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/alloc/src/boxed.rs:1993
- <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb2ade58cb34e1bc4
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/alloc/src/boxed.rs:1993
- std::sys::pal::unix:🧵:Thread:🆕:thread_start::ha07e360225fa3528
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/sys/pal/unix/thread.rs:106
- core::ops::function::FnOnce::call_once{{vtable.shim}}::hfed2d99b0f690670
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
- std::panicking::try::h72c6a91b66ed940c
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:547
- std::panic::catch_unwind::h977d45286c990a5c
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:358
- std:🧵:Builder::spawn_unchecked_::{{closure}}::h3e66aedadec0e66b
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:562
- __rust_try
- std::panicking::try::do_call::h638036fc728c36b1
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:584
- <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hff781dc648b37712
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272
- std:🧵:Builder::spawn_unchecked_::{{closure}}::{{closure}}::h676d8813fe1265ec
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:564
- std::sys::backtrace::__rust_begin_short_backtrace::h3225fcf5f71669b6
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:152
- background_hang_monitor::background_hang_monitor::HangMonitorRegister::init::{{closure}}::hfdbd05eb9a4d2c1f
at /tmp/aec.25_06_30_20_04_42.P8A/servo/components/background_hang_monitor/background_hang_monitor.rs:61
- background_hang_monitor::background_hang_monitor::BackgroundHangMonitorWorker::run::h33cc7072a6114a19
at /tmp/aec.25_06_30_20_04_42.P8A/servo/components/background_hang_monitor/background_hang_monitor.rs:480
- background_hang_monitor::background_hang_monitor::BackgroundHangMonitorWorker::perform_a_hang_monitor_checkpoint::hda50a6aa6d103807
at /tmp/aec.25_06_30_20_04_42.P8A/servo/components/background_hang_monitor/background_hang_monitor.rs:562
- <background_hang_monitor::sampler_linux::LinuxSampler as background_hang_monitor::sampler::Sampler>::suspend_and_sample_thread::h0bd3d9753717c480
at /tmp/aec.25_06_30_20_04_42.P8A/servo/components/background_hang_monitor/sampler_linux.rs:172
- backtrace::backtrace::libunwind::trace::h4b1b880a458591ce
at /home/ace/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/backtrace-0.3.75/src/backtrace/libunwind.rs:117
- backtrace::backtrace::trace_unsynchronized::hfdd102bb42227ed3
at /home/ace/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/backtrace-0.3.75/src/backtrace/mod.rs:66)
test test_hang_monitoring ... ok
test test_hang_monitoring_exit_signal3 ... ok
test test_hang_monitoring_unregister ... ok
test test_hang_monitoring_exit_signal1 ... ok
test test_hang_monitoring_exit_signal4 ... ok
test test_hang_monitoring_exit_signal2 ... ok
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.14s
```
```
❯ RUSTFLAGS="-Csymbol-mangling-version=v0" cargo test --features background_hang_monitor/sampler --package background_hang_monitor -- --nocapture
Compiling background_hang_monitor v0.0.1 (/tmp/aec.25_06_30_20_04_42.P8A/servo/components/background_hang_monitor)
Finished `test` profile [unoptimized + debuginfo] target(s) in 1.64s
Running tests/hang_monitor_tests.rs (/tmp/cargo/debug/deps/hang_monitor_tests-9a8a75f69169c1ff)
running 6 tests
Some(HangProfile backtrace:
- <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h2649f14f1b1c150d
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/alloc/src/boxed.rs:1993
- <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb2ade58cb34e1bc4
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/alloc/src/boxed.rs:1993
- std::sys::pal::unix:🧵:Thread:🆕:thread_start::ha07e360225fa3528
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/sys/pal/unix/thread.rs:106
- <<std[cba35227022cdb8c]:🧵:Builder>::spawn_unchecked_<<background_hang_monitor[5f27e502ead78af0]::background_hang_monitor::HangMonitorRegister>::init::{closure#0}, ()>::{closure#1} as core[3b140760090fa97d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
- std[cba35227022cdb8c]::panicking::try::<(), core[3b140760090fa97d]::panic::unwind_safe::AssertUnwindSafe<<std[cba35227022cdb8c]:🧵:Builder>::spawn_unchecked_<<background_hang_monitor[5f27e502ead78af0]::background_hang_monitor::HangMonitorRegister>::init::{closure#0}, ()>::{closure#1}::{closure#0}>>
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:547
- std[cba35227022cdb8c]::panic::catch_unwind::<core[3b140760090fa97d]::panic::unwind_safe::AssertUnwindSafe<<std[cba35227022cdb8c]:🧵:Builder>::spawn_unchecked_<<background_hang_monitor[5f27e502ead78af0]::background_hang_monitor::HangMonitorRegister>::init::{closure#0}, ()>::{closure#1}::{closure#0}>, ()>
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:358
- <std[cba35227022cdb8c]:🧵:Builder>::spawn_unchecked_::<<background_hang_monitor[5f27e502ead78af0]::background_hang_monitor::HangMonitorRegister>::init::{closure#0}, ()>::{closure#1}
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:562
- __rust_try
- std[cba35227022cdb8c]::panicking::try::do_call::<core[3b140760090fa97d]::panic::unwind_safe::AssertUnwindSafe<<std[cba35227022cdb8c]:🧵:Builder>::spawn_unchecked_<<background_hang_monitor[5f27e502ead78af0]::background_hang_monitor::HangMonitorRegister>::init::{closure#0}, ()>::{closure#1}::{closure#0}>, ()>
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:584
- <core[3b140760090fa97d]::panic::unwind_safe::AssertUnwindSafe<<std[cba35227022cdb8c]:🧵:Builder>::spawn_unchecked_<<background_hang_monitor[5f27e502ead78af0]::background_hang_monitor::HangMonitorRegister>::init::{closure#0}, ()>::{closure#1}::{closure#0}> as core[3b140760090fa97d]::ops::function::FnOnce<()>>::call_once
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272
- <std[cba35227022cdb8c]:🧵:Builder>::spawn_unchecked_::<<background_hang_monitor[5f27e502ead78af0]::background_hang_monitor::HangMonitorRegister>::init::{closure#0}, ()>::{closure#1}::{closure#0}
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:564
- std[cba35227022cdb8c]::sys::backtrace::__rust_begin_short_backtrace::<<background_hang_monitor[5f27e502ead78af0]::background_hang_monitor::HangMonitorRegister>::init::{closure#0}, ()>
at /home/ace/.rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:152
- <background_hang_monitor[5f27e502ead78af0]::background_hang_monitor::HangMonitorRegister>::init::{closure#0}
at /tmp/aec.25_06_30_20_04_42.P8A/servo/components/background_hang_monitor/background_hang_monitor.rs:61
- <background_hang_monitor[5f27e502ead78af0]::background_hang_monitor::BackgroundHangMonitorWorker>::run
at /tmp/aec.25_06_30_20_04_42.P8A/servo/components/background_hang_monitor/background_hang_monitor.rs:480
- <background_hang_monitor[5f27e502ead78af0]::background_hang_monitor::BackgroundHangMonitorWorker>::perform_a_hang_monitor_checkpoint
at /tmp/aec.25_06_30_20_04_42.P8A/servo/components/background_hang_monitor/background_hang_monitor.rs:562
- <background_hang_monitor[5f27e502ead78af0]::sampler_linux::LinuxSampler as background_hang_monitor[5f27e502ead78af0]::sampler::Sampler>::suspend_and_sample_thread
at /tmp/aec.25_06_30_20_04_42.P8A/servo/components/background_hang_monitor/sampler_linux.rs:172
- backtrace[ecf2c71ec589035a]::backtrace::libunwind::trace
at /home/ace/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/backtrace-0.3.75/src/backtrace/libunwind.rs:117
- backtrace[ecf2c71ec589035a]::backtrace::trace_unsynchronized::<<background_hang_monitor[5f27e502ead78af0]::sampler_linux::LinuxSampler as background_hang_monitor[5f27e502ead78af0]::sampler::Sampler>::suspend_and_sample_thread::{closure#0}>
at /home/ace/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/backtrace-0.3.75/src/backtrace/mod.rs:66)
test test_hang_monitoring ... ok
test test_hang_monitoring_exit_signal1 ... ok
test test_hang_monitoring_exit_signal4 ... ok
test test_hang_monitoring_exit_signal3 ... ok
test test_hang_monitoring_exit_signal2 ... ok
test test_hang_monitoring_unregister ... ok
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.13s
```
---------
Signed-off-by: Anatol Ulrich <e+github@mail.taugt.net>
Co-authored-by: Anatol Ulrich <e+github@mail.taugt.net>
This enables `background_hang_monitor` to work on Android. Relevant
Zulip thread: [#general > Android stack walking questions @
💬](https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Android.20stack.20walking.20questions/near/526369883)
Testing: Manually tested on a Pixel 6a with Android 16 with following
page:
```html
<!DOCTYPE html>
<html>
<head>
<title>Infinite Loop Test</title>
</head>
<body>
Will it print? That is the question.
</body>
<script>
console.log("hello. you're about to loop infinitely.");
while (true) {
//do nothing, just block the thread
}
</script>
</html>
```
Fixes: #23136
---------
Signed-off-by: CarePackage17 <5157010+CarePackage17@users.noreply.github.com>
This PR removes `unwind-sys` usage from background_hang_monitor on
Linux, replacing it with the [backtrace
crate](https://crates.io/crates/backtrace).
Testing: `hang_monitor-tests.rs` still pass after the change (on Ubuntu
24.04).
Fixes: https://github.com/servo/servo/issues/35063
---------
Signed-off-by: CarePackage17 <5157010+CarePackage17@users.noreply.github.com>
* Migrate to 2024 edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Allow unsafe_op_in_unsafe_fn lint
This lint warns by default in the 2024
edition, but is *way* too noisy for servo.
We might enable it in the future, but not now.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Compile using the 2024 edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Use 2024 style edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Reformat all code
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This removes all uses of `EmbedderEvent` in the desktop servoshell to
use the new `WebView` API -- filling it out when necessary.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Delan Azabani <dazabani@igalia.com>
musl does not have libunwind readily available; even if it did, it has
no concept of ucontext (needing an external lib). Similar to ohos,
disable the background hang monitor and use the DummySampler.
Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
* ohos: redirect stdout/stderr to logging sink
Based on the existing android `redirect_stdout_to_logcat` implementation,
but using the safe abstractions from `nix` and dumping to the `log` sink,
instead of directly writing the log.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* android: Use new shared implementation for logcat redirection.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* servoshell: Register cfg(production)
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Update ports/servoshell/egl/log.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
* Change info! to debug! to match original behavior on android
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
---------
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Remove usage of lazy-static in background_hang_monitor
The lazy-static crate was only used to construct a mutex,
but since Mutex::new is const this can be done at compiletime
instead.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Remove usage of lazy-static in servoshell
Lazy-static was only used to construct a mutex, but
since Mutex::new is const this can simply be done at
compiletime.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* ohos: Fix compilation for x86_64
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: Use the SDK compiler-wrapper
When compiling for x86_64-unknown-linux-ohos without the compiler
wrapper, for some reason mozjs_sys will be refercing a wrong mangled symbol
resulting in the following error when loading the .so at runtime:
```
_ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE: symbol not found
```
This problem does not occur when compiling for aarch64 or when using the compiler wrapper.
In this case the correct symbol
`_ZNSt4__n111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE`
is referenced.
It's unclear why manually passing the flags via CFLAGS / CXXFLAGS does not work.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
---------
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
This is part of the switch from `winapi` to `windows-sys`. `windows-sys` is
maintained by Microsoft, so is more "official." More and more crates are
switching to it.
Disable some code for Windows, which is causing build warnings. When it
cannot be easily disabled (mainly for the incomplete BHM and sandbox
feature), allow dead code.
For a long time, `gfx_traits` has held a lot of things unrelated to graphics
and also unrelated to the `gfx` crate (which is mostly about fonts).
This is a cleanup which does a few things:
1. Move non `gfx` crate things out of `gfx_traits`. This is important in
order to prevent dependency cycles with a different integration between
layout, script, and fonts.
2. Rename the `msg` crate to `base`. It didn't really contain anything
to do with messages and instead mostly holds ids, which are used
across many different crates in Servo. This new crate will hold the
*rare* data types that are widely used.
Details:
- All BackgroundHangMonitor-related things from base to a new
`background_hang_monitor_api` crate.
- Moved `TraversalDirection` to `script_traits`
- Moved `Epoch`-related things from `gfx_traits` to `base`.
- Moved `PrintTree` to base. This should be widely useful in Servo.
- Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it
to `WebRenderFontApi`.
* servoshell: Upgrade `egui` and many other dependencies
This upgrades:
- `core-graphics`
- `core-text`
- `egui` and friends
- `font-kit`
- `glow` and friends
- `harfbuzz-sys`
- `jni`
- `nix`
- `raqote`
- `raw-window-handle`
- `winit`
* Downgrade jni until we can properly upgrade
* Update some test results
It's unclear why these are now passing, but they are.
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Android build
* Fixes
* More fixes
- Still failing in the linking step
* More work on getting linking working
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: use mozjs with ndk r25c. loads servo.org
more android build fixes.
* fix ./mach run for android and make it follow logs
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* add experimental logic for compositor pause/resume
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* pass DPI from android to simpleservo
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* ci: add android workflow
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* switch to ANDROID_SDK_ROOT and ANDROID_NDK_ROOT vars
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* upgrade gradle to 4.10.1
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* upgrade to gradle 5.1.1
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* upgrade to gradle 8 and agp 8
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* make compositing work again with external present
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: improve mach support for non-NixOS and CI
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* fix sampler compilation bug introduced in #30490
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* ci: add android build to main workflow
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* gradle: set MinSdk = targetSdk = 30
NDK requires we compile against the minSdk API level
which is 30 in our case.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* add instructions for android in README.md
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* apk: move servosurface to servoview
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* apk: uncomment the mediasession callbacks on MainActivity
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* apk: fix crash on MainAtivity.onDestroy
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* apk: drop VR, arm 5 and unused code
This commit drops:
* support for google, oculusvr
* support for arm5 architecture
and also removes
* fakeld scripts
* unused java code
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* cleanup shell.nix
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: add FIXMEs for gstreamer code
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* apk: remove commented code and debug logs
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* cleanup ServoView.java
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* mach: comment call to download gstreamer deps for android
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* disable bluetooth for jniapi as blurdroid is broken
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* fixup! README.md
* fixup! remove change in Cargo.toml
* fixup! move shell variables together
* fixup! cleanup jniapi/Cargo.toml comments
* delete commented gstreamer related android code
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* remove unused config variable in servbuild
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: more cleanup
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* force no_static_freetype only for android
* use actions to manage sdk, ndk and java
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* rename embedder event names to be more clear.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* link to startup crash issue
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* fix lint issues
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* upgrade env_logger to 0.10 with duplicate exception
libservo and android_logger can use env_logger 0.10
but quickcheck is still stuck on 0.8 and has not seen
any activity in the last 2 years. This commit adds
a duplicate exception until the quickcheck dependency
can be upgraded (or replaced)
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: fix comments
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* disable jemalloc on android
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* fixup! replace linux with android in cfg
---------
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
The libunwind library version installed includes an rc number. The
latest released version of the `unwind-sys` crate doesn't handle this
properly, so rely on the latest commit in the upstream repository.
This is the start of the organization of types that are in their own
crates in order to break dependency cycles between other crates. The
idea here is that putting these packages into their own directory is the
first step toward cleaning them up. They have grown organically and it
is difficult to explain to new folks where to put new shared types. Many
of these crates contain more than traits or don't contain traits at all.
Notably, `script_traits` isn't touched because it is vendored from
Gecko. Eventually this will move to `third_party`.
This will ultimately make it simpler to update crate dependencies and
reduce duplicate when specifying requirements. Generally, this change
does not touch dependencies that are only used by a single crate. We
could consider moving them to workspace dependencies in the future.
> However, as it turns out, `crossbeam-channel`'s channels don't drop
> remaining messages until all associated senders *and* receivers are
> dropped. This means the exit signal won't be delivered as long as
> there's at least one `HangMonitorRegister` or
> `BackgroundHangMonitorChan` maintaining a copy of the sender. To work
> around this and guarantee a rapid delivery of the exit signal, the
> sender is wrapped in `Arc`, and only the worker thread maintains a
> strong reference, thus ensuring both the sender and receiver are
> dropped as soon as the worker thread exits.
> There's a race condition between the reception of
> `BackgroundHangMonitorControlMsg::Exit` and `MonitoredComponentMsg::
> Register`. When the worker receives `Exit`, it stops receiving
> messages, and any remaining messages (including the
> `MonitoredComponentMsg::Register` we sent) in the channel are dropped.
> Wrapping `exit_signal` with this RAII wrapper ensures the exit signal
> is delivered even in such cases.
This should (hopefully) eliminate the intermittent hang-ups in the test
case `test_hang_monitoring_exit_signal` for good.