You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnmain(){// Parse the command line options and store them globallylet opts_result = opts::from_cmdline_args(&*args());
...ifletSome(token) = content_process_token {
return servo::run_content_process(token)}
...
}
so main() calls opts::from_cmdline_args which sets DEFAULT_OPTIONS, then run_content_process calls opts::set_defaults after the options have been set, and boom.
In content processes opts::from_cmdline_args doesn't actually set any opts, see this comment.
I think this regressed with #10572.
The issue is with the content process calling initiate_panic_hook() before run_content_process(). initiate_panic_hook calls opts::get() which cases opts::OPTIONS to get initialized and opts::DEFAULT_OPTIONS gets set to INVALID_OPTIONS. Then run_content_process is run and calls opts::set_defaults, causing assert!(DEFAULT_OPTIONS != INVALID_OPTIONS) to fail.
Activity
asajeffrey commentedon Apr 26, 2016
@jdm in IRC suggests a connection to #10497.
asajeffrey commentedon Apr 26, 2016
A backtrace from a debug build:
[-]Multiprocess browser.html panics[/-][+]Multiprocess panics[/+]asajeffrey commentedon Apr 26, 2016
The problem is
util::opts::set_defaults, which contains a failing assert:asajeffrey commentedon Apr 26, 2016
In fact, you don't need browser.html, just multiprocess:
asajeffrey commentedon Apr 26, 2016
Well this would be the problem...
In servo/main.rs:
in servo/lib.rs:
so
main()callsopts::from_cmdline_argswhich setsDEFAULT_OPTIONS, thenrun_content_processcallsopts::set_defaultsafter the options have been set, and boom.kaksmet commentedon Apr 26, 2016
In content processes
opts::from_cmdline_argsdoesn't actually set any opts, see this comment.I think this regressed with #10572.
The issue is with the content process calling
initiate_panic_hook()beforerun_content_process().initiate_panic_hookcallsopts::get()which casesopts::OPTIONSto get initialized andopts::DEFAULT_OPTIONSgets set toINVALID_OPTIONS. Thenrun_content_processis run and callsopts::set_defaults, causingassert!(DEFAULT_OPTIONS != INVALID_OPTIONS)to fail.asajeffrey commentedon Apr 26, 2016
@kaksmet yes, just noticed the
returnstatement, and that comment. So your theory is now winning!asajeffrey commentedon Apr 26, 2016
It looks like this is fixed by #10824, since that removes the problematic use of
opts.Auto merge of #341 - asajeffrey:add-multiprocess-tests, r=aneeshusa