Skip to content

Servo panics when launched in multiprocess mode. #32570

Closed

Description

@mukilan

Describe the bug:
Panic message:

NOTE: Entering nix-shell etc/shell.nix
index out of bounds: the len is 0 but the index is 0 (thread main, at components/config/pref_util.rs:164)
   0: servoshell::backtrace::print
             at /home/mukilan/dev/servo-emulator/ports/servoshell/backtrace.rs:18:5
   1: servoshell::panic_hook::panic_hook
             at /home/mukilan/dev/servo-emulator/ports/servoshell/panic_hook.rs:38:17
   2: core::ops::function::Fn::call
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/ops/function.rs:79:5
   3: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/boxed.rs:2034:9
      std::panicking::rust_panic_with_hook
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:783:13
   4: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:657:13
   5: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/sys_common/backtrace.rs:171:18
   6: rust_begin_unwind
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:645:5
   7: core::panicking::panic_fmt
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:72:14
   8: core::panicking::panic_bounds_check
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:209:5
   9: <usize as core::slice::index::SliceIndex<[T]>>::index
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/slice/index.rs:264:10
  10: core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/slice/index.rs:18:9
      <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/vec/mod.rs:2829:9
  11: servo_config::pref_util::<impl core::convert::From<servo_config::pref_util::PrefValue> for [f64; 4]>::from
             at /home/mukilan/dev/servo-emulator/components/config/pref_util.rs:164:23
  12: <T as core::convert::Into<U>>::into
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/convert/mod.rs:759:9
  13: <servo_config::prefs::gen::PREF_ACCESSORS as core::ops::deref::Deref>::deref::__static_ref_initialize::{{closure}}
             at /home/mukilan/dev/servo-emulator/components/config/prefs.rs:176:5
  14: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/boxed.rs:2034:9
  15: servo_config::pref_util::Preferences<P>::set_inner
             at /home/mukilan/dev/servo-emulator/components/config/pref_util.rs:279:13
  16: servo_config::pref_util::Preferences<P>::set_all
             at /home/mukilan/dev/servo-emulator/components/config/pref_util.rs:301:13
  17: servo::run_content_process
             at /home/mukilan/dev/servo-emulator/components/servo/lib.rs:1192:5
  18: servoshell::desktop::cli::main
             at /home/mukilan/dev/servo-emulator/ports/servoshell/desktop/cli.rs:70:16
  19: servoshell::main
             at /home/mukilan/dev/servo-emulator/ports/servoshell/lib.rs:38:5
  20: servo::main
             at /home/mukilan/dev/servo-emulator/ports/servoshell/main.rs:26:13
  21: core::ops::function::FnOnce::call_once
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/ops/function.rs:250:5
  22: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/sys_common/backtrace.rs:155:18
  23: std::rt::lang_start::{{closure}}
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/rt.rs:166:18
  24: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/ops/function.rs:284:13
      std::panicking::try::do_call
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panic.rs:146:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/rt.rs:148:48
      std::panicking::try::do_call
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panic.rs:146:14
      std::rt::lang_start_internal
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/rt.rs:148:20
  25: std::rt::lang_start
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/rt.rs:165:17
  26: main
  27: __libc_start_call_main
  28: __libc_start_main_impl
  29: _start

To Reproduce:

  1. Launch servo in multiprocess mode e.g ./mach run --dev -M

Platform:
This happens on all platforms.

Activity

  1. added
    C-untriaged
    on Jun 20, 2024
  2. mukilan commented on Jun 20, 2024

    @mukilan
    MemberAuthor

    I'm working on a fix for the underlying panic.

  3. added 3 commits that reference this issue on Jun 20, 2024
    85096ff
    25dedc9
    b0aa4f6
  4. added
    A-multiprocess
    and removed
    C-untriaged
    on Jun 20, 2024
  5. added a commit that references this issue on Jun 20, 2024
    79c270a
  6. added a commit that references this issue on Jun 20, 2024
    ee2acae
  7. added a commit that references this issue on Jun 21, 2024
    80baff3
  8. added a commit that references this issue on Jul 22, 2024
    4ee3eec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-multiprocess

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions