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

Intermittent crash of /css-backgrounds-3_dev/html4/background-016.htm #10481

Closed
asajeffrey opened this issue Apr 8, 2016 · 5 comments
Closed

Intermittent crash of /css-backgrounds-3_dev/html4/background-016.htm #10481

asajeffrey opened this issue Apr 8, 2016 · 5 comments
Assignees

Comments

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Apr 8, 2016

  ▶ CRASH [expected PASS] /css-backgrounds-3_dev/html4/background-016.htm
  │ 
  │ Shutting down the Constellation after generating an output file or exit flag specified
  │ thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Custom(Custom { kind: NotFound, error: StringError("Bogus destination port.") }) }', ../src/libcore/result.rs:746
  │ stack backtrace:
  │    1:        0x1051072e8 - std::sys::backtrace::tracing::imp::write::h714760a4c8c0cdd8
  │    2:        0x10510af75 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hff309ab1d83ffd90
  │    3:        0x10510ab8c - std::panicking::default_hook::h08ad3bb09872855b
  │    4:        0x1050f54b8 - std::sys_common::unwind::begin_unwind_inner::h406d5f1a330b854b
  │    5:        0x1050f676e - std::sys_common::unwind::begin_unwind_fmt::h57ea3fbee1a40196
  │    6:        0x1051065b7 - rust_begin_unwind
  │    7:        0x1051329b0 - core::panicking::panic_fmt::ha6b3c19493c123b3
  │    8:        0x1047d2b0e - core::result::unwrap_failed::he41fdbb4a3e1914b
  │    9:        0x1047d277d - profile_traits::mem::ProfilerChan::send::ha3c06ebf43268c25
  │   10:        0x1041a12dc - std::sys_common::unwind::try::try_fn::h7685a677ea889c26
  │   11:        0x10510654b - __rust_try
  │   12:        0x1051064d3 - std::sys_common::unwind::inner_try::h4e97625a08807651
  │   13:        0x1041a248a - _<F as std..boxed..FnBox<A>>::call_box::h8bac8015289dad49
  │   14:        0x105109fe8 - std::sys::thread::Thread::new::thread_start::h74af400293164137
  │   15:     0x7fff86bcf059 - _pthread_body
  │   16:     0x7fff86bcefd6 - _pthread_start
  │ thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:326
  │ stack backtrace:
  │    1:        0x1051072e8 - std::sys::backtrace::tracing::imp::write::h714760a4c8c0cdd8
  │    2:        0x10510af75 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hff309ab1d83ffd90
  │    3:        0x10510ab8c - std::panicking::default_hook::h08ad3bb09872855b
  │    4:        0x1050f54b8 - std::sys_common::unwind::begin_unwind_inner::h406d5f1a330b854b
  │    5:        0x1050f676e - std::sys_common::unwind::begin_unwind_fmt::h57ea3fbee1a40196
  │    6:        0x1051065b7 - rust_begin_unwind
  │    7:        0x1051329b0 - core::panicking::panic_fmt::ha6b3c19493c123b3
  │    8:        0x105132cac - core::panicking::panic::h188c6c6a0fe5463c
  │    9:        0x103e29ff9 - script::page::Page::window::h010a05681584eec2
  │   10:        0x10419ef02 - _<script_thread..ScriptMemoryFailsafe<'a> as core..ops..Drop>::drop::h74f0f1b638973d0e
  │   11:        0x1041a21fe - std::sys_common::unwind::try::try_fn::h7685a677ea889c26
  │   12:        0x10510654b - __rust_try
  │   13:        0x1051064d3 - std::sys_common::unwind::inner_try::h4e97625a08807651
  │   14:        0x1041a248a - _<F as std..boxed..FnBox<A>>::call_box::h8bac8015289dad49
  │   15:        0x105109fe8 - std::sys::thread::Thread::new::thread_start::h74af400293164137
  │   16:     0x7fff86bcf059 - _pthread_body
  │   17:     0x7fff86bcefd6 - _pthread_start
  └ thread panicked while panicking. aborting.
@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Apr 8, 2016

Some IRC chat about this between myself (ajeffrey) and @danlrobertson (dlr): http://logs.glob.uno/?c=mozilla%23servo#c402478 including a theory http://logs.glob.uno/?c=mozilla%23servo#c402621:

  • Pipeline::exit is asynchronous: there is no ack channel,
  • so Constellation::handle_exit doen't wait for the pipelines to finish closing down before sending a ShutdownComplete message to the compositor,
  • so Compositor::finish_shutting_down might shut down the profiler before each pipeline is closed,
  • so ProfilerChan::send can end up being called by a script thread after the profiler has shut down.

This theory is compatible with the stack trace we're seeing.

@asajeffrey asajeffrey self-assigned this Apr 8, 2016
@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Apr 8, 2016

Choices for what to do about it:

a) Pipeline::exit without ack (makes profiling lossy)
b) Pipeline::exit with ack (may cause shutdown to deadlock waiting for an ack)
c) Pipeline::exit with ack but timeout (yet another source of nondeterminism)

None of these fill me with glee.

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Apr 8, 2016

Suggestion due to @metajack: normal execution is async, but we add in a sync option for the cases where we care about accurate profiling information during shutdown.

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Jun 3, 2016

This should be fixed by #11585.

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Jul 20, 2016

Not been reported for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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