Chronial / snapraid-runner

Python script for SnapRAID cronjobs
MIT License
302 stars 96 forks source link

Command 'snapraid diff' died with <Signals.SIGSEGV: 11> #55

Open ctml91 opened 2 years ago

ctml91 commented 2 years ago

I am using this docker image, https://github.com/xagaba/snapraid which has snapraid runner and snapraid bundled together. I started experiencing failures with the snapraid runner script. Initially it had failed because by deletethreshold of 500 was hit, but it was intentional. I did not end up correcting it right away, and it failed consecutive nights. But now the errors is different, and the snapraid diff actually exits quite early into the process.

/config # /usr/bin/python3 /app/snapraid-runner/snapraid-runner.py -c /config/snapraid-runner.conf
2022-03-29 00:16:16,672 [INFO  ] ============================================================
2022-03-29 00:16:16,692 [INFO  ] Run started
2022-03-29 00:16:16,692 [INFO  ] ============================================================
2022-03-29 00:16:16,693 [INFO  ] Running diff...
2022-03-29 00:16:16,697 [OUTPUT] Loading state from /mnt/disk1/snapraid.content...
2022-03-29 00:16:26,886 [OUTERR] WARNING! With 5 disks it's recommended to use two parity levels.
2022-03-29 00:16:26,886 [OUTPUT] Comparing..
2022-03-29 00:16:26,888 [OUTPUT]
..add xyz
..add xyz
..add xyz
..add xyz
2022-03-29 00:12:17,793 [ERROR ] Run failed due to unexpected exception:
Traceback (most recent call last):
  File "/app/snapraid-runner/snapraid-runner.py", line 235, in main
    run()
  File "/app/snapraid-runner/snapraid-runner.py", line 262, in run
    diff_out = snapraid_command("diff", allow_statuscodes=[2])
  File "/app/snapraid-runner/snapraid-runner.py", line 65, in snapraid_command
    raise subprocess.CalledProcessError(ret, "snapraid " + command)
subprocess.CalledProcessError: Command 'snapraid diff' died with <Signals.SIGSEGV: 11>.
2022-03-29 00:12:18,792 [ERROR ] Run failed

snapraid-runner.conf

[snapraid]
; path to the snapraid executable (e.g. /bin/snapraid)
executable = /usr/bin/snapraid
; path to the snapraid config to be used
config = /config/snapraid.conf
; abort operation if there are more deletes than this, set to -1 to disable
deletethreshold = 8600
; if you want touch to be ran each time
touch = false

[logging]
; logfile to write to, leave empty to disable
file = snapraid.log
; maximum logfile size in KiB, leave empty for infinite
maxsize = 10000

[scrub]
; set to true to run scrub after sync
enabled = false
percentage = 12
older-than = 30
MeijinGandalf commented 2 years ago

I am also having issues with 'snapraid diff'.

2022-07-02 01:26:36,586 [INFO  ] ============================================================
2022-07-02 01:26:36,586 [INFO  ] Run started
2022-07-02 01:26:36,586 [INFO  ] ============================================================
2022-07-02 01:26:36,586 [INFO  ] Running diff...
2022-07-02 01:26:36,587 [OUTERR] Invalid command '[snapraid]' in '/opt/snapraid-runner/snapraid-runner.conf' at line 1
2022-07-02 01:26:36,888 [ERROR ] Run failed due to unexpected exception:
Traceback (most recent call last):
  File "/opt/snapraid-runner/snapraid-runner.py", line 235, in main
    run()
  File "/opt/snapraid-runner/snapraid-runner.py", line 262, in run
    diff_out = snapraid_command("diff", allow_statuscodes=[2])
  File "/opt/snapraid-runner/snapraid-runner.py", line 65, in snapraid_command
    raise subprocess.CalledProcessError(ret, "snapraid " + command)
subprocess.CalledProcessError: Command 'snapraid diff' returned non-zero exit status 1
mediacowboy commented 1 year ago

I am seeing a similar error.

2023-05-17 04:00:01,610 [INFO  ] ============================================================
2023-05-17 04:00:01,611 [INFO  ] Run started
2023-05-17 04:00:01,611 [INFO  ] ============================================================
2023-05-17 04:00:01,613 [INFO  ] Running diff...
2023-05-17 05:28:31,634 [ERROR ] Run failed due to unexpected exception:
Traceback (most recent call last):
  File "/home/kevin/mergerfs/snapraid-runner.py", line 235, in main
    run()
  File "/home/kevin/mergerfs/snapraid-runner.py", line 262, in run
    diff_out = snapraid_command("diff", allow_statuscodes=[2])
  File "/home/kevin/mergerfs/snapraid-runner.py", line 65, in snapraid_command
    raise subprocess.CalledProcessError(ret, "snapraid " + command)
subprocess.CalledProcessError: Command 'snapraid diff' died with <Signals.SIGKILL: 9>.
ctml91 commented 1 year ago

I am seeing a similar error.

2023-05-17 04:00:01,610 [INFO  ] ============================================================
2023-05-17 04:00:01,611 [INFO  ] Run started
2023-05-17 04:00:01,611 [INFO  ] ============================================================
2023-05-17 04:00:01,613 [INFO  ] Running diff...
2023-05-17 05:28:31,634 [ERROR ] Run failed due to unexpected exception:
Traceback (most recent call last):
  File "/home/kevin/mergerfs/snapraid-runner.py", line 235, in main
    run()
  File "/home/kevin/mergerfs/snapraid-runner.py", line 262, in run
    diff_out = snapraid_command("diff", allow_statuscodes=[2])
  File "/home/kevin/mergerfs/snapraid-runner.py", line 65, in snapraid_command
    raise subprocess.CalledProcessError(ret, "snapraid " + command)
subprocess.CalledProcessError: Command 'snapraid diff' died with <Signals.SIGKILL: 9>.

Fyi I think I had to downgrade to the release before the current latest to resolve it.

mediacowboy commented 1 year ago

I am seeing a similar error.

2023-05-17 04:00:01,610 [INFO  ] ============================================================
2023-05-17 04:00:01,611 [INFO  ] Run started
2023-05-17 04:00:01,611 [INFO  ] ============================================================
2023-05-17 04:00:01,613 [INFO  ] Running diff...
2023-05-17 05:28:31,634 [ERROR ] Run failed due to unexpected exception:
Traceback (most recent call last):
  File "/home/kevin/mergerfs/snapraid-runner.py", line 235, in main
    run()
  File "/home/kevin/mergerfs/snapraid-runner.py", line 262, in run
    diff_out = snapraid_command("diff", allow_statuscodes=[2])
  File "/home/kevin/mergerfs/snapraid-runner.py", line 65, in snapraid_command
    raise subprocess.CalledProcessError(ret, "snapraid " + command)
subprocess.CalledProcessError: Command 'snapraid diff' died with <Signals.SIGKILL: 9>.

Fyi I think I had to downgrade to the release before the current latest to resolve it.

I'm running this on my Ubuntu host directly. So are your saying downgrade the snapraid version?

ctml91 commented 1 year ago

I am seeing a similar error.

2023-05-17 04:00:01,610 [INFO  ] ============================================================
2023-05-17 04:00:01,611 [INFO  ] Run started
2023-05-17 04:00:01,611 [INFO  ] ============================================================
2023-05-17 04:00:01,613 [INFO  ] Running diff...
2023-05-17 05:28:31,634 [ERROR ] Run failed due to unexpected exception:
Traceback (most recent call last):
  File "/home/kevin/mergerfs/snapraid-runner.py", line 235, in main
    run()
  File "/home/kevin/mergerfs/snapraid-runner.py", line 262, in run
    diff_out = snapraid_command("diff", allow_statuscodes=[2])
  File "/home/kevin/mergerfs/snapraid-runner.py", line 65, in snapraid_command
    raise subprocess.CalledProcessError(ret, "snapraid " + command)
subprocess.CalledProcessError: Command 'snapraid diff' died with <Signals.SIGKILL: 9>.

Fyi I think I had to downgrade to the release before the current latest to resolve it.

I'm running this on my Ubuntu host directly. So are your saying downgrade the snapraid version?

Sorry I'm using the docker container implementation, it's possible the old version of the docker container uses an old snapraid version.

mediacowboy commented 1 year ago

I am seeing a similar error.

2023-05-17 04:00:01,610 [INFO  ] ============================================================
2023-05-17 04:00:01,611 [INFO  ] Run started
2023-05-17 04:00:01,611 [INFO  ] ============================================================
2023-05-17 04:00:01,613 [INFO  ] Running diff...
2023-05-17 05:28:31,634 [ERROR ] Run failed due to unexpected exception:
Traceback (most recent call last):
  File "/home/kevin/mergerfs/snapraid-runner.py", line 235, in main
    run()
  File "/home/kevin/mergerfs/snapraid-runner.py", line 262, in run
    diff_out = snapraid_command("diff", allow_statuscodes=[2])
  File "/home/kevin/mergerfs/snapraid-runner.py", line 65, in snapraid_command
    raise subprocess.CalledProcessError(ret, "snapraid " + command)
subprocess.CalledProcessError: Command 'snapraid diff' died with <Signals.SIGKILL: 9>.

Fyi I think I had to downgrade to the release before the current latest to resolve it.

I'm running this on my Ubuntu host directly. So are your saying downgrade the snapraid version?

Sorry I'm using the docker container implementation, it's possible the old version of the docker container uses an old snapraid version.

Thank's for this hint. It made me go looking at versions and what not to discover that it seems to be a memory issue on my server.