noosphere icon indicating copy to clipboard operation
noosphere copied to clipboard

Intermittent race condition in orb cli rendering

Open jsantell opened this issue 2 years ago • 8 comments

~~Windows Run~~

Linux Run (test_kubo only)

 thread 'multiplayer::orb_can_render_peers_in_the_sphere_address_book' panicked at 'assertion failed: 
tokio::fs::try_exists(&cli.sphere_directory().join(\"@peer2-renamed/@peer3-of-peer2/@peer4-of-peer3/@peer5/content5.txt\")).await?',
 rust/noosphere-cli/tests/cli.rs:419:9

Edit: moving Windows failure to https://github.com/subconsciousnetwork/noosphere/issues/579

jsantell avatar Aug 07 '23 17:08 jsantell

Cannot reasonably reproduce these locally..

jsantell avatar Aug 07 '23 18:08 jsantell

I've seen the second one a couple of times :+1: I think it's a race condition. There is a lot going on in that test behind the scenes, and I think it's possible to hit all the beats such that the name record for one of the five spheres hasn't updated in time (and so the tree doesn't get rendered the way we expect).

cdata avatar Aug 08 '23 16:08 cdata

An example of #2: https://github.com/subconsciousnetwork/noosphere/actions/runs/5790891571/job/15694746564?pr=569

FWIW I think that Windows failure is a different failure (perhaps also a flake, just a different one).

cdata avatar Aug 08 '23 17:08 cdata

Trying out a mitigation for #2 in https://github.com/subconsciousnetwork/noosphere/pull/576/commits/c6638bca8e7e95f23d4c926de44428c7d577db44#diff-a31653a454a50ff87fae739a1f7e4523d1c68c7468b5f219bc29630eb80dbe0bR368

cdata avatar Aug 08 '23 18:08 cdata

A similar error to the Windows one encountered here: https://github.com/subconsciousnetwork/noosphere/actions/runs/5800428176/job/15722516958

Which, I think, could be the same as the venerable https://github.com/subconsciousnetwork/noosphere/issues/167

cdata avatar Aug 08 '23 19:08 cdata

Moving Windows error to https://github.com/subconsciousnetwork/noosphere/issues/579, updating this for the orb CLI rendering race condition edit ah it's not just Windows..

jsantell avatar Aug 08 '23 20:08 jsantell

Caught another one: https://github.com/subconsciousnetwork/noosphere/actions/runs/6162416423/job/16723833912?pr=623

jsantell avatar Sep 12 '23 16:09 jsantell

linux nightly

2023-10-19T18:53:03.5931754Z ---- multiplayer::orb_can_render_peers_in_the_sphere_address_book stdout ---- 2023-10-19T18:53:03.5933632Z thread 'multiplayer::orb_can_render_peers_in_the_sphere_address_book' panicked at rust/noosphere/tests/distributed_stress.rs:433:9: 2023-10-19T18:53:03.5935374Z '@peer2-renamed/@peer3-of-peer2/@peer4-of-peer3/@peer5/content5.txt' should exist

jsantell avatar Oct 19 '23 19:10 jsantell