When running duplicacy-web under root via launchd another instance of dupliacy-web keeps launching under current user account, and either disappearing shortly:
or getting stuck with 100% CPU usage, while logging exceptions into the system log (see matched pid to confirm the message is coming from a stuck spurious one):
To reproduce:
/Library/LaunchDaemons/com.acrosync.duplicacy-web.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.acrosync.duplicacy-web</string>
<key>KeepAlive</key>
<dict>
<key>Crashed</key>
<true/>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>EnvironmentVariables</key>
<dict>
<key>HOME</key>
<string>/Library/Duplicacy</string>
</dict>
<key>Program</key>
<string>/Applications/Duplicacy Web Edition.app/Contents/MacOS/duplicacy_web_osx_x64</string>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/Library/Duplicacy</string>
</dict>
</plist>
sudo mkdir /Library/Duplicacy
sudo launchctl load -w /Library/LaunchDaemons/com.acrosync.duplicacy-web.plist
log stream --predicate 'process contains "duplicacy_web"'
and start backup.
Watch the Activity monitor. Note the correct one is running under Root and the spurious is being launched as local user account – alex on my screenshots.
Killing the spurious one results in it re-launching anyways and continuing to log exceptions. It probably has to do with it being ran as daemon and attempting to interact whit the current user desktop.
If this is not a supported scenario – how can I backup All users using Duplicacy Web otherwise?
Edit:
Example of the log messages spurious one keeps dumping to the system log:
2021-05-21 11:31:51.422177-0700 0x43f9b2 Error 0x0 77375 0 duplicacy_web_osx_x64: (AppKit) [com.apple.AppKit:General] (
0 CoreFoundation 0x00007fff206db98b __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20413d92 objc_exception_throw + 48
2 AppKit 0x00007fff22e5aed6 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4389
3 AppKit 0x00007fff22e4c679 -[NSApplication run] + 586
4 duplicacy_web_osx_x64 0x00000000049473a1 nativeLoop + 161
5 duplicacy_web_osx_x64 0x0000000004946252 _cgo_67d7e7d56c36_Cfunc_nativeLoop + 34
6 duplicacy_web_osx_x64 0x000000000405b3f0 runtime.asmcgocall + 112
)
See the matching pid to confirm the log is actually coming from the spurious instance.