aces / Loris-MRI

The set of scripts that preprocess and insert MRI data into the database.
10 stars 51 forks source link

[Testing 25.0] tools/delete_imaging_upload.pl #922

Closed cmadjar closed 7 months ago

cmadjar commented 1 year ago
regisoc commented 1 year ago

If executed more than once on data that have qc files, the script will produce a segmentation fault. First occurrence will not have a segmentation fault, but others will.

# first time
(loris-mri-python) lorisadmin@rongarocarcy-dev:/opt/hbcd/bin/mri$ perl tools/delete_imaging_upload.pl -profile prod -uploadID 62
Cannot delete upload(s) passed on command line: there is QC information defined on the MINC files for the upload IDs passed on the command line

# second
(loris-mri-python) lorisadmin@rongarocarcy-dev:/opt/hbcd/bin/mri$ perl tools/delete_imaging_upload.pl -profile prod -uploadID 62
Cannot delete upload(s) passed on command line: there is QC information defined on the MINC files for the upload IDs passed on the command line
Segmentation fault
cmadjar commented 1 year ago

If executed more than once on data that have qc files, the script will produce a segmentation fault. First occurrence will not have a segmentation fault, but others will.

Tested on my local sandbox and cannot reproduce the issue with the delete script. The segmentation fault error is most likely related to trying to delete data from the read-only mount /data-raisinbread/. @regisoc will confirm upon further testing.

regisoc commented 1 year ago

@cmadjar you should be right on that. I have to make some changes on my vm, so I did not re-tested it yet on it. On the test vm, something that also ended with a segmentation fault happened with the same script. Mostly related to the mysqldump error.

(loris-mri-python) lorisadmin@test-dev-250:/opt/Loris-MRI/bin/mri$ perl tools/delete_imaging_upload.pl -profile prod -uploadID 138

Backing up files related to the upload(s) to delete...
/data/Loris-MRI/data/assembly/400248/V6/mri/native/Loris-MRI_400248_V6_t1_001.mnc
/data/Loris-MRI/data/assembly/400248/V6/mri/native/Loris-MRI_400248_V6_t1_001.nii.gz
/data/Loris-MRI/data/pic/400248/Loris-MRI_400248_V6_t1_001_447_check.jpg
/data/Loris-MRI/data/tarchive/2016/DCM_2016-08-15_ImagingUpload-16-37-xUKgCm.tar

mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227)
Cannot run command mysqldump  --no-create-info --compact --single-transaction --skip-extended-insert --no-tablespaces --where='ProcessID IN (138)' --result-file=sql_backup_iLG2  -h ace\-db\-2\.cbrain\.mcgill\.ca -pQ3ctTe4n4c82kcfExyy -u test_250_admin test_dev_250 notification_spool 2>&1 | fgrep -v 'mysqldump: [Warning] Using a password on the command line interface can be insecure.'. Aborting
Segmentation fault
regisoc commented 1 year ago

For the record. mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; is because the user accessing db does not have the RELOAD privilege. Will be added to the doc.