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

term_to_binary/1 and binary_to_term/1 cannot round trip always #377

Open
KronicDeth opened this issue Jan 10, 2020 · 1 comment
Open

term_to_binary/1 and binary_to_term/1 cannot round trip always #377

KronicDeth opened this issue Jan 10, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@KronicDeth
Copy link
Collaborator

As seen in https://cirrus-ci.com/task/5041448550662144 and other test runs, otp::erlang::term_to_binary_1::test::roundtrips_through_binary_to_term sometimes fails. For this specific failure it was shrunk to

thread 'otp::erlang::term_to_binary_1::test::roundtrips_through_binary_to_term' panicked at 'called `Result::unwrap()` on an `Err` value: Fail(Reason("assertion failed: `(left == right)` \n  left: `Ok(Box(0x7f66849fa090, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::tuple::Tuple>(Tuple(Term(#PID<0.15629.8176>), Box(0x7f66849fa078, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::pid::ExternalPid>(ExternalPid { header: Header<liblumen_alloc::erts::term::pid::ExternalPid>(0b111000000000000000000000000000000000000000000000010), arc_node: Node { id: 2752935265332143140, name: Mutex { data: Cell { value: :\"@external\" } }, creation: 1363588961 }, pid: Pid(220293369) } at 0x7f66849fa078)))) at 0x7f66849fa090))))`,\n right: `Ok(Box(0x7f66849fa018, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::tuple::Tuple>(Tuple(Term(#PID<0.15629.8176>), Box(0x7f66849fa000, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::pid::ExternalPid>(ExternalPid { header: Header<liblumen_alloc::erts::term::pid::ExternalPid>(0b111000000000000000000000000000000000000000000000010), arc_node: Node { id: 8102711248322546474, name: Mutex { data: Cell { value: :\"@external\" } }, creation: 3801472872 }, pid: Pid(220293369) } at 0x7f66849fa000)))) at 0x7f66849fa018))))` at lumen_runtime/src/otp/erlang/term_to_binary_1/test.rs:25"), (Pid(263518), Box(0x7f66849fa1e8, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::tuple::Tuple>(Tuple(Term(#PID<0.15629.8176>), Box(0x7f66849fa1d0, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::pid::ExternalPid>(ExternalPid { header: Header<liblumen_alloc::erts::term::pid::ExternalPid>(0b111000000000000000000000000000000000000000000000010), arc_node: Node { id: 8102711248322546474, name: Mutex { data: Cell { value: :"@external" } }, creation: 3801472872 }, pid: Pid(220293369) } at 0x7f66849fa1d0)))) at 0x7f66849fa1e8)))))', src/libcore/result.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Reformatting for clarity:

assertion failed: `(left == right)`

left:

Ok(Box(0x7f66849fa090, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::tuple::Tuple>(Tuple(Term(#PID<0.15629.8176>), Box(0x7f66849fa078, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::pid::ExternalPid>(ExternalPid { header: Header<liblumen_alloc::erts::term::pid::ExternalPid>(0b111000000000000000000000000000000000000000000000010), arc_node: Node { id: 2752935265332143140, name: Mutex { data: Cell { value: :\"@external\" } }, creation: 1363588961 }, pid: Pid(220293369) } at 0x7f66849fa078)))) at 0x7f66849fa090))))

right:

Ok(Box(0x7f66849fa018, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::tuple::Tuple>(Tuple(Term(#PID<0.15629.8176>), Box(0x7f66849fa000, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::pid::ExternalPid>(ExternalPid { header: Header<liblumen_alloc::erts::term::pid::ExternalPid>(0b111000000000000000000000000000000000000000000000010), arc_node: Node { id: 8102711248322546474, name: Mutex { data: Cell { value: :\"@external\" } }, creation: 3801472872 }, pid: Pid(220293369) } at 0x7f66849fa000)))) at 0x7f66849fa018))))` at lumen_runtime/src/otp/erlang/term_to_binary_1/test.rs:25"), (Pid(263518), Box(0x7f66849fa1e8, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::tuple::Tuple>(Tuple(Term(#PID<0.15629.8176>), Box(0x7f66849fa1d0, literal=false, value=Term(Boxed<liblumen_alloc::erts::term::pid::ExternalPid>(ExternalPid { header: Header<liblumen_alloc::erts::term::pid::ExternalPid>(0b111000000000000000000000000000000000000000000000010), arc_node: Node { id: 8102711248322546474, name: Mutex { data: Cell { value: :"@external" } }, creation: 3801472872 }, pid: Pid(220293369) } at 0x7f66849fa1d0)))) at 0x7f66849fa1e8)))))
@KronicDeth KronicDeth added the bug Something isn't working label Jan 10, 2020
@KronicDeth KronicDeth added this to the In 2020 milestone Jan 15, 2020
@KronicDeth
Copy link
Collaborator Author

@bcardarella bcardarella modified the milestones: In 2020, In 2021 Dec 9, 2020
@bitwalker bitwalker removed this from the In 2021 milestone Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants