Skip to content

Clean up timers on receipt of a non-0x78 UDS error - #25398

Merged
sshane merged 2 commits into
commaai:masterfrom
jyoung8607:uds-timeout-fix
Aug 11, 2022
Merged

sshane merged 2 commits into
commaai:masterfrom
jyoung8607:uds-timeout-fix

Conversation

@jyoung8607

@jyoung8607 jyoung8607 commented Aug 10, 2022 •

Copy link
Copy Markdown
Collaborator

Description

The end user complaint (simplified) was that openpilot master stays in "waiting for controls to start" for almost a minute at startup. The same car works correctly on openpilot 0.8.13.1.

With #24724, the UDS fingerprinting code now handles "request received - response pending" errors by extending timeouts to wait for a successful response. However, queries can still fail at this stage.

In the case of a certain snowflake VW Polo engine ECU some 1.0 and 1.4L engine ECUs on Polo, Golf, Jetta, and Passat GTE, we can get 0x7F2278 response pending quickly followed by 0x7F2231 request out of range. When this happened, the query was marked done but the timer wasn't cleaned up, which prevented the query loop from proceeding until the 10 second timer elapsed. This happened a few times to build up the larger total delay.

This fix makes sure failed queries are always completely terminated.

Verification

The end user reports this patch fixed his problem.

Route

Before: 0bbe367c98fa1538|2022-08-10--14-28-52

After: 0bbe367c98fa1538|2022-08-12--00-11-15
0bbe367c98fa1538|2022-08-12--00-06-36
0bbe367c98fa1538|2022-08-11--23-56-30

@sshane sshane added fingerprint bugfix car vehicle-specific labels Aug 10, 2022
@jyoung8607
jyoung8607 marked this pull request as ready for review August 11, 2022 18:17
@jyoung8607

Copy link
Copy Markdown
Collaborator Author

The patch appears to work as intended, released from draft.

Comment thread selfdrive/car/isotp_parallel_query.py Resolved
@sshane
sshane merged commit 5d699a5 into commaai:master Aug 11, 2022
@jyoung8607
jyoung8607 deleted the uds-timeout-fix branch August 16, 2022 18:12
66thparallel pushed a commit to 66thparallel/janes_openpilot_fork that referenced this pull request May 1, 2026
* clean up timers on receipt of a non-0x78 UDS error

* Update selfdrive/car/isotp_parallel_query.py

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 5d699a5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants