Skip to content

adding interface for custom responses#10961

Merged
bors-servo merged 1 commit intoservo:masterfrom
creativcoder:custom_response_iface
May 21, 2016
Merged

adding interface for custom responses#10961
bors-servo merged 1 commit intoservo:masterfrom
creativcoder:custom_response_iface

Conversation

@creativcoder
Copy link
Copy Markdown
Contributor

@creativcoder creativcoder commented May 2, 2016

Fixes #10960


This change is Reviewable

@highfive highfive assigned ghost May 2, 2016
@highfive
Copy link
Copy Markdown

highfive commented May 2, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/script_thread.rs, components/net_traits/lib.rs, components/net_traits/lib.rs, components/net/http_loader.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 2, 2016
/// The policy and referring URL for the originator of this request
pub referrer_policy: Option<ReferrerPolicy>,
pub referrer_url: Option<Url>,
#[ignore_heap_size_of = "Defined in hyper"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hyper has HeapSizeOf support, and that RequestSource enum isn't defined in Hyper.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this was an issue i had, when i put derive HeapSizeOf attribute on RequestSource, due to the IpcSender wrapped in it. Do i have to make an impl HeapSizeOf for IpcSender ?

@ghost
Copy link
Copy Markdown

ghost commented May 2, 2016

r? @nox

@highfive highfive assigned nox and unassigned ghost May 2, 2016
@creativcoder creativcoder force-pushed the custom_response_iface branch 2 times, most recently from 81d47c2 to 579085d Compare May 2, 2016 14:03
@jdm jdm assigned jdm and unassigned nox May 2, 2016
@creativcoder creativcoder force-pushed the custom_response_iface branch from 579085d to b42b3f5 Compare May 5, 2016 15:35
@highfive
Copy link
Copy Markdown

highfive commented May 5, 2016

New code was committed to pull request.

@jdm jdm added the S-needs-rebase There are merge conflict errors. label May 5, 2016
@creativcoder creativcoder force-pushed the custom_response_iface branch from b42b3f5 to a05e864 Compare May 5, 2016 17:59
@KiChjang KiChjang removed the S-needs-rebase There are merge conflict errors. label May 5, 2016
@creativcoder
Copy link
Copy Markdown
Contributor Author

r? @jdm

@creativcoder creativcoder force-pushed the custom_response_iface branch from a05e864 to 145e8fd Compare May 11, 2016 16:47
@highfive
Copy link
Copy Markdown

New code was committed to pull request.

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels May 11, 2016
@jdm
Copy link
Copy Markdown
Member

jdm commented May 11, 2016

We should modify PendingAsyncLoad::new to accept a RequestSource argument, as well as modify XMLHttpRequest.rs's use of LoadData::new, and Window::load_url... It's probably time to make LoadData::new accept a trait object argument that can be used to obtain the request source, as well as referrer and referrer policy, and pipeline.

-S-awaiting-review +S-needs-code-changes

Previously, highfive wrote…

New code was committed to pull request.


Reviewed 8 of 8 files at r2.
Review status: all files reviewed at latest revision, 16 unresolved discussions.


components/net/http_loader.rs, line 483 [r2] (raw file):

    }

    fn custom_response(m: Metadata, response: Box<HttpResponse>) -> StreamedResponse {

We should be able to use from_http_response as far as I can tell, and that will properly support custom responses that need decoding.


components/net/http_loader.rs, line 760 [r2] (raw file):

    let (msg_sender, msg_receiver) = ipc::channel().unwrap();
    match load_data.source {
        RequestSource::Window(ref sender) => {

It looks like we can merge these two cases together.


components/net_traits/lib.rs, line 130 [r2] (raw file):

}

pub struct ReadableCustomResponse {

Let's move this into http_loader.rs, which will let us keep HttpResponse there as well. to_readable_response can be a standalone function there as well if we make the fields of CustomResponse public.


components/net_traits/lib.rs, line 155 [r2] (raw file):

#[derive(Clone, Deserialize, Serialize, HeapSizeOf)]
pub enum RequestSource {
    Window(#[ignore_heap_size_of = "Defined in Std"] CustomResponseSender),

These are define in ipc-channel instead.


components/net_traits/lib.rs, line 206 [r2] (raw file):

    }

    pub fn set_load_source(&mut self, req_src: RequestSource) {

This method probably isn't necessary since the field is public.


components/script/script_thread.rs, line 211 [r2] (raw file):

    FromImageCache(ImageCacheResult),
    FromScheduler(TimerEvent),
    FromServiceWorker(IpcSender<Option<CustomResponse>>),

This isn't a message from a service worker; it's from a network request.


components/script/script_thread.rs, line 330 [r2] (raw file):

    custom_message_chan: CustomResponseSender,

    custom_message_port: Receiver<IpcSender<Option<CustomResponse>>>,

Documentation for these would be nice.


components/script/script_thread.rs, line 1021 [r2] (raw file):

        // we may detect controlling service workers here
        // We send None as default
        msg.send(None).unwrap();

Let's use let _ msg.send(None); instead.


components/script/script_thread.rs, line 1926 [r2] (raw file):

        }

nit: remove this extra newline.


components/script/dom/window.rs, line 309 [r2] (raw file):

        self.custom_message_chan.clone()
    }

nit: remove this extra newline.


tests/unit/net/http_loader.rs, line 1674 [r2] (raw file):

        Headers::new(),
        RawStatus(200, Cow::Borrowed("Ok")),
        Vec::<u8>::new()

This should contain a real body that we verify is received.


tests/unit/net/http_loader.rs, line 1686 [r2] (raw file):

    load_data.method = Method::Get;
    let mut content_length = Headers::new();
    content_length.set(ContentLength(0));

I don't think any of the modifications here are necessary.


tests/unit/net/http_loader.rs, line 1694 [r2] (raw file):

        let _ = load(
        &load_data.clone(), &ui_provider, &http_state,
        None, &AssertMustIncludeHeadersRequestFactory {

Let's create a factory that returns a MockResponse with a 404 status instead of using AssertMustIncludeHeadersRequestFactory.


tests/unit/net/http_loader.rs, line 1698 [r2] (raw file):

            body: <[_]>::to_vec(&[])
        }, DEFAULT_USER_AGENT.to_owned(), &CancellationListener::new(None));
    });

Let's send the result of calling load on a channel, and receive it below after sending the mock response. This will allow us to assert that the response body matches the mock response we provided.


tests/unit/net/http_loader.rs, line 1705 [r2] (raw file):

#[test]
fn test_custom_response_from_window() {

We should be able to move the previous test into a function that accepts a RequestSource argument and uses it. We can then call that function for each source that we want to test without duplicating all the code.


Comments from Reviewable

@creativcoder creativcoder force-pushed the custom_response_iface branch from 145e8fd to 775605d Compare May 12, 2016 13:10
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels May 12, 2016
@highfive
Copy link
Copy Markdown

New code was committed to pull request.

@creativcoder
Copy link
Copy Markdown
Contributor Author

creativcoder commented May 12, 2016

Will be adding that trait object argument, in subsequent commit.

Previously, highfive wrote…

New code was committed to pull request.


Comments from Reviewable

@creativcoder
Copy link
Copy Markdown
Contributor Author

tests/unit/net/http_loader.rs, line 1698 [r2] (raw file):

Previously, jdm (Josh Matthews) wrote…

Let's send the result of calling load on a channel, and receive it below after sending the mock response. This will allow us to assert that the response body matches the mock response we provided.


This needed an unsafe impl Send for StreamedResponse {} in lib.rs. But this unsafe impl is only needed for the tests.


Comments from Reviewable

@creativcoder
Copy link
Copy Markdown
Contributor Author

tests/unit/net/http_loader.rs, line 1705 [r2] (raw file):

Previously, jdm (Josh Matthews) wrote…

We should be able to move the previous test into a function that accepts a RequestSource argument and uses it. We can then call that function for each source that we want to test without duplicating all the code.


I found adding an enum, to be simple, instead of returning JoinHandle from load_request_with_source


Comments from Reviewable

#![plugin(plugins)]

#![deny(unsafe_code)]
//#![deny(unsafe_code)]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, whether we use unsafe for StreamedResponse, which is required only for unit test.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not acceptable, and AFAICT not even necessary.

@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive
Copy link
Copy Markdown

  ▶ TIMEOUT [expected OK] /cors/redirect-origin.htm
  │ 
  │ thread &#39;http_loader for http://www1.web-platform.test:8000/cors/resources/cors-makeheader.py?origin=*&amp;location=http%3A%2F%2Fwww1.web-platform.test%3A8000%2Fcors%2Fresources%2Fcors-makeheader.py%3Forigin%3Dhttp%3A%2F%2Fwww1.web-platform.test%3A8000%26get_value%3Dlast%2640_1&amp;40_0&#39; panicked at &#39;could not initialize thread_rng: Too many open files (os error 24)&#39;, ../src/libstd/rand/mod.rs:159
  │ stack backtrace:
  │    1:        0x104e4dea8 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:        0x104e54335 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x104e53f4e - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x1045e2ff2 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │    5:        0x104e3bb02 - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │    6:        0x104e548f6 - std::panicking::begin_panic::h4889569716505182
  │    7:        0x104e3d3f8 - std::panicking::begin_panic_fmt::h484cd47786497f03
  │    8:        0x104e54d69 - std::rand::thread_rng::THREAD_RNG_KEY::__init::h536e3917997a1628
  │    9:        0x104e3c10c - std::rand::thread_rng::h789d00d1fce4f79b
  │   10:        0x1035d03ac - _&lt;collections..hash..map..RandomState as core..default..Default&gt;::default::ha847494db5044892
  │   11:        0x10360e304 - net::http_loader::load::h4cdeddfa5dca9e93
  │   12:        0x10360a83c - std::panicking::try::call::h7738ffab0c454f42
  │   13:        0x104e57abb - __rust_try
  │   14:        0x104e57a55 - __rust_maybe_catch_panic
  │   15:        0x10360c844 - _&lt;F as std..boxed..FnBox&lt;A&gt;&gt;::call_box::hfad4324b0bbd8499
  │   16:        0x104e53358 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   17:     0x7fff8c3c2059 - _pthread_body
  │   18:     0x7fff8c3c1fd6 - _pthread_start
  │ thread &#39;http_loader for http://www1.web-platform.test:8000/cors/resources/cors-makeheader.py?origin=*&amp;location=http%3A%2F%2Fwww2.web-platform.test%3A8000%2Fcors%2Fresources%2Fcors-makeheader.py%3Forigin%3Dhttp%3A%2F%2Fwww1.web-platform.test%3A8000%26get_value%3Dlast%2641_1&amp;41_0&#39; panicked at &#39;could not initialize thread_rng: Too many open files (os error 24)&#39;, ../src/libstd/rand/mod.rs:159
  │ stack backtrace:
  │    1:        0x104e4dea8 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:        0x104e54335 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x104e53f4e - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x1045e2ff2 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │    5:        0x104e3bb02 - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │    6:        0x104e548f6 - std::panicking::begin_panic::h4889569716505182
  │    7:        0x104e3d3f8 - std::panicking::begin_panic_fmt::h484cd47786497f03
  │    8:        0x104e54d69 - std::rand::thread_rng::THREAD_RNG_KEY::__init::h536e3917997a1628
  │    9:        0x104e3c10c - std::rand::thread_rng::h789d00d1fce4f79b
  │   10:        0x1035d03ac - _&lt;collections..hash..map..RandomState as core..default..Default&gt;::default::ha847494db5044892
  │   11:        0x10360e304 - net::http_loader::load::h4cdeddfa5dca9e93
  │   12:        0x10360a83c - std::panicking::try::call::h7738ffab0c454f42
  │   13:        0x104e57abb - __rust_try
  │   14:        0x104e57a55 - __rust_maybe_catch_panic
  │   15:        0x10360c844 - _&lt;F as std..boxed..FnBox&lt;A&gt;&gt;::call_box::hfad4324b0bbd8499
  │   16:        0x104e53358 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   17:     0x7fff8c3c2059 - _pthread_body
  └   18:     0x7fff8c3c1fd6 - _pthread_start

  ▶ Unexpected subtest result in /cors/redirect-origin.htm:
  │ TIMEOUT [expected PASS] remote (*) to remote (http://www1.web-platform.test:8000), expect to fail
  └   → Test timed out

  ▶ Unexpected subtest result in /cors/redirect-origin.htm:
  │ TIMEOUT [expected PASS] remote (*) to remote2 (http://www1.web-platform.test:8000), expect to fail
  └   → Test timed out

@nox
Copy link
Copy Markdown
Contributor

nox commented May 19, 2016

@bors-servo retry #11276

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Trying commit 7cc9a05 with merge 3026af3...

@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive
Copy link
Copy Markdown

  ▶ TIMEOUT [expected OK] /cors/redirect-origin.htm
  │ 
  │ thread &#39;http_loader for http://www1.web-platform.test:8000/cors/resources/cors-makeheader.py?origin=*&amp;location=http%3A%2F%2Fwww1.web-platform.test%3A8000%2Fcors%2Fresources%2Fcors-makeheader.py%3Forigin%3Dhttp%3A%2F%2Fwww1.web-platform.test%3A8000%26get_value%3Dlast%2640_1&amp;40_0&#39; panicked at &#39;could not initialize thread_rng: Too many open files (os error 24)&#39;, ../src/libstd/rand/mod.rs:159
  │ stack backtrace:
  │    1:        0x10c888f28 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:        0x10c88f3b5 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x10c88efce - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x10c01e072 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │    5:        0x10c876b82 - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │    6:        0x10c88f976 - std::panicking::begin_panic::h4889569716505182
  │    7:        0x10c878478 - std::panicking::begin_panic_fmt::h484cd47786497f03
  │    8:        0x10c88fde9 - std::rand::thread_rng::THREAD_RNG_KEY::__init::h536e3917997a1628
  │    9:        0x10c87718c - std::rand::thread_rng::h789d00d1fce4f79b
  │   10:        0x10b00b6bc - _&lt;collections..hash..map..RandomState as core..default..Default&gt;::default::ha847494db5044892
  │   11:        0x10b049614 - net::http_loader::load::h4cdeddfa5dca9e93
  │   12:        0x10b045b4c - std::panicking::try::call::h7738ffab0c454f42
  │   13:        0x10c892b3b - __rust_try
  │   14:        0x10c892ad5 - __rust_maybe_catch_panic
  │   15:        0x10b047b54 - _&lt;F as std..boxed..FnBox&lt;A&gt;&gt;::call_box::hfad4324b0bbd8499
  │   16:        0x10c88e3d8 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   17:     0x7fff8c3c2059 - _pthread_body
  └   18:     0x7fff8c3c1fd6 - _pthread_start

  ▶ Unexpected subtest result in /cors/redirect-origin.htm:
  │ TIMEOUT [expected PASS] remote (*) to remote (http://www1.web-platform.test:8000), expect to fail
  └   → Test timed out

@nox
Copy link
Copy Markdown
Contributor

nox commented May 19, 2016

@bors-servo retry #11276

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Trying commit 7cc9a05 with merge d27ab29...

@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive
Copy link
Copy Markdown

  ▶ TIMEOUT [expected OK] /cors/redirect-origin.htm
  │ 
  │ thread &#39;http_loader for http://www1.web-platform.test:8000/cors/resources/cors-makeheader.py?origin=http://web-platform.test:8000&amp;location=http%3A%2F%2Fwww2.web-platform.test%3A8000%2Fcors%2Fresources%2Fcors-makeheader.py%3Forigin%3Dnull%26get_value%3Dlast%2636_1&amp;36_0&#39; panicked at &#39;could not initialize thread_rng: Too many open files (os error 24)&#39;, ../src/libstd/rand/mod.rs:159
  │ stack backtrace:
  │ thread &#39;http_loader for http://www1.web-platform.test:8000/cors/resources/cors-makeheader.py?origin=http://www1.web-platform.test:8000&amp;location=http%3A%2F%2Fwww1.web-platform.test%3A8000%2Fcors%2Fresources%2Fcors-makeheader.py%3Forigin%3D*%26get_value%3Dlast%2642_1&amp;42_0&#39; panicked at &#39;could not initialize thread_rng: Too many open files (os error 24)&#39;, ../src/libstd/rand/mod.rs:159
  │    1:        0x10bc94ea8 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:        0x10bc9b335 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x10bc9af4e - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x10b429ff2 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │    5:        0x10bc82b02 - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │    6:        0x10bc9b8f6 - std::panicking::begin_panic::h4889569716505182
  │ thread &#39;http_loader for http://www1.web-platform.test:8000/cors/resources/cors-makeheader.py?ori</span><span class="stdout">gin=none&amp;location=http%3A%2F%2Fwww2.web-platform.test%3A8000%2Fcors%2Fresources%2Fcors-makeheader.py%3Forigin%3D*%26get_value%3Dlast%2639_1&amp;39_0&#39; panicked at &#39;could not initialize thread_rng: Too many open files (os error 24)&#39;, /Users/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.14/src/lib.rs:873
  │    7:        0x10bc843f8 - std::panicking::begin_panic_fmt::h484cd47786497f03
  │    8:        0x10bc9bd69 - std::rand::thread_rng::THREAD_RNG_KEY::__init::h536e3917997a1628
  │    9:        0x10bc8310c - std::rand::thread_rng::h789d00d1fce4f79b
  │   10:        0x10a4175fc - _&lt;collections..hash..map..RandomState as core..default..Default&gt;::default::ha847494db5044892
  │   11:        0x10a455554 - net::http_loader::load::h4cdeddfa5dca9e93
  │   12:        0x10a451a8c - std::panicking::try::call::h7738ffab0c454f42
  │   13:        0x10bc9eabb - __rust_try
  │   14:        0x10bc9ea55 - __rust_maybe_catch_panic
  │   15:        0x10a453a94 - _&lt;F as std..boxed..FnBox&lt;A&gt;&gt;::call_box::hfad4324b0bbd8499
  │   16:        0x10bc9a358 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   17:     0x7fff8c3c2059 - _pthread_body
  │   18:     0x7fff8c3c1fd6 - _pthread_start
  │ stack backtrace:
  │    1:        0x10bc94ea8 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:        0x10bc9b335 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x10bc9af4e - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x10b429ff2 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │    5:        0x10bc82b02 - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │    6:        0x10bc9b8f6 - std::panicking::begin_panic::h4889569716505182
  │    7:        0x10bc843f8 - std::panicking::begin_panic_fmt::h484cd47786497f03
  │    8:        0x10bc9bd69 - std::rand::thread_rng::THREAD_RNG_KEY::__init::h536e3917997a1628
  │    9:        0x10bc8310c - std::rand::thread_rng::h789d00d1fce4f79b
  │   10:        0x10a4175fc - _&lt;collections..hash..map..RandomState as core..default..Default&gt;::default::ha847494db5044892
  │   11:        0x10a455554 - net::http_loader::load::h4cdeddfa5dca9e93
  │   12:        0x10a451a8c - std::panicking::try::call::h7738ffab0c454f42
  │   13:        0x10bc9eabb - __rust_try
  │   14:        0x10bc9ea55 - __rust_maybe_catch_panic
  │   15:        0x10a453a94 - _&lt;F as std..boxed..FnBox&lt;A&gt;&gt;::call_box::hfad4324b0bbd8499
  │   16:        0x10bc9a358 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   17:     0x7fff8c3c2059 - _pthread_body
  │   18:     0x7fff8c3c1fd6 - _pthread_start
  │ stack backtrace:
  │    1:        0x10bc94ea8 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:        0x10bc9b335 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x10bc9af4e - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x10b429ff2 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │    5:        0x10bc82b02 - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │    6:        0x10bc9b8f6 - std::panicking::begin_panic::h4889569716505182
  │    7:        0x10bc843f8 - std::panicking::begin_panic_fmt::h484cd47786497f03
  │    8:        0x10bc6cdbf - rand::thread_rng::THREAD_RNG_KEY::__init::h4e1387a2e4a21393
  │    9:        0x10bc6cbfc - rand::thread_rng::he394b446ab605489
  │   10:        0x10b6762e2 - uuid::Uuid::new_v4::hc206acac9c7e580d
  │   11:        0x10a456e8d - net::http_loader::load::h4cdeddfa5dca9e93
  │   12:        0x10a451a8c - std::panicking::try::call::h7738ffab0c454f42
  │   13:        0x10bc9eabb - __rust_try
  │   14:        0x10bc9ea55 - __rust_maybe_catch_panic
  │   15:        0x10a453a94 - _&lt;F as std..boxed..FnBox&lt;A&gt;&gt;::call_box::hfad4324b0bbd8499
  │   16:        0x10bc9a358 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   17:     0x7fff8c3c2059 - _pthread_body
  └   18:     0x7fff8c3c1fd6 - _pthread_start

  ▶ Unexpected subtest result in /cors/redirect-origin.htm:
  │ TIMEOUT [expected FAIL] remote (http://web-platform.test:8000) to remote2 (null), expect origin=null
  └   → Test timed out

  ▶ Unexpected subtest result in /cors/redirect-origin.htm:
  │ TIMEOUT [expected FAIL] remote (none) to remote2 (*), expect to fail
  └   → Test timed out

  ▶ Unexpected subtest result in /cors/redirect-origin.htm:
  │ TIMEOUT [expected FAIL] remote (http://www1.web-platform.test:8000) to remote (*), expect to fail
  └   → Test timed out

@nox
Copy link
Copy Markdown
Contributor

nox commented May 19, 2016

@jdm Coincidence, or not an intermittent on this PR?

@bors-servo
Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #11270) made this pull request unmergeable. Please resolve the merge conflicts.

@jdm
Copy link
Copy Markdown
Member

jdm commented May 20, 2016

I'm assuming a string of coincidences.

@bors-servo
Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #11189) made this pull request unmergeable. Please resolve the merge conflicts.

@creativcoder
Copy link
Copy Markdown
Contributor Author

@jdm @nox can we have a retry on this ? i rebased it again.

@nox
Copy link
Copy Markdown
Contributor

nox commented May 20, 2016

@bors-servo retry

@nox
Copy link
Copy Markdown
Contributor

nox commented May 20, 2016

@bors-servo try

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Trying commit 3766cd1 with merge f5ee376...

@bors-servo
Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

@creativcoder
Copy link
Copy Markdown
Contributor Author

@jdm can we get this merged now ?

@jdm
Copy link
Copy Markdown
Member

jdm commented May 21, 2016

@bors-servo: r+

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit 3766cd1 has been approved by jdm

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 3766cd1 with merge 6c21314...

@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive
Copy link
Copy Markdown

  ▶ TIMEOUT [expected OK] /html/dom/reflection-embedded.html
  │ 
  │ thread &#39;http_loader for http://web-platform.test:8000/html/dom/test-valueOf&#39; panicked at &#39;could not initialize thread_rng: Too many open files (os error 24)&#39;, /Users/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.14/src/lib.rs:873
  │ stack backtrace:
  │    1:        0x10854cda8 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:        0x1085532f5 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x108552f0e - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x107ce1e72 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │    5:        0x10853a992 - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │    6:        0x1085538b6 - std::panicking::begin_panic::h4889569716505182
  │    7:        0x10853c288 - std::panicking::begin_panic_fmt::h484cd47786497f03
  │    8:        0x108524c4f - rand::thread_rng::THREAD_RNG_KEY::__init::h4e1387a2e4a21393
  │    9:        0x108524a8c - rand::thread_rng::he394b446ab605489
  │ thread &#39;http_loader for http://web-platform.test:8000/html/dom/test-valueOf&#39; panicked at &#39;could not initialize thread_rng: Too many open files (os error 24)&#39;, /Users/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.14/src/lib.rs:873
  │   10:        0x107f2e172 - uuid::Uuid::new_v4::hc206acac9c7e580d
  │   11:        0x106d0f8dd - net::http_loader::load::h4cdeddfa5dca9e93
  │   12:        0x106d0a4dc - std::panicking::try::call::h2f55588c0568c703
  │   13:        0x108556a7b - __rust_try
  │   14:        0x108556a15 - __rust_maybe_catch_panic
  │   15:        0x106d0c4e4 - _&lt;F as std..boxed..FnBox&lt;A&gt;&gt;::call_box::ha5012a14880088fa
  │   16:        0x108552258 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   17:     0x7fff8c3c2059 - _pthread_body
  │   18:     0x7fff8c3c1fd6 - _pthread_start
  │ stack backtrace:
  │    1:        0x10854cda8 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │ thread &#39;http_loader for http://web-platform.test:8000/html/dom/test-valueOf&#39; panicked at &#39;could not initialize thread_rng: Too many open files (os error 24)&#39;, /Users/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.14/src/lib.rs:873
  │    2:        0x1085532f5 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x108552f0e - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x107ce1e72 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │    5:        0x10853a992 - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │    6:        0x1085538b6 - std::panicking::begin_panic::h4889569716505182
  │    7:        0x10853c288 - std::panicking::begin_panic_fmt::h484cd47786497f03
  │    8:        0x108524c4f - rand::thread_rng::THREAD_RNG_KEY::__init::h4e1387a2e4a21393
  │    9:        0x108524a8c - rand::thread_rng::he394b446ab605489
  │   10:        0x107f2e172 - uuid::Uuid::new_v4::hc206acac9c7e580d
  │   11:        0x106d0f8dd - net::http_loader::load::h4cdeddfa5dca9e93
  │   12:        0x106d0a4dc - std::panicking::try::call::h2f55588c0568c703
  │   13:        0x108556a7b - __rust_try
  │   14:        0x108556a15 - __rust_maybe_catch_panic
  │   15:        0x106d0c4e4 - _&lt;F as std..boxed..FnBox&lt;A&gt;&gt;::call_box::ha5012a14880088fa
  │   16:        0x108552258 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   17:     0x7fff8c3c2059 - _pthread_body
  │   18:     0x7fff8c3c1fd6 - _pthread_start
  │ stack backtrace:
  │    1:        0x10854cda8 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:        0x1085532f5 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x108552f0e - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x107ce1e72 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │    5:        0x10853a992 - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │    6:        0x1085538b6 - std::panicking::begin_panic::h4889569716505182
  │    7:        0x10853c288 - std::panicking::begin_panic_fmt::h484cd47786497f03
  │    8:        0x108524c4f - rand::thread_rng::THREAD_RNG_KEY::__init::h4e1387a2e4a21393
  │    9:        0x108524a8c - rand::thread_rng::he394b446ab605489
  │   10:        0x107f2e172 - uuid::Uuid::new_v4::hc206acac9c7e580d
  │   11:        0x106d0f8dd - net::http_loader::load::h4cdeddfa5dca9e93
  │   12:        0x106d0a4dc - std::panicking::try::call::h2f55588c0568c703
  │   13:        0x108556a7b - __rust_try
  │   14:        0x108556a15 - __rust_maybe_catch_panic
  │   15:        0x106d0c4e4 - _&lt;F as std..boxed..FnBox&lt;A&gt;&gt;::call_box::ha5012a14880088fa
  │   16:        0x108552258 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   17:     0x7fff8c3c2059 - _pthread_body
  └   18:     0x7fff8c3c1fd6 - _pthread_start

@nox
Copy link
Copy Markdown
Contributor

nox commented May 21, 2016

@bors-servo retry #11100

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 3766cd1 with merge 1a34137...

@bors-servo
Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants