C8 to C2 error - Cache overloading? Needs flushing
This is from Reddit and GBATemp. Seems there are lots of reports on C8 and C2 errors after doing lots of folder browsing and general moving around for 5-10 min.
After close to an hour of tedious testing. I have come to the conclusion that after you open/view a set amount of games or folders, the system will eventually crash to a black screen, while browsing through folders, it'll freeze and force you to restart, or when entering a folder, leaving a folder, or entering a game. Upon rebooting you are greeted with a C8 error which then upon resetting again you get a C2 error splash that tells you that your console has been restored to factory settings. However this error is false seeing as all of my added games and save states (i was stressing my console, got 300 save states before I got bored) remained. I have been able to reproduce this on Hackchi 2.13B and Hackchi 2.13E. I believe it is due to the way the ram retains data throughout your session, it eventually becomes too much for the console and forces it to reboot into those 2 aforementioned errors. Not a terrible devastating bug but pretty inconvenient. I had over 600 games 30 per folder with 20 folders and another set up with 30 folders and close to 800 games.
I was wondering if this is such a weird scenario that it's not worth addressing it for a bug fix, or should some higher-up more well versed people such as Cluster look into this?
https://www.reddit.com/r/nesclassicmods/comments/5x8gj2/urgent_bug_in_need_of_fixing_c8_error_on_every/
I've ran across this error twice myself. Once on version 2.11, and again the other night on 2.13. Though they appear relatively harmless (games and save states are retained), I've been nervous that these "hard crashes" (as I heard someone refer to them as) were damaging my system in the long run.
I hadn't thought of it before, but both occasions were after a lengthy session of browsing and playing through a large number of games on my NESC. You may be right - the RAM could be overburdened after browsing through and playing so many games (which results in the crash).
I hope there is an easy (and painless) solution. Would it be possible to set the cache to clear at certain points while the system is still on, like when you transition in and out of a subfolder (keeping the RAM sourced to the 30 games and their save states displayed on that specific screen)?
I'm on 2.13e and I have exactly the same problem. I go in and out of folders. I test games after awhile, maybe 30 minutes I suddenly get a c8 error. I have to shut down the system 2 times. When I restart the system a c8 error comes on the screen followed by a c2 that says the system is restored. It actually just puts me back to my setup. It's pretty scary and I'm worried about damaging my system if this happens too often. I hope clusterm can solve this! Please!
Just checking to see if there is any update on this, or any additional input from others on this issue.
After my second "hard crash", I uninstalled Hakchi2, reverting my system back to stock (fearing the hard crashes could be potentially damaging my console's hardware in the long run). I've played it almost every day since, sometimes for an hour or more at a time, and have not experienced one C8/C2 error.
I think I'm going to leave my system stock unless I hear there is a potential workaround to the error, making Hakchi2 more stable (and potentially safer for my console), like a way of clearing the RAM's cache periodically while the system is still on.
I know some would suggest powering down the system periodically could be a band-aid fix to the problem, but without knowing at what point the RAM would become overburdened, it'll be a gamble: how much can I browse/play before the system crashes?
Seems like bug of clover. But this process kills every time. Some testing required.
rhester72 was working on this. He has tested. He said this:
OK, I officially give up on C8/C2.
I know it's not memory, you can easily see that in shell. The box stays up when you C8, with no less than 115-ish MB free in every circumstance.
Pursuit of my ulimit theory didn't pan out, either. I set these limits in /etc/init.d/S81clover-map, /bin/chmenu, and /bin/retroarch-clover just before clover-mcp starts:
ulimit -n 65536 ulimit -p 65536
and it still errored out eventually.
So if it's not RAM, it's not flash, and it's not ulimits...what is the resource that's being exhausted that leads to these da*n errors?!?
Any progress on this issue?
Actually I can't reproduce this problem :( I browsed through menu for 10 minutes without any problems :( I think that problem may be caused by some temporary files left on ramdisk.
Please test version 2.15. It clears cache on folder change.
So far, I've been unable to duplicate the error. Will post again if I experience a C8 error, but for now, it appears to be running fine, even after almost an hour of navigating through the folders while playing random games.
Cluster,
I don't think cache is the issue.
From my own notes on the C8 failures:
- It can occur while navigating between folders or starting a game
- It takes a LONG time to trigger - from power-on, if I start navving to every single folder I have, starting and exiting each game in each folder as I go, it can take upwards of an hour to occur
- Watching the system live when the problem is triggered, free memory remains at ~115MB (running only NES games, with both kachikachi and Retroarch FCEUMM) and storage is fine, so it's not running out of either one
- The number of open files continues to rise as time goes on, but I tried setting the ulimits for nofiles and processes to 64K and was still able to trigger it, so that isn't it either
- When the problem occurs, clover-kmod starts spinning a core at 100% system (i.e. kernel calls) and will never recover. This -may- be preceded by a crash of ReedPlayer-Clover, which would trigger the C8 (on crash) and C2 (on restart because of the unexpected termination)
It can be reproduced 100% of the time and observed as it is happening, but requires a LOT of patience.
I do not have a static binary of strace for this kernel and architecture so I was unable to determine precisely which kernel calls were being executed by clover-hmod at the time it started to spin.
Cluster,
I'm currently running 2.15, and last night I got the C8-C2 error for the first time. I was only browsing for a few minutes and had only opened and played a couple of games. The error occurred when I clicked on a Back folder — the system froze, I got the C8 error when I tried to switch it off, and then it rebooted with the C2 error and prompted me to select the language. (My save states remained intact.) I'm assuming the cache issue is a cumulative thing, and my past sessions of browsing and testing games has finally caught up to me. Some other data points that might be useful: I first opened an FDS game which ran in the stock emulator with no problem, then another Famicom game, and a couple of NES games that I played for just a few minutes each.
Edited to add: I only have NES and Famicom games loaded on my machine, roughly 300 of them, with the simplest organization: The original 30 on the main screen and everything else divided evenly alphabetically with max 30 games per folder.
Has this ever been solved?
@beetch18 Please make a new issue for this next time and don't respond to month old tickets, but usually you can fix that with these instructions: Backup the save files you need using Hakchi, uninstall hakchi2 using the Kernel -> Uninstall function from the application, flash OG kernel, go to the NES Classic menu and perform a factory reset, then flash custom kernel with the latest Hakchi.