0

I have a couple of launchd jobs starting a rsync wrapper script. They have been running fine for at least 3 years, but now most of them fail with exit status -9. All jobs are configured like this (with different rbackup.py parameters):

<?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>net.snafu.rs1_core</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/bin/python3</string>
        <string>/Users/snafu/Library/Scripts/rbackup.py</string>
        <string>rs1_core</string>
    </array>
    <key>StartCalendarInterval</key>
    <dict>
        <key>Minute</key>
        <integer>30</integer>
        <key>Hour</key>
        <integer>10</integer>
        <key>Weekday</key>
        <integer>7</integer>
    </dict>
    <key>StandardOutPath</key>
    <string>/Users/snafu/Library/Logs/launchd.log</string>
    <key>StandardErrorPath</key>
    <string>/Users/snafu/Library/Logs/launchd.log</string>
</dict>
</plist>

The launchd.log file does not contain any hint, and 2 out of 10 jobs still run fine. When I start the rsync wrapper with the respective parameters, it works, too. How can I debug this phenomenon?

9
  • 1
    Where do you see the exit status? What is the exact text you see there? Is there anything in the logs at all? Can you extend the wrapper (rbackup.py) to write a log entry immediately at the beginning so we know whether the script gets started at all?
    – nohillside
    Commented Jun 11, 2023 at 12:05
  • 1
    Also, did you update python or a python library recently?
    – nohillside
    Commented Jun 11, 2023 at 12:05
  • This sound similar to the few questions we’ve received about processes getting the “KILLED -9” error. First, did you migrate from Intel to Silicon? Second, do the scripts work if you manually run them?
    – Allan
    Commented Jun 11, 2023 at 14:55
  • @allan The "2 out of 10 jobs run fine" part is interesting here (and the wrapper seems to work anyway, see last sentences).
    – nohillside
    Commented Jun 11, 2023 at 15:12
  • The wrapper may not be architecture specific while the contents might be. We also don’t know when the scripts were created; 8 out of 10 may have been migrated and those 2 are “new”.
    – Allan
    Commented Jun 11, 2023 at 15:21

1 Answer 1

0

I was able to solve the problem by starting the jobs manually (once):

launchctl start net.snafu.rs1_core

It is still unclear why 2 jobs were not affected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .