mirror of
https://github.com/007revad/Synology_HDD_db.git
synced 2026-04-25 13:45:59 +03:00
[GH-ISSUE #64] double free or corruption (out) #26
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Synology_HDD_db#26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jk7gr on GitHub (Apr 24, 2023).
Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/64
Dear @007revad ,
I wanted to test your script on my DS918+ NAS running DSM 7.1.1-42962 Update 5.
Unfortunately, it doesn't like it. I am getting a "double free or corruption (out)" message and I don't know what it is.
I have exactly the same error message with your other script "syno_create_m2_volume.sh" as well.
example below:
$ sudo -i /volume1/docker/syno_hdd_db.sh -h
Password:
double free or corruption (out)
Aborted
@007revad commented on GitHub (Apr 24, 2023):
That is weird. The "double free or corruption (out)" error is normally seen in C or C++ programs. It seems to be due to the shell trying to read the same memory twice or trying to read or write to memory that's not accessible to the user.
Are you using SSH in a Windows terminal, command prompt or powershell?
See if you get the same error with just the following command:
sudo -iIf
sudo -idoes not give the same error, then try running the following command to make sure the permissions are set to executable on the syno_hdd_db.sh file.chmod u+x /volume1/docker/syno_hdd_db.shIf
sudo -idoes give the same error, then there may be something strange with your user's environment variables. In which case try sudo without the -i:sudo /volume1/docker/syno_hdd_db.sh -h@jk7gr commented on GitHub (Apr 24, 2023):
I appreciate the immediate response.
No joy,
I am using Putty on a Win11 machine.
I am pasting the output of the terminal:
@007revad commented on GitHub (Apr 25, 2023):
That error message
double free or corruption (out)
Aborted (core dumped)
means that the something tried to twice to free the same block of memory, or that something in memory was overwritten that shouldn't have been. But the script hasn't even started when that error ocurred.
Are you able to run other scripts? Any script?
Even one that just contains:
What does the following command return:
free -m@jk7gr commented on GitHub (Apr 25, 2023):
You are right... I cannot run any script...

Very strange. I used to be able to, but it seems not anymore. Any idea what should be looking at?
the extract of free -m is below. I don't know if is good or bad
@jk7gr commented on GitHub (Apr 25, 2023):
I managed to understand and troubleshoot.
I simply changed the first line of your script
from:
#!/usr/bin/env bash
to:
#!/bin/bash
After that it worked. I don't know what this really means. :)
@007revad commented on GitHub (Apr 25, 2023):
That means your environment variables are messed up (at least for your user account). Maybe when you update to DSM 7.2 it will fix them - or maybe not :)
If you're curious, what do these 2 commands return:
echo $PATHenv