[BUG] Race Condition in TarUnpack when a category path is missing. #12

Closed
opened 2019-04-23 11:34:53 +00:00 by ZAdamMac · 2 comments
ZAdamMac commented 2019-04-23 11:34:53 +00:00 (Migrated from github.com)

Describe the bug
In some conditions if two child processes both detect, concurrently, that the parent directory for a category does not exist, both will attempt to create the parent and one will error out. This causes a halt as the errorred-out process never completes.

To Reproduce
Steps to reproduce the behavior:

  1. From a known-good backup, create a tapestry.cfg that is missing a category.
  2. Run --rcv
  3. Error may or may not reproduce.

Expected behavior
This error should be handled without being exposed to the user and in such a way as to not interrupt the flow of the program.

Log/Console Output
Where possible, add the output of the Logs or Console when the problem occurs.

Desktop (please complete the following information):

  • OS: Linux.

Additional context
Add any other context about the problem here.

**Describe the bug** In some conditions if two child processes both detect, concurrently, that the parent directory for a category does not exist, both will attempt to create the parent and one will error out. This causes a halt as the errorred-out process never completes. **To Reproduce** Steps to reproduce the behavior: 1. From a known-good backup, create a tapestry.cfg that is missing a category. 2. Run --rcv 3. Error may or may not reproduce. **Expected behavior** This error should be handled without being exposed to the user and in such a way as to not interrupt the flow of the program. **Log/Console Output** Where possible, add the output of the Logs or Console when the problem occurs. **Desktop (please complete the following information):** - OS: Linux. **Additional context** Add any other context about the problem here.
ZAdamMac commented 2019-04-23 11:35:53 +00:00 (Migrated from github.com)

Suggested fixes (2):

  • Move category root file creation to the parent process at runtime to fix the bug
  • Explicitly test for this condition in the runtime tests redesign.
Suggested fixes (2): - Move category root file creation to the parent process at runtime to fix the bug - Explicitly test for this condition in the runtime tests redesign.
ZAdamMac commented 2019-05-14 17:38:05 +00:00 (Migrated from github.com)

This will be closed in the 2.0.1 release and the current dev source in the "bug-fixes" branch contains a tested fix.

Slightly premature, but closing as that release will be coming out later today.

This will be closed in the 2.0.1 release and the current dev source in the "bug-fixes" branch contains a tested fix. Slightly premature, but closing as that release will be coming out later today.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zadammac/Tapestry#12
No description provided.