Atmosphere-NX / Atmosphere

Atmosphère is a work-in-progress customized firmware for the Nintendo Switch.
GNU General Public License v2.0
14.43k stars 1.22k forks source link

Atmosphere enters a crash loop when there are too many erpt reports #1765

Closed KevinX8 closed 2 years ago

KevinX8 commented 2 years ago

Bug Report

What's the issue you encountered?

My atmosphere\erpt_reports folder contained 16383 reports just from normal usage over a few years and my switch would constantly crash on boot with error 2002-0039.
I made no changes to atmosphere.

How can the issue be reproduced?

Use the switch normally for about 2 years or just fill the erpt_reports folder with as many reports as you can until you get into the crash loop.

Crash Report

I deleted the crash reports in order to be able to boot my system again.

System Firmware Version

13.2.0

Environment?

Additional context?

SciresM commented 2 years ago

Yeah this isn't really an atmosphere bug, but delete your reports.

SciresM commented 2 years ago

(this is a FAT filesystem limitation)

KevinX8 commented 2 years ago

seeing as exFAT is not recommended to be used for homebrew would it not make more sense for atmosphere to automatically delete reports when there are too many of them instead of just crashing?

SciresM commented 2 years ago

This has nothing to do with exFAT, and "delete" if the folder is in that state, accessing it gives an error, we can't delete from that state.

SciresM commented 2 years ago

Some erpt report cleanup can be considered, for sure, but in the meantime "just delete your reports".

KevinX8 commented 2 years ago

yes, I have deleted them, which means it is possible to delete the reports, from some brief research online the max files fat32 can have in a folder is around 65k, which 16k is nowhere near that, and also atmos could wipe the reports let's say 1k reports before the crash loop begins no so that the access problem is not a thing?

SciresM commented 2 years ago

"accessing gives it an error" -> using the switch's FS driver :P

KevinX8 commented 2 years ago

"accessing gives it an error" -> using the switch's FS driver :P

I understand the switch could be incapable of deleting it when the problem already began yes, which is why I suggested a preventive measure and deleting the logs when you're around 10% away from the bug occurring

SciresM commented 2 years ago

Some erpt report cleanup can be considered, for sure, but in the meantime "just delete your reports".

KevinX8 commented 1 year ago

I see the issue has now been fixed 🎉 https://github.com/Atmosphere-NX/Atmosphere/commit/04c9004e05facdf83ea0a351a215f761f51b9c43#diff-1a54fc072e431096621f53026a5aa1e8466e06c52f4b49cb286a1c0978b22648R100

SciresM commented 1 year ago

Does the above actually resolve your error?

KevinX8 commented 1 year ago

I would guess so yes, I would have to accumulate the amount of logs needed to cause the crash to test this functionality which would take an extremely long time