Fix Multiple GNUton Mount Points#577
Open
ExtremeFiretop wants to merge 3 commits into
Open
Conversation
Suggestion to Resolve Duplicate Mount-points
Update Version
Update Dates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue reported by scootertramp on snbforums here: https://www.snbforums.com/threads/backupmon-v1-10-2-2026-may-24-backup-restore-your-router-jffs-nvram-external-usb-drive-encrypt-cifs-smb-nfs-available-in-amtm.93052/post-994663
The problem appears to be caused by multiple MerlinAU startup processes... such as "startup", "addCronJob", and "postUpdateEmail" running at the same time and reaching the GNUton webs_update.sh patch logic before being properly serialized. This created a race condition where processes shared temporary files, moved the same files, and sometimes stacked multiple bind mounts on /usr/sbin/webs_update.sh.
Below is an example of me recreating the problem using the following command:
sleep 5; /jffs/scripts/MerlinAU.sh startup & /jffs/scripts/MerlinAU.sh addCronJob & waitHere was the result of that command:
BEFORE:
TEST RUN:
AFTER:
The fix was to place entire initialization (log cleanup and the GNUton download/compare/mount sequence) behind a dedicated blocking flock, while also using PID-specific temporary filenames and checking operation return codes.
Since the issue can no longer be reproduced, the concurrency race appears resolved to me?
Any ideas or suggestions you have or would like to share?