Closed Bug 1509466 Opened 6 years ago Closed 6 years ago

cancelAnimationFrame doesn't actually cancel scheduled call

Categories

(Core :: DOM: Core & HTML, defect, P3)

63 Branch
Unspecified
All
defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: ragzovskii, Assigned: birtles)

References

()

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Steps to reproduce: Execute this code snippet in the console: var a = function(){console.log('foo');}, b = null; requestAnimationFrame(function() { cancelAnimationFrame(b); }); b = requestAnimationFrame(function () { a(); }); Actual results: I see 'foo' logged to the console Expected results: Nothing should be logged, because at the beginning of the next animation frame we cancel last scheduled call. Checked in Chrome/IE11/Edge, 2nd callback is cancelled, 'foo' is not logged. Only Firefox has this problem
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0 (20181126100057) I've tested this report on Windows 10 x64 and OS X 10.14 using the latest Nightly, Beta and Fx release builds. I was able to reproduce the mentioned behavior across all channels. When executing the provided snippet, "Foo" is logged to the console.
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Animation
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
As far as I can tell this is per-spec. The UA makes a clone of the callbacks before dispatching them as per: https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#run-the-animation-frame-callbacks As a result, calling cancelAnimationCallback from within one callback will not have any effect on the target's map of animation frame callbacks (which is emptied before the callbacks are run). This appears to be a bug in Chrome/IE11/Edge.
Status: NEW → RESOLVED
Closed: 6 years ago
Component: DOM: Animation → DOM
Resolution: --- → INVALID

I agree this is correct according to the algorithm in the spec, but I don't think that this is consistent with event dispatch or developer expectations and can lead to tricky edge cases. I think we should change the spec.

For example, event handlers for the currently dispatched event can cancel subsequent event handlers: https://jsbin.com/wiruqab/edit?html,js,output

Also developers often have raf loops where a globally accessible variable points to the current requestAnimationFrame id. e.g.

function raf(ts) {
// do some stuff
currentRafTimeout = requestAnimationFrame(raf);
}
let currentRafTimeout = requestAnimationFrame(raf)

In this model, a developer expects that cancelAnimationFrame(currentRafTimeout) will stop their raf loop, but, with the current spec algorithm they have to be careful about when they call cancelAnimationFrame or else they might not actually cancel it and it will continue running.

I'm not sure if I agree or not, but in any case I think this is probably not the right discussion forum for deciding.

Re-opening now that the spec has changed (or will very soon).

Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Priority: -- → P3

I started to have a look at this. Currently the way this works is:

I suppose one of the simplest approaches would be:

  • Have each Document maintain a HashSet of canceled frame request handles
  • In Document::CancelFrameRequestCallback if mFrameRequestCallbacks.RemoveElementSorted(aHandle) returns false, add the ID to the set
  • Clear this set in Document::TakeFrameRequestCallbacks
  • When iterating over the DocumentFrameCallbacks objects in nsRefreshDriver::RunFrameRequestCallbacks:
    • For each callback, check that its handle is not in the hashset of canceled handles for that document. If it is, skip it.
    • We could optionally tell the document to clear the hashset after iterating through all the callbacks but that's not strictly necessary.

I think the performance characteristics of that would be ok. In >99% of the cases, the hashset would be empty so we could avoid doing any hash lookup then. Furthermore, we'd only ever add something to the hashset if we canceled something while running callbacks which should also be very rare.

It also seems better than trying to reach from a Document into the nsRefreshDriver's local copy of the callbacks it wants to run.

An alternative approach would be to have Documents maintain two sets of callbacks much like Blink does: the ones we are iterating over and the ones we are appending to. That seems more complicated to me, however.

Assignee: nobody → bbirtles
Status: REOPENED → ASSIGNED

I don't see any significant perf impacts of these patches:

https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&newProject=try&newRevision=d7145514142c94d25ec9bdde5a6dd413b1b38c23

so hopefully this is ok.

As for the tests, it's probably worth adding a few more other than the single inbound WPT but I might put the first couple of patches up for review anyway.

In the next patch in this series we want to compare the handle of frame
callbacks we are about to run, with a set of canceled handles stored on the
document. This patch makes us pass the handles along with the callbacks so we
can do that.

Incidentally doing this allows us to just swap array elements when building up
the refresh driver's set of callbacks to run. That is hopefully a little more
efficient than running the implicit conversion operator on each item and then
appending to an array.

As per the following change to the HTML spec:

https://github.com/whatwg/html/commit/86b05f8a07db0627a80781cd8e92179671a28806

when running a requestAnimationFrame callback it should be possible to call
another requestAnimationFrame callback scheduled to run in the same frame by
using cancelAnimationFrame.

See issue:

https://github.com/whatwg/html/issues/4359

Depends on D20973

Pushed by bbirtles@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e1cdaf345c39 Pass frame request callbacks along with their handles to nsRefreshDriver; r=farre https://hg.mozilla.org/integration/autoland/rev/65c438efa01f Make cancelAnimationFrame cancel a pending request frame callback scheduled in the same frame; r=farre
Flags: needinfo?(bbirtles)
Pushed by bbirtles@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/de1481b9b6fa Pass frame request callbacks along with their handles to nsRefreshDriver; r=farre https://hg.mozilla.org/integration/mozilla-inbound/rev/da0f977287bd Make cancelAnimationFrame cancel a pending request frame callback scheduled in the same frame; r=farre
Depends on: 1530448

Looks like we have to wait for a new version of rust before landing this due to bug 1530448.

Flags: needinfo?(bbirtles)

The fix to update rust's LLVM has just been merged but I guess it might be another couple of months before that reaches rust stable and I can depend on it. I might try rewriting this to use nsTHashtable instead of mozilla::HashSet sometime next week instead.

I'm pretty sure that we're not going to wait until that gets to release to be able to land all the blocked patches by that bug. If nobody gets to it sooner, I'll update the aarch64 builds next week to use nightly instead.

Thanks Emilio! I was hoping you'd say that!

Component: DOM → DOM: Core & HTML

Is this still blocked? Or have the aarch64 builds been updated?

Flags: needinfo?(emilio)

Yes, this is still blocked, but progress is being made. The aarch64 update was blocked on bug 1521249, which landed this morning.

Flags: needinfo?(emilio)

I looked into landing this but part 1 (attachment 9046269 [details]) trips up on the checks added in bug 1535124.

Specifically we get the following:

layout/base/nsRefreshDriver.cpp:1695:9: error: arguments must all be strong refs or caller's parameters when calling a function marked as MOZ_CAN_RUN_SCRIPT (including the implicit object argument). 'callback.mCallback' is neither.

We have:

struct FrameRequest {
  RefPtr<FrameRequestCallback> mCallback;
  int32_t mHandle;
};

struct DocumentFrameCallbacks {
  RefPtr<Document> mDocument;
  nsTArray<Document::FrameRequest> mCallbacks;
};

nsTArray<DocumentFrameCallbacks> frameRequestCallbacks;

// Fill in |frameRequestCallbacks|

for (const DocumentFrameCallbacks& docCallbacks : frameRequestCallbacks) {
  for (auto& callback : docCallbacks.mCallbacks) {
    callback.mCallback->Call(timeStamp);
  }
}

As far as I can tell the lifetime of callback is guaranteed (it's derived from frameRequestCallbacks which is allocated on the stack and each DocumentFrameCallbacks member has it's own exclusive mCallbacks array). And the reference from callback to mCallback is a strong reference.

You can use MOZ_KnownLive and a comment with the explanation if the analysis isn't able to figure out it's safe. Presumably pointing to a bug in the analysis to improve it... But in this case it seems a bit hard to prove that mCallbacks doesn't mutate in any way (from the static analysis POV).

We should probably improve that error message to be better about describing the actual invariants we are trying to enforce and what the situation actually is (which is that the analysis can't prove that they hold). It's a little complicated to figure out what to say there, exactly...

The right thing here for now is to use MOZ_KnownLive.

Note that just being a strong reference is not enough for purposes of this analysis. It needs to be a strong reference that can't be mutated by the call, which is the hard thing to prove in this case.

Pushed by bbirtles@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d2c1801b7694 Pass frame request callbacks along with their handles to nsRefreshDriver; r=farre https://hg.mozilla.org/integration/mozilla-inbound/rev/70dd07f15ae1 Make cancelAnimationFrame cancel a pending request frame callback scheduled in the same frame; r=farre

The bindgen PR referenced from the last commit should be in central (we're using the latest version of bindgen right now). Is that an artifact of the patch being written before I upgraded bindgen?

If so, mind removing it? If not, mind filing a bindgen issue?

Thanks :)

Flags: needinfo?(bbirtles)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #26)

The bindgen PR referenced from the last commit should be in central (we're using the latest version of bindgen right now).

Excellent.

Is that an artifact of the patch being written before I upgraded bindgen?

Yes.

If so, mind removing it?

Will do.

Flags: needinfo?(bbirtles)
Pushed by bbirtles@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/9bdd75e358d1 Drop no-longer-needed additions to ServoBindings.toml; r=me

Backed out changeset 9bdd75e358d1 (Bug 1509466) for causing build bustages

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=9bdd75e358d19acb969e38572e1eeee810313104&selectedJob=238316628

Backout link: https://hg.mozilla.org/integration/mozilla-inbound/rev/59e27579af522915732bd19a18a1af6d66aef428

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=238316628&repo=mozilla-inbound&lineNumber=6037

[task 2019-04-05T04:52:50.260Z] 04:52:50 INFO - [style 0.0.1] cargo:rerun-if-changed=/builds/worker/workspace/build/src/obj-firefox/dist/include/nsISupports.h
[task 2019-04-05T04:52:50.260Z] 04:52:50 INFO - [style 0.0.1] cargo:rerun-if-changed=/builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Keyframe.h
[task 2019-04-05T04:52:50.260Z] 04:52:50 INFO - [style 0.0.1] cargo:rerun-if-changed=/builds/worker/workspace/build/src/obj-firefox/dist/include/AttrArray.h
[task 2019-04-05T04:52:50.264Z] 04:52:50 INFO - Running /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/rustc/bin/rustc --crate-name style servo/components/style/lib.rs --color never --crate-type lib --emit=dep-info,link -C opt-level=2 -C codegen-units=1 --cfg 'feature="bindgen"' --cfg 'feature="fallible"' --cfg 'feature="gecko"' --cfg 'feature="nsstring"' --cfg 'feature="regex"' --cfg 'feature="style_traits"' --cfg 'feature="toml"' --cfg 'feature="use_bindgen"' -C metadata=ec7e84e793c704af -C extra-filename=-ec7e84e793c704af --out-dir /builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps --target i686-unknown-linux-gnu -C linker=/builds/worker/workspace/build/src/build/cargo-linker -L dependency=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps -L dependency=/builds/worker/workspace/build/src/obj-firefox/release/deps --extern app_units=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libapp_units-dcc7a3ad2befc656.rlib --extern arrayvec=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libarrayvec-9558207e7f813138.rlib --extern atomic_refcell=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libatomic_refcell-8087158c951d7ba1.rlib --extern bitflags=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libbitflags-b5aca207da9e9551.rlib --extern byteorder=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libbyteorder-b9bd369880e81081.rlib --extern cssparser=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libcssparser-de651f7caeb550b6.rlib --extern derive_more=/builds/worker/workspace/build/src/obj-firefox/release/deps/libderive_more-d67aa4dca0c32f4f.so --extern euclid=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libeuclid-446df243db09f3e7.rlib --extern fallible=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libfallible-7cb2eff78ac3fc34.rlib --extern fxhash=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libfxhash-edecc5ba8b04fd2a.rlib --extern hashglobe=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libhashglobe-83c33b9a00c5c7b7.rlib --extern indexmap=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libindexmap-e592145757615ff1.rlib --extern itertools=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libitertools-69a1d3715ad1b75e.rlib --extern itoa=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libitoa-07928d09a8a73ddf.rlib --extern lazy_static=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/liblazy_static-7e3c484f6c7c382b.rlib --extern log=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/liblog-50813c9ba1e449a0.rlib --extern malloc_size_of=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libmalloc_size_of-4cf00d64a7959233.rlib --extern malloc_size_of_derive=/builds/worker/workspace/build/src/obj-firefox/release/deps/libmalloc_size_of_derive-70b21e3bd5f323ae.so --extern matches=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libmatches-6d37e364ade7679b.rlib --extern debug_unreachable=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libdebug_unreachable-6b50b46becba3e7d.rlib --extern nsstring=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libnsstring-b58f4d5b8629bd75.rlib --extern num_derive=/builds/worker/workspace/build/src/obj-firefox/release/deps/libnum_derive-b3b20dad7eeff463.so --extern num_integer=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libnum_integer-a77b5b792e06d6a7.rlib --extern num_traits=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libnum_traits-f1d64786de0a9de6.rlib --extern num_cpus=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libnum_cpus-b76f5fd663573639.rlib --extern ordered_float=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libordered_float-ebabc0de9b808add.rlib --extern owning_ref=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libowning_ref-ca841cd51f6eb21f.rlib --extern parking_lot=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libparking_lot-ee9effdd87fcbe11.rlib --extern precomputed_hash=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libprecomputed_hash-19e2f83170083835.rlib --extern rayon=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/librayon-7480ec867f736963.rlib --extern selectors=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libselectors-7bae2738ea7983d3.rlib --extern servo_arc=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libservo_arc-f13d824a28c60d68.rlib --extern smallbitvec=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libsmallbitvec-72ea70310b2db00c.rlib --extern smallvec=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libsmallvec-efc98263c7853982.rlib --extern style_derive=/builds/worker/workspace/build/src/obj-firefox/release/deps/libstyle_derive-9a6ab35ef6a55240.so --extern style_traits=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libstyle_traits-d53dcf4e40f2eb63.rlib --extern thin_slice=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libthin_slice-2e7dcf1ba43edc69.rlib --extern time=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libtime-2bba08e3be368d31.rlib --extern to_shmem=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libto_shmem-f1c866043a997295.rlib --extern to_shmem_derive=/builds/worker/workspace/build/src/obj-firefox/release/deps/libto_shmem_derive-d3726dcba3ff1a7b.so --extern uluru=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libuluru-f1cf2090e89a1738.rlib --extern unicode_bidi=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libunicode_bidi-f1a2027d4735efde.rlib --extern unicode_segmentation=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libunicode_segmentation-bf62bef791a49808.rlib --extern void=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libvoid-db3c5e4648f86144.rlib -C opt-level=2 -C debuginfo=2 -Dwarnings
[task 2019-04-05T04:52:50.264Z] 04:52:50 ERROR - error[E0605]: non-primitive cast: [u32; 2] as u64
[task 2019-04-05T04:52:50.264Z] 04:52:50 INFO - --> /builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/build/style-8cb917aaaea27055/out/gecko/structs.rs:1326:25
[task 2019-04-05T04:52:50.264Z] 04:52:50 INFO - |
[task 2019-04-05T04:52:50.264Z] 04:52:50 INFO - 1326 | mGen as u64
[task 2019-04-05T04:52:50.264Z] 04:52:50 INFO - | ^^^^^^^^^^^
[task 2019-04-05T04:52:50.264Z] 04:52:50 INFO - |
[task 2019-04-05T04:52:50.264Z] 04:52:50 INFO - = note: an as expression can only be used to convert between primitive types. Consider using the From trait
[task 2019-04-05T04:52:50.264Z] 04:52:50 ERROR - error[E0605]: non-primitive cast: [u32; 2] as u64
[task 2019-04-05T04:52:50.265Z] 04:52:50 INFO - --> /builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/build/style-8cb917aaaea27055/out/gecko/structs.rs:1331:25
[task 2019-04-05T04:52:50.265Z] 04:52:50 INFO - |
[task 2019-04-05T04:52:50.265Z] 04:52:50 INFO - 1331 | mHashShift as u64
[task 2019-04-05T04:52:50.265Z] 04:52:50 INFO - | ^^^^^^^^^^^^^^^^^
[task 2019-04-05T04:52:50.265Z] 04:52:50 INFO - |
[task 2019-04-05T04:52:50.265Z] 04:52:50 INFO - = note: an as expression can only be used to convert between primitive types. Consider using the From trait
[task 2019-04-05T04:52:50.265Z] 04:52:50 INFO - error: aborting due to 2 previous errors
[task 2019-04-05T04:52:50.265Z] 04:52:50 INFO - For more information about this error, try rustc --explain E0605.
[task 2019-04-05T04:52:50.265Z] 04:52:50 ERROR - error: Could not compile style.
[task 2019-04-05T04:52:50.265Z] 04:52:50 INFO - Caused by:
[task 2019-04-05T04:52:50.269Z] 04:52:50 INFO - process didn't exit successfully: /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/rustc/bin/rustc --crate-name style servo/components/style/lib.rs --color never --crate-type lib --emit=dep-info,link -C opt-level=2 -C codegen-units=1 --cfg 'feature="bindgen"' --cfg 'feature="fallible"' --cfg 'feature="gecko"' --cfg 'feature="nsstring"' --cfg 'feature="regex"' --cfg 'feature="style_traits"' --cfg 'feature="toml"' --cfg 'feature="use_bindgen"' -C metadata=ec7e84e793c704af -C extra-filename=-ec7e84e793c704af --out-dir /builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps --target i686-unknown-linux-gnu -C linker=/builds/worker/workspace/build/src/build/cargo-linker -L dependency=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps -L dependency=/builds/worker/workspace/build/src/obj-firefox/release/deps --extern app_units=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libapp_units-dcc7a3ad2befc656.rlib --extern arrayvec=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libarrayvec-9558207e7f813138.rlib --extern atomic_refcell=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libatomic_refcell-8087158c951d7ba1.rlib --extern bitflags=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libbitflags-b5aca207da9e9551.rlib --extern byteorder=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libbyteorder-b9bd369880e81081.rlib --extern cssparser=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libcssparser-de651f7caeb550b6.rlib --extern derive_more=/builds/worker/workspace/build/src/obj-firefox/release/deps/libderive_more-d67aa4dca0c32f4f.so --extern euclid=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libeuclid-446df243db09f3e7.rlib --extern fallible=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libfallible-7cb2eff78ac3fc34.rlib --extern fxhash=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libfxhash-edecc5ba8b04fd2a.rlib --extern hashglobe=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libhashglobe-83c33b9a00c5c7b7.rlib --extern indexmap=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libindexmap-e592145757615ff1.rlib --extern itertools=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libitertools-69a1d3715ad1b75e.rlib --extern itoa=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libitoa-07928d09a8a73ddf.rlib --extern lazy_static=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/liblazy_static-7e3c484f6c7c382b.rlib --extern log=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/liblog-50813c9ba1e449a0.rlib --extern malloc_size_of=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libmalloc_size_of-4cf00d64a7959233.rlib --extern malloc_size_of_derive=/builds/worker/workspace/build/src/obj-firefox/release/deps/libmalloc_size_of_derive-70b21e3bd5f323ae.so --extern matches=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libmatches-6d37e364ade7679b.rlib --extern debug_unreachable=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libdebug_unreachable-6b50b46becba3e7d.rlib --extern nsstring=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libnsstring-b58f4d5b8629bd75.rlib --extern num_derive=/builds/worker/workspace/build/src/obj-firefox/release/deps/libnum_derive-b3b20dad7eeff463.so --extern num_integer=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libnum_integer-a77b5b792e06d6a7.rlib --extern num_traits=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libnum_traits-f1d64786de0a9de6.rlib --extern num_cpus=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libnum_cpus-b76f5fd663573639.rlib --extern ordered_float=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libordered_float-ebabc0de9b808add.rlib --extern owning_ref=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libowning_ref-ca841cd51f6eb21f.rlib --extern parking_lot=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libparking_lot-ee9effdd87fcbe11.rlib --extern precomputed_hash=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libprecomputed_hash-19e2f83170083835.rlib --extern rayon=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/librayon-7480ec867f736963.rlib --extern selectors=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libselectors-7bae2738ea7983d3.rlib --extern servo_arc=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libservo_arc-f13d824a28c60d68.rlib --extern smallbitvec=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libsmallbitvec-72ea70310b2db00c.rlib --extern smallvec=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libsmallvec-efc98263c7853982.rlib --extern style_derive=/builds/worker/workspace/build/src/obj-firefox/release/deps/libstyle_derive-9a6ab35ef6a55240.so --extern style_traits=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libstyle_traits-d53dcf4e40f2eb63.rlib --extern thin_slice=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libthin_slice-2e7dcf1ba43edc69.rlib --extern time=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libtime-2bba08e3be368d31.rlib --extern to_shmem=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libto_shmem-f1c866043a997295.rlib --extern to_shmem_derive=/builds/worker/workspace/build/src/obj-firefox/release/deps/libto_shmem_derive-d3726dcba3ff1a7b.so --extern uluru=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libuluru-f1cf2090e89a1738.rlib --extern unicode_bidi=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libunicode_bidi-f1a2027d4735efde.rlib --extern unicode_segmentation=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libunicode_segmentation-bf62bef791a49808.rlib --extern void=/builds/worker/workspace/build/src/obj-firefox/i686-unknown-linux-gnu/release/deps/libvoid-db3c5e4648f86144.rlib -C opt-level=2 -C debuginfo=2 -Dwarnings (exit code: 1)
[task 2019-04-05T04:52:50.269Z] 04:52:50 INFO - /builds/worker/workspace/build/src/config/makefiles/rust.mk:269: recipe for target 'force-cargo-test-run' failed
[task 2019-04-05T04:52:50.269Z] 04:52:50 ERROR - make[1]: *** [force-cargo-test-run] Error 101
[task 2019-04-05T04:52:50.269Z] 04:52:50 INFO - make[1]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/toolkit/library/rust'
[task 2019-04-05T04:52:50.269Z] 04:52:50 INFO - /builds/worker/workspace/build/src/config/recurse.mk:101: recipe for target 'toolkit/library/rust/rusttests' failed
[task 2019-04-05T04:52:50.269Z] 04:52:50 INFO - make: *** [toolkit/library/rust/rusttests] Error 2
[task 2019-04-05T04:52:50.269Z] 04:52:50 INFO - 11 compiler warnings present.
[task 2019-04-05T04:52:50.318Z] 04:52:50 ERROR - Return code: 2
[task 2019-04-05T04:52:50.318Z] 04:52:50 WARNING - setting return code to 2
[task 2019-04-05T04:52:50.318Z] 04:52:50 FATAL - 'mach build -v pre-export export recurse_rusttests' did not run successfully. Please check log for errors.
[task 2019-04-05T04:52:50.318Z] 04:52:50 FATAL - Running post_fatal callback...
[task 2019-04-05T04:52:50.318Z] 04:52:50 FATAL - Exiting -1
[task 2019-04-05T04:52:50.318Z] 04:52:50 INFO - [mozharness: 2019-04-05 04:52:50.318390Z] Finished build step (failed)
[task 2019-04-05T04:52:50.318Z] 04:52:50 INFO - Running post-run listener: _parse_build_tests_ccov
[task 2019-04-05T04:52:50.318Z] 04:52:50 INFO - Running post-run listener: _shutdown_sccache
[task 2019-04-05T04:52:50.318Z] 04:52:50 INFO - Running command: ['/builds/worker/workspace/build/src/sccache2/sccache', '--stop-server'] in /builds/worker/workspace/build/src
[task 2019-04-05T04:52:50.318Z] 04:52:50 INFO - Copy/paste: /builds/worker/workspace/build/src/sccache2/sccache --stop-server
[task 2019-04-05T04:52:50.322Z] 04:52:50 INFO - Stopping sccache server...

Flags: needinfo?(bbirtles)

It turns out we still need those annotations after all. Filed a bindgen issue:

https://github.com/rust-lang/rust-bindgen/issues/1547

Flags: needinfo?(bbirtles)
Status: ASSIGNED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: