Closed Bug 1436105 Opened 6 years ago Closed 6 years ago

build failure with rust 1.24 in automation `*mut core::ops::Fn() + 'static` cannot be shared between threads safely

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox60 fixed)

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: rillian, Assigned: ato)

References

Details

Attachments

(1 file)

Test builds with rust 1.24 beta toolchains fail pretty universally in the try pushes I've done, usually with a trait bound error in slog or something similar in another crate:

> error[E0277]: the trait bound `*mut core::ops::Fn() + 'static: core::marker::Sync` is not satisfied in `core::fmt::Arguments<'static>`
>    --> /builds/worker/workspace/build/src/third_party/rust/slog/src/ser.rs:228:6
>     |
> 228 | impl SyncSerialize for fmt::Arguments<'static> {}
>     |      ^^^^^^^^^^^^^ `*mut core::ops::Fn() + 'static` cannot be shared between threads safely
>     |
>     = help: within `core::fmt::Arguments<'static>`, the trait `core::marker::Sync` is not implemented for `*mut core::ops::Fn() + 'static`
>     = note: required because it appears within the type `core::marker::PhantomData<*mut core::ops::Fn() + 'static>`
>     = note: required because it appears within the type `core::fmt::Void`
>     = note: required because it appears within the type `&'static core::fmt::Void`
>     = note: required because it appears within the type `core::fmt::ArgumentV1<'static>`
>     = note: required because it appears within the type `[core::fmt::ArgumentV1<'static>]`
>     = note: required because it appears within the type `&'static [core::fmt::ArgumentV1<'static>]`
>     = note: required because it appears within the type `core::fmt::Arguments<'static>`
> error: aborting due to previous error
> error: Could not compile `slog`.
> Caused by:
>   process didn't exit successfully: `/builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/rustc/bin/rustc --crate-name slog /builds/worker/workspace/build/src/third_party/rust/slog/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg feature="default" --cfg feature="std" -C metadata=d5e9d36edc8d74c4 -C extra-filename=-d5e9d36edc8d74c4 --out-dir /builds/worker/workspace/build/src/obj-firefox/testing/geckodriver/./x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C linker=/builds/worker/workspace/build/src/build/cargo-linker -L dependency=/builds/worker/workspace/build/src/obj-firefox/testing/geckodriver/./x86_64-unknown-linux-gnu/debug/deps -L dependency=/builds/worker/workspace/build/src/obj-firefox/testing/geckodriver/./debug/deps --cap-lints allow -C opt-level=2 -C debuginfo=2` (exit code: 101)
> warning: build failed, waiting for other jobs to finish...

I cannot reproduce the failure in local builds, so it must be something with the automation environment or config.
Does it reproduce locally if you --enable-rust-simd?
Flags: needinfo?(giles)
Ah, I *can* reproduce by running 'cargo build' in third_party/rust/slog which is version 1.6.0. The current version is 2.1.1, which doesn't show the problem. Looks like it didn't show up in my local tests because it's a geckodriver dep. Hopefully we can just update slog.
(In reply to Nathan Froyd [:froydnj] from comment #1)
> Does it reproduce locally if you --enable-rust-simd?

That was my first thought too, but we're not so unlucky. --enable-geckodriver reproduces.
Flags: needinfo?(giles)
Andreas, I started a patch to bump slog, but geckodriver needs updating for the API changes. Do you might looking? It would be great if we could get this resolved before the Rust 1.24 stable release next week.
Flags: needinfo?(ato)
Depends on: 1436830
Thanks for the heads up, :rillian.  Since I added slog to
geckodriver I have thought it an unnecessarily complicated
dependency.  We use it only for changing the log level at runtime,
which is a requirement to geckodriver due to the moz:firefoxOptions
log level capability [1].

Instead of spending more time trying to figure out how to adapt
geckodriver to the new slog APIs I would like to remove the
dependency altogether.  I’ve filed https://bugzil.la/1436830 to
take care of this.

  [1] https://github.com/mozilla/geckodriver#log-object
Assignee: nobody → ato
Flags: needinfo?(ato)
This should now be fixed by removing the slog dependency in bug 1436830.  Happy times.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: