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

Spurious network errors for serde -> serde_derive -> syn #2577

Closed
workingjubilee opened this issue Aug 18, 2023 · 3 comments
Closed

Spurious network errors for serde -> serde_derive -> syn #2577

workingjubilee opened this issue Aug 18, 2023 · 3 comments

Comments

@workingjubilee
Copy link

I hate to raise an issue based on what I consider to be mere speculation. However, unfortunately, "network issues" are very hard to pinpoint, so sometimes mere speculation is what we have. I have noticed that during my recent round of reviews for backtrace, which also offers serialization of a backtrace through serde, the network consistently chokes on this chain of errors:

 warning: spurious network error (1 tries remaining): [28] Timeout was reached (Operation too slow. Less than 10 bytes/sec transferred the last 30 seconds)
error: failed to get `syn` as a dependency of package `serde_derive v1.0.183`
    ... which satisfies dependency `serde_derive = "=1.0.183"` of package `serde v1.0.183`
    ... which satisfies dependency `serde = "^1.0"` of package `backtrace v0.3.69 (D:\a\backtrace-rs\backtrace-rs)`
    ... which satisfies path dependency `backtrace` of package `cpp_smoke_test v0.1.0 (D:\a\backtrace-rs\backtrace-rs\crates\cpp_smoke_test)`

It is always on this dependency chain. I have noticed random buggy network errors before, but they were always, well... fairly random. I have never noticed such a consistent error here before. Most crates are quite small after being gzipped for transfer, so I have to ask: Have you done something to significantly increase the amount of network traffic these dependencies incur?

@dtolnay
Copy link
Member

dtolnay commented Aug 18, 2023

I don't know of any relevant change from my end.

I run thousands of CI jobs per day across my various repos, with a wide range of rustc versions, and have observed this failure too.

  1. It only happens on syn. It can happen even if serde_derive is not the thing depending on syn.
  2. It only ever occurs with 1.71 and 1.70. Not 1.69 or any older release. Not 1.72-beta. Not 1.73-nightly. So I infer that it was just a cargo bug (or bug in dependency of cargo) that is already fixed.
  3. Approximately 1/600 builds are impacted (<0.2%).

So probably just disable 1.71 CI for now, or wait 6 days for the next stable Cargo release.

@workingjubilee
Copy link
Author

Fair enough. Weird!

@dtolnay
Copy link
Member

dtolnay commented Aug 21, 2023

Concrete example of a definitely non-serde occurrence just now: https://github.com/dtolnay/dtoa/actions/runs/5921067888/job/16053158600.

The entire lockfile for dtoa is as follows, with no serde in sight:

# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3

[[package]]
name = "dtoa"
version = "1.0.9"
dependencies = [
 "no-panic",
]

[[package]]
name = "no-panic"
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71a6d126424f5ce0bb4587ff4561421d44aeede520541cc66f1bb912506ae46a"
dependencies = [
 "proc-macro2",
 "quote",
 "syn",
]

[[package]]
name = "proc-macro2"
version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
dependencies = [
 "unicode-ident",
]

[[package]]
name = "quote"
version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [
 "proc-macro2",
]

[[package]]
name = "syn"
version = "2.0.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a"
dependencies = [
 "proc-macro2",
 "quote",
 "unicode-ident",
]

[[package]]
name = "unicode-ident"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"

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

No branches or pull requests

2 participants