openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

deleter: handle non-openpilot created files

Open alan-polk opened this issue 1 year ago • 9 comments

Describe the bug

Cruise control would not engaged, error would pop up "Process Not Running deleter"

Provide a route where the issue occurs

24574459dd7fb3e0|2023-09-29--00-06-58--0

openpilot version

https://github.com/rwxr-xr-x/openpilot/commit/ac97ef3d9162020558f5b3597823e0315fd4c715

Additional info

crashed on the previous route (24574459dd7fb3e0|2023-09-28--23-39-47--0) and still would don't work after a power cycle of the unit.

alan-polk avatar Sep 29 '23 14:09 alan-polk

CrashLogs.zip

alan-polk avatar Sep 29 '23 15:09 alan-polk

Looks like you wrote some stuff to that directory it's not designed to clean up (/data/media/0/realdata/2023-09-23.tar.gz). We'll get that fixed up so it's more robust, but it would be helpful to note that upfront.

adeebshihadeh avatar Sep 29 '23 17:09 adeebshihadeh

I had forgotten to clean that file up, but yes it would be helpful if it would delete the most recent drive data rather than flat out crashing. I have cleaned that up now. Thanks

alan-polk avatar Sep 29 '23 17:09 alan-polk

@jnewb1 can you write a good test for this then fix it up? We should test lots of combos of files/symlink/directories etc.

adeebshihadeh avatar Sep 29 '23 17:09 adeebshihadeh

Bounty is for two things:

  • a good unit test that creates lots of files and directory with different structures
  • making deleter handle any failures of the test

adeebshihadeh avatar Dec 12 '23 05:12 adeebshihadeh

Hey, I've opened a PR with a fix for this.

lspahija avatar Feb 04 '24 00:02 lspahija

@jnewb1 @adeebshihadeh mind having a look at the PR when you have a minute?

lspahija avatar Feb 07 '24 19:02 lspahija

Can someone check my attempt?

wgenh avatar Mar 16 '24 17:03 wgenh

@adeebshihadeh can you review my PR please ?

kia8112 avatar Jul 16 '24 20:07 kia8112