livelock (suspected) while scanning, retroarch 1.8.8
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Description
I selected Import Content -> Scan Directory -> This directory, with This directory being the parten folder of several systems worth of ROMs.
It seems to scan fine, until it reaches a particular ROM (168 out of 691), at which point it stops progressing.
Expected behavior
It should continue scanning and show an error message if anything couldn't be scanned.
Actual behavior
It livelocks, pegging a single CPU at 100%.
Steps to reproduce the bug
It doesn't always reproduce, sadly. Which means it's also difficult to bisect. htop shows that only a single thread is consuming this:

perf top says:

Maybe that's enough for debugging what's going on. perf annotate didn't tell me much as I had not compiled retroarch with debugging information like source code (maybe that should be the default, in Cmake parlance this would be called REL_WITH_DEBUG AFAIK). Any way how I can force that with the libretro-super build scripts?
The large amount of time spent in locking primitives implies that it's busy looping (as well as the fact that it's just not finishing, despite it having finished an hours earlier without a hickup).
Bisect Results
Version/Commit
You can find this information under Information/System Information
- RetroArch: 1.8.8 (85d60bac8f)
Environment information
- OS: Linux (Debian Bullseye), kernel 5.6
- Compiler: GCC 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with RetroArch’s Import Content → Scan Directory path and the perf output described in the report; reproduce against the large ROM directory if possible, ideally with a debug build. Done means the scan continues past problematic content or reports an error instead of consuming a CPU indefinitely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100