-
-
Notifications
You must be signed in to change notification settings - Fork 48
Add a label to timeouts for better errors #320
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
Conversation
00c050e to
0fab93e
Compare
|
netbsd failed on |
jamwaffles
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits and reorg bits, otherwise this is really good, thank you! I too get those dreaded Init: Timeout errors with no recourse but to drag Wireshark out. It will be nice to have a middle ground.
|
Don't worry about the netbsd tests. Not sure why they're failing but everything else is fine. Also I just noticed |
I think |
732e2fd to
00959df
Compare
Up to this commit, timeout errors have been inspecific about which timeout is being tripped. This can be frustrating, as timeout errors are user-facing and often require action by the user, either to adjust timeout durations or to do deeper diagnosis on the hardware. This creates better error messages by adding a label to all timeouts so that they will report which particular timeout they tripped. The other most notable change is that `crate::timer_factory::TimeoutFuture` has had it's `.duration` field added regardless of whether it's built with miri. I needed to add `TimeoutKind` to this struct no matter what and I felt it would be silly to separate it from `Duration` just for miri's sake. I've tested this on Beckhoff's EK1100, EL3104, EL4134, EL6224, EL1259, EL6751, HBM's TIM EC, and Bosch-Rexroth's VT-HMC. The latter also exercised the PDU timeouts in addition to the regular timer factory ones.
(and some minor cleanup in that file)
00959df to
91337bb
Compare
jamwaffles
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the massive delay on this. I've pushed a changelog entry commit, now verything looks good, thanks again!
Up to this commit, timeout errors have been inspecific about which timeout is being tripped. This can be frustrating, as timeout errors are user-facing and often require action by the user, either to adjust timeout durations or to do deeper diagnosis on the hardware.
This creates better error messages by adding a label to all timeouts so that they will report which particular timeout they tripped.
The other most notable change is that
crate::timer_factory::TimeoutFuturehas had it's.durationfield added regardless of whether it's built with miri. I needed to addTimeoutKindto this struct no matter what and I felt it would be silly to separate it fromDurationjust for miri's sake.I've tested this on Beckhoff's EK1100, EL3104, EL4134, EL6224, EL1259, EL6751, HBM's TIM EC, and Bosch-Rexroth's VT-HMC. The latter also exercised the PDU timeouts in addition to the regular timer factory ones.