Skip to content

[BUG] - "EBUSY: resource busy or locked" when importing code #1535

Description

@Dullstar

Attempting to import a code (regardless of new profile/update existing profile) can sometimes cause an EBUSY error. The path appears to be a temporary file that is only used for importing codes and is deleted by the time the user sees the error message. There is some, but not full consistency to which mod will cause the issue; my current working hypothesis is that the mods aren't always processed in the same order so the mod shown in the error will be whichever one gets processed first.
The following code is an example of a code for Lethal Company that was affected: 01930992-3fb0-9787-bcd4-3d09cdbe4839

It doesn't seem to affect all players, but I believe some of the players may be using Thunderstore and since the issue affects importing codes, the person generating the code is not affected, so I don't know 100% if anyone else tried to import it using r2modman specifically (at least I am told the codes are compatible with both).

I did not notice any obvious evidence of another program attempting to access the file and the issue persisted after a restart. Clearing r2modman-related files from AppData does not seem to fix the issue.

It only happens when importing a code, but I don't know what predicts if a code will be affected (though a mod that fails in one code appears to have an increased likelihood of failing in another code -- I do not know if it will occur on all codes that contain an affected mod). If a new code that has had the offending mods removed is obtained, the affected mods can successfully be downloaded after the import is complete.

Because the mods can be manually downloaded, it would probably at least help if there was the option to import as much of the code as possible and then manually fix the mods that fail due to this error.

Best guess: is there some sort of data race happening during the import process?

Screenshots
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugMinor issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions