Skip to content

Panic: "recursive IPC channel use during serialization" in WPT reftests #8961

Closed

Description

@jdm

It's not worth filing issues for each time a test intermittently fails with this message, since the underlying cause is the same.

Activity

  1. added
    I-intermittent
    I-panic
    on Dec 13, 2015
  2. jdm commented on Dec 13, 2015

    @jdm
    MemberAuthor
    ▶ CRASH [expected PASS] /css21_dev/html4/margin-bottom-applies-to-002.htm
      │ 
      │ was ready to save, resetting ready_to_save_state
      │ Shutting down the Constellation after generating an output file or exit flag specified
      │ thread 'ScriptTask PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Custom(Custom { kind: Other, error: StringError("recursive IPC channel use during serialization") }) }', ../src/libcore/result.rs:741
      │ stack backtrace:
      │    1:        0x10358dbf8 - sys::backtrace::tracing::imp::write::hca66179add43b2e5lLt
      │    2:        0x10358fcbf - panicking::log_panic::_<closure>::closure.40842
      │    3:        0x10358f762 - panicking::log_panic::h7a04edac7e1f2797HEx
      │    4:        0x10357b606 - sys_common::unwind::begin_unwind_inner::h39a94087039ae0efnOs
      │    5:        0x10357b9ee - sys_common::unwind::begin_unwind_fmt::h7be0824d83765cd5tNs
      │    6:        0x10358d217 - rust_begin_unwind
      │    7:        0x1035b22a0 - panicking::panic_fmt::h871c0ef100fda9e9LFK
      │    8:        0x102c39587 - mem::_<impl>::send::haf009788f0ee7115Bea
      │    9:        0x10279e430 - sys_common::unwind::try::try_fn::try_fn::h6135003471651053147
      │   10:        0x10358d038 - __rust_try
      │   11:        0x10358a13e - sys_common::unwind::try::inner_try::h819d2da8e3dc4516VKs
      │   12:        0x10279f601 - boxed::_<impl>::call_box::call_box::h3509381201889269884
      │   13:        0x10358ef4d - sys::thread::_<impl>::new::thread_start::h328957c252b95d3cOYw
      │   14:     0x7fff8416a059 - _pthread_body
      │   15:     0x7fff84169fd6 - _pthread_start
      │ thread 'ScriptTask PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:367
      │ stack backtrace:
      │    1:        0x10358dbf8 - sys::backtrace::tracing::imp::write::hca66179add43b2e5lLt
      │    2:        0x10358fcbf - panicking::log_panic::_<closure>::closure.40842
      │    3:        0x10358f762 - panicking::log_panic::h7a04edac7e1f2797HEx
      │    4:        0x10357b504 - sys_common::unwind::begin_unwind_inner::h39a94087039ae0efnOs
      │    5:        0x10357b9ee - sys_common::unwind::begin_unwind_fmt::h7be0824d83765cd5tNs
      │    6:        0x10358d217 - rust_begin_unwind
      │    7:        0x1035b22a0 - panicking::panic_fmt::h871c0ef100fda9e9LFK
      │    8:        0x1035b259c - panicking::panic::hbe2e3a5159c3d178iEK
      │    9:        0x102354039 - page::_<impl>::window::h813c8df4d8dc356dTuZ
      │   10:        0x10279b504 - script_task::_<impl>::drop::h437e092b646f5d2cLH0
      │   11:        0x10279ef50 - sys_common::unwind::try::try_fn::try_fn::h6135003471651053147
      │   12:        0x10358d038 - __rust_try
      │   13:        0x10358a13e - sys_common::unwind::try::inner_try::h819d2da8e3dc4516VKs
      │   14:        0x10279f601 - boxed::_<impl>::call_box::call_box::h3509381201889269884
      │   15:        0x10358ef4d - sys::thread::_<impl>::new::thread_start::h328957c252b95d3cOYw
      │   16:     0x7fff8416a059 - _pthread_body
      │   17:     0x7fff84169fd6 - _pthread_start
      └ thread panicked while panicking. aborting.
    
  3. jdm commented on Jan 21, 2016

    @jdm
    MemberAuthor

    Most recently:

      │ thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Custom(Custom { kind: Other, error: StringError("recursive IPC channel use during serialization") }) }', ../src/libcore/result.rs:688
      │ stack backtrace:
      │    1:        0x102dfe728 - sys::backtrace::tracing::imp::write::hdd549f07f7745d62xZt
      │    2:        0x102e0091f - panicking::default_handler::_<closure>::closure.41800
      │    3:        0x102e0039f - panicking::default_handler::haa11ce011d688073GWx
      │    4:        0x102debdd4 - sys_common::unwind::begin_unwind_inner::h5fdd923b078bc2aaz2s
      │    5:        0x102dec27e - sys_common::unwind::begin_unwind_fmt::hca18532ec345b882F1s
      │    6:        0x102dfdd47 - rust_begin_unwind
      │    7:        0x102e252b0 - panicking::panic_fmt::he5f9c513e9167673LnK
      │    8:        0x10244b558 - mem::ProfilerChan::send::hd42b426c74b8c450Bea
      │    9:        0x102001543 - sys_common::unwind::try::try_fn::h1153343552381519811
      │   10:        0x102dfdb68 - __rust_try
      │   11:        0x102dfab1e - sys_common::unwind::try::inner_try::h3da6140ab038e3437Ys
      │   12:        0x102002981 - boxed::F.FnBox<A>::call_box::h13210495439727936600
      │   13:        0x102dffa3d - sys::thread::Thread::new::thread_start::hf2e9bf34aeeb6fa0acx
      │   14:     0x7fff91449059 - _pthread_body
      │   15:     0x7fff91448fd6 - _pthread_start
    

    This is interesting, because ProfilerChan is very simple:

    #[derive(Clone, Deserialize, Serialize)]
    pub struct ProfilerChan(pub IpcSender<ProfilerMsg>);

    and ProfilerMsg is:

    /// Messages that can be sent to the memory profiler thread.
    #[derive(Deserialize, Serialize)]
    pub enum ProfilerMsg {
        /// Register a Reporter with the memory profiler. The String is only used to identify the
        /// reporter so it can be unregistered later. The String must be distinct from that used by any
        /// other registered reporter otherwise a panic will occur.
        RegisterReporter(String, Reporter),
    
        /// Unregister a Reporter with the memory profiler. The String must match the name given when
        /// the reporter was registered. If the String does not match the name of a registered reporter
        /// a panic will occur.
        UnregisterReporter(String),
    
        /// Triggers printing of the memory profiling metrics.
        Print,
    
        /// Tells the memory profiler to shut down.
        Exit,
    }

    and Reporter is:

    #[derive(Deserialize, Serialize)]
    pub struct Reporter(pub IpcSender<ReporterRequest>);

    and ReporterRequest is:

    /// The protocol used to send reporter requests.
    #[derive(Deserialize, Serialize)]
    pub struct ReporterRequest {
        /// The channel on which reports are to be sent.
        pub reports_channel: ReportsChan,
    }

    and ReportsChan is:

    #[derive(Clone, Deserialize, Serialize)]
    pub struct ReportsChan(pub IpcSender<Vec<Report>>);

    and Report is:

    /// A single memory-related measurement.
    #[derive(Deserialize, Serialize)]
    pub struct Report {
        /// The identifying path for this report.
        pub path: Vec<String>,
    
        /// The report kind.
        pub kind: ReportKind,
    
        /// The size, in bytes.
        pub size: usize,
    }
  4. jdm commented on Jan 25, 2016

    @jdm
    MemberAuthor

    @pcwalton https://github.com/servo/ipc-channel/blob/130335fa2dc0e8d8048a5fae5b7b27991023a3a9/ipc.rs#L154 appears to be the only possible source of errors in that code. What are the actual possible errors that are returned but ignored?

  5. pcwalton commented on Jan 25, 2016

    @pcwalton
    Contributor

    @jdm That logic looks bogus to me. The I/O errors should be propagated up to the caller and not turned into recursive_io_error(). recursive_io_error() should only be returned when RefCell::with fails.

  6. jdm commented on Jan 25, 2016

    @jdm
    MemberAuthor
  7. pcwalton commented on Jan 25, 2016

    @pcwalton
    Contributor

    Oh, sorry, I meant the RefCell borrowing. borrow_state should be used to check this.

  8. self-assigned this
    on Jan 26, 2016
  9. added 3 commits that reference this issue on Jan 28, 2016
  10. removed their assignment
    on Mar 2, 2016
  11. jdm commented on Apr 22, 2016

    @jdm
    MemberAuthor

    This error doesn't appear any more since we refined ipc-channel's error reporting.

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

    I-intermittentI-panic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions