You are here

Dangerous Behavior of QJackCtl !!

Hello RNC,

first of all I'd like to thank you for creating the probably most powerful audio routing tool
for the Linux platform. I'm using Jack and QJackCtl for a couple of weeks now and I'm quite
happy with it, since it finally allows me to use my firewire audio interface in Linux (in combination
with the FFADO drivers). Nevertheless I discovered a weird thing which I thought I should tell you
and this community.

So, where do I start. I'm using Jack with the following setup:
Debian Wheezy
Jack is Version 1.9.8~dfsg.4+20120529git007cdc37-5
QJackCtl is Version 0.3.9-2 (Build: Jun 21 2012 22:58:37)

I'm not quite sure if QJackCtl created a session.xml the first time I started it. Fact is, that
I accidentally deleted the session file which was located in my home folder "/home/daniel"
So far, so good. I redesigned my audio routing map and clicked on the Save button in
the Session section in order to save my newly created routing session. At this point I'm
usually being presented with a message asking me to overwrite the session file which I
usually want to do. THIS TIME I was being presented with a message saying "This folder
already exists and is not empty: "/home/daniel" Are you sure to overwrite the existing
folder?" Since I expected QJackCtl only to save the newly created session file into my home
folder, I clicked on Yes, which turned out to be a big mistake. Watch this.

First I was kinda suspicious that the application took longer than 5 seconds to save the file;
usually it's done with no delay. After a while (10-15 seconds) I saw that my hard drive LED was
permanently led without a reason. So, I fired up my file manager since I was planning on copying
some files around when I detected, that all my shortcuts were gone. SHOCK ONE. After firing
up a terminal and having a look on my disks and usage I realized that the "saving" process
had deleted about 80% of my data on ALL attached hard drives! SHOCK TWO, BAM BAM.
This is not a joke and I have to repeat it: Pressing Save and confirming the "overwrite of the existing
FOLDER" message, which by the way is not really a practible way of handling this situation of a
missing session file anyways, DELETED pretty much everything I had stored on my drives. I'm now
having data loss of about 1 Terabyte of data. Crazy shit, huh ?

Since I had a backup of the most important things (Music collection, pictures, personal data, etc), I'm
not tooo pissed about it, but my video collection (ca. 600GB) is GONE FOREVER. Maybe it was just a sign for
me to watch less TV though, haha. ;-)

STILL, this behavior is DANGEROUS! Since I'm a curious guy, I was trying to reproduce the problem and after
restoring my backup I did it again the same way and it completely erased my harddrive again, twice, so I'm
sure it wasn't my imagination trying to pull a leg on me. This problem is to be taken serious!

You should just set the process right; if there is no configuration in the folder the user chose, then let him
just create a new one with the ability of choosing a name he likes. This way you also allow users to create
multiple sessions which some might desire.

I hope I could help to make a good piece of software a little bit better and safer.

Have a great day,
Daniel

Forums: 
rncbc's picture

i hear your worries. it's been mine as well, since ever...

as per jack session specification, saving is only possible if the target directory is completely empty. that's why it asks whether you're really sure to replace, override or wipe an existing non-empty session directory.

yes it's dangerous. you're not the first who answer yes to the critical question, i know.

and next time you are (not so) sure to answer yes on such a potential data-loss warning question, make sure you don't turn off versioning--if you had versioning turned on, the current target directory would be just backed-up and no data would be lost.

what is your suggestion to make things better? not deleting the target directory is not an option, otherwise you can't reuse session names ever.

cheers

How to turn on versioning? Is this a Jack or QjackQtl function or an underlying system function? With best regards, Simon.

rncbc's picture

versioning is a qjackctl session frontend option; a simple checkbox right of session save button (qjackctl >= 0.3.8)

cheers

Perhaps it's still your chance if you have done the same as me. I have choosen the desktop folder and click yes to that tempting "This folder
already exists and is not empty" dialog box. All icons were still showing in the desktop screen (I mean what you see when all windows are minimised) but after refreshing (press F5 button) all were disappeared, except your "session.xml" qjackctl's file.
HOWEVER if you go to /home you might find a "Desktop.1" folder with the files that were on the Desktop before messing everything. And if you saved for second time, a "Desktop.2" folder. None of them are shown in Desktop, because the /home/Desktop path is now only with your session.xml configuration file. That could not have happened if the "versioning" dialog box wasn't checked. But hopefully your didn't disable it before saving:)

Add new comment