-
Notifications
You must be signed in to change notification settings - Fork 360
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
file-storage process hangs device #904
Comments
I suspect this is just a kernel bug. I rebuilt the device using https://github.com/marcone/teslausb/releases/tag/v3.2 and it works as expected. |
which one did you use before? |
I was able to reproduce this. First time I copied about 3GB worth of files to the CAM drive and that went OK; low CPU usage of the file-storage process, no messages in the kernel log, copy completed without error.
The file-storage process was also using most of the CPU cycles at this point. I canceled the copy on the Windows machine, but that didn't seem to work as the copy progress window just stayed opened. I haven't had a chance yet to try if it also fails like this with an official Raspberry Pi OS build. |
Same behavior with the official Raspberry Pi OS Lite 32-bit image. |
So far I've been unable to reproduce the behavior with the official Raspberry Pi OS Lite 64-bit image |
It looks to me like the problem occurs when the disk image gets near 4 GB in actual allocated size. I'm guessing the fact that it happens close to 4 GB is related to the fact that it only happens with the 32-bit image, though it's interesting that the problem doesn't appear to happen exactly at the 4 GB boundary, but slightly before. |
Unfortunately, kernel version 6.12, which is supposed to be the next stable kernel for Raspberry Pi OS, has the same problem. |
It appears that the code I suspected is wrong is not actually the cause of the problem, since fixing it doesn't make the problem go away. |
I appreciate and admire your deligance in tracking this down. I'm not sure where the best place to report would be either. |
It looks like there's already a discussion about the same/similar problem on the relevant kernel mailing list, so hopefully there will be a fix, and hopefully that fix will be backported to older affected kernels as well. |
I've sent a patch for the issue to the relevant Linux kernel mailing lists. We'll see if they take it, or if I get yelled at :) |
The patch is now in the upstream "linux-next" branch, from where it should eventually make its way into an upstream release. Note again that this is only a problem for 32-bit kernels, so for devices with a 64-bit capable CPU you can use a 64-bit OS build. For Raspberry Pi Zero W (which is 32-bit only), please continue to use the TeslaUSB prebuilt image for now. |
Turns out that questionable code I mentioned in an earlier comment is in fact also broken and can lead to a different 32-bit overflow and infinite loop. I've submitted a patch for that to upstream as well. |
Yep, had this issue too. I had what i thought was usecase 1A, i.e. raspberry zero 2w, sd card only. Worked on first try, copied files to my NAS, but only bits. Thought it might be the speed of USB. But then eventually (a lot of headache) found this thread/issue. Reinstalled using raspian 64bit and then the full script instead of of prebuilt teslausb image. Et voila. Suggestion if I may. |
I removed the prebuilt images that had the bug 2 weeks ago, so there is only one prebuilt image right now, which works. |
Describe the problem
When attempting to copy files to device the
file-storage
process hogs the CPU and soon thereafter, the usb device unexpectedly disconnects from my Mac or the vehicle.Device
Raspberry Pi Zero 2 W
OS Image
Prebuilt TeslaUSB image
Car Model
Model S
USB connection
Glove box
Logs
Script simply hangs and does not output results. Interesting output from dmesg after a file transfer to the mounted drive is initiated from laptop.
Additional information
I have tried recreating the microsd a few times but am still seeing the same issue.
The text was updated successfully, but these errors were encountered: