Skip to content
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

ENOENT crash when doing move clean test run #1374

Open
alienth opened this issue Oct 18, 2024 · 1 comment
Open

ENOENT crash when doing move clean test run #1374

alienth opened this issue Oct 18, 2024 · 1 comment
Labels
potential-bug A potential issue that needs confirmation and/or triage

Comments

@alienth
Copy link

alienth commented Oct 18, 2024

Paste the command

npm exec igir@latest move test clean -vvv --input-checksum-quick --dir-dat-name --dat ./dats --input 1g1r --output 1g1r

Describe the bug

When running move clean test runs, igir randomly crashes with ENOENT on files which it has moved to a new directory name.

In the case shown in the attached debug logs, the ROM was moved from the Atari - 5200 directory to the Atari - 8-bit Family directory by igir due to a name change in the DAT. In the same execution run, it subsequently attempted to stat the file in its old location, and crashed.

This seems similar to the fixed bug #367.

Expected behavior

igir should not attempt to access files in their old location after moving them.

Debug logs

[22:05:30.222] TRACE: CandidateArchiveFileHasher: Atari - 8-bit Family: Miner 2049er (USA): calculating checksums for: 1g1r/Atari - 5200/Miner 2049er Starring Bounty Bob (USA).zip     
[22:05:30.431] INFO:  CandidateWriter: Atari - 8-bit Family: Miner 2049er (USA): moving file '1g1r/Atari - 5200/Miner 2049er Starring Bounty Bob (USA).zip' (12.3KB) → '1g1r/Atari - 8-bit Family/Miner 2049er (USA).zip'     
[22:05:30.863] TRACE: CandidateGenerator: Atari - Atari 5200: Miner 2049er Starring Bounty Bob (USA): found 1 candidate     
[22:05:30.863] TRACE: CandidateGenerator: Atari - Atari 5200: Miner 2049er Starring Bounty Bob (USA) (parent): found 1 candidate     

Subsequent crash (occurred about 4 seconds later):

Error: ENOENT: no such file or directory, stat '1g1r/Atari - 5200/Miner 2049er Starring Bounty Bob (USA).zip'
    at async Object.stat (node:internal/fs/promises:1032:18) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: '1g1r/Atari - 5200/Miner 2049er Starring Bounty Bob (USA).zip'
}

DAT(s) used

No-Intro

igir version

3.0.1

Node.js version

v20.18.0

Operating system

Debian

Additional context

No response

@alienth alienth added the potential-bug A potential issue that needs confirmation and/or triage label Oct 18, 2024
@alienth
Copy link
Author

alienth commented Oct 18, 2024

There is something more nuanced to this - that particular ROM that I usually see crashes on happens to be present in two separate DATs in the main No-Intro pack, both with the same checksum. I get a reliable crash when I have igir load both of those DATs, but no crash when I only load 1 of the DATs.

Furthermore, when I attempt to narrow down to only that game, and scan no other games, the crash stops reproing. That could either be due to some actual difference in the logic, or maybe just a race condition not being hit due to less processing.

The two DATs in question are Atari - 8-bit Family (Parent-Clone) (20241010-110350).dat and Atari - Atari 5200 (Parent-Clone) (20240806-183018).dat.

I'll try to dig more later to narrow down what conditions result in this outcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential-bug A potential issue that needs confirmation and/or triage
Projects
None yet
Development

No branches or pull requests

1 participant