You are not logged in.

#1 2017-04-14 22:00:02

linuxpragma
Member
Registered: 2016-12-01
Posts: 8

[SOLVED] shred command with -u parameter freezes thunar

I have a problem when typing the command "shred -fvuz abc.xyz". It wasn't like this since the begining. I was expecting that it would be fixed somehow after couple upgrades but it stil exists on my system. I use lts kernel and xfce 4.12. All the other parameters of the shred command work smoothly. When adding -u the thunar goes arctic. Any suggestions or workarounds?

Last edited by linuxpragma (2017-04-21 13:09:52)

Offline

#2 2017-04-14 22:50:03

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] shred command with -u parameter freezes thunar

The man-page for shred mentions you can replace "-u" with "--remove" which has three different options: "--remove=unlink", "--remove=wipe", "--remove=wipesync". They write that when you do "-u", you are using the 'wipesync' option:

The optional HOW parameter indicates how to remove a directory entry: 'unlink' => use a standard unlink call.  'wipe' => also first obfuscate bytes in the name.  'wipesync' => also sync each obfuscated byte to disk.  The default mode  is  'wipesync', but note it can be expensive.

You could try to see if things work with "shred -fvz --remove=wipe abc.xyz". If that works, you'd know that something about the sync part of 'wipesync' is what's causing the problem. That might help with searching for what's broken about the system. The work-around right now would just be to not use "-u", instead "--remove=unlink" or do a "rm abc.xyz" yourself after the shred. You could add a function for this in your .bashrc if you use shred a lot.

Offline

#3 2017-04-14 22:57:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] shred command with -u parameter freezes thunar


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2017-04-15 02:33:25

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] shred command with -u parameter freezes thunar

Is thunar displaying the same files that are being shredded? In that case, graysky's link should definitely be relevant.

Offline

#5 2017-04-15 22:12:13

linuxpragma
Member
Registered: 2016-12-01
Posts: 8

Re: [SOLVED] shred command with -u parameter freezes thunar

I didn't want to quote each one of your kind replies so that the post won't get long and boring. I will answer in a summary reply to each one of you :

Ropid -   I tried to add --remove=wipe in the command, it still freezes the file manager. I will need wipe at least so i wont try unlink. It is interesting that one year ago the default was working smoothly. I can't recall after wich update it stoped working.

graysky - Yes it could be. I feel so. My knowledge on linux ain't deep enough and my time for reading close to zero so i cannot analyze this deeper.

x33a  - Similarly on what i mentioned to graysky the file appears on Thunar unchanged untill i terminate the frozen thunar and get into the same directory. The file then no longer exists, shreded as i wanted. That's why i feel it has something to do with the change on the file. Before the problem occur thunar was displaying a quick , bogus kind animation with zeros and smoothly the file was disappearing so i could continue with my browsing. I had the shred action added on the "custom actions". After Thunar started freezing on this action i do shreding through an additional file manager i have.

I thought it was appearing only in my Arch machines. I found out it occurs on other linux distr-s i have too. So i guess i'll have to report it to xfce forums. I will try to make a decent report that will trigger a fix if the community finds it wothing to do so.

Last edited by linuxpragma (2017-04-15 22:35:34)

Offline

#6 2017-04-15 23:52:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] shred command with -u parameter freezes thunar

I think it is the same bug... might be worthwhile for you to post to the bug report documenting the use-case.  Xfce4 fixes and development are pretty slow.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2017-04-16 01:23:37

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] shred command with -u parameter freezes thunar

I just compared 'thunar' in the normal Arch repos, and 'thunar-git' from the AUR. That AUR 'thunar-git' package does not crash for me. The normal 'thunar' package does crash, just like described. My test was, I went into '/tmp' with both Thunar and on the command line, then did "touch test" or "cat > test", and then "shred -u test". The normal 'thunar' crashed immediately, while 'thunar-git' was fine testing it several times.

I guess you might want to use that 'thunar-git' package if you find it does not have any other bugs. Compiling it wasn't bad, went pretty fast and didn't need to install a lot of other packages.

Offline

#8 2017-04-16 09:13:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] shred command with -u parameter freezes thunar

Can you repeat your test using a larger file on media not tmpfs?  Take something that's 1 Gig for example:

dd if=/dev/urandom of=/path/to/hdd/1gig-fillfile bs=1M count=1000

Now, shred that while having thunar from the repos pointing to the media.  Still fixed?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2017-04-16 10:25:37

toz
Member
Registered: 2011-10-28
Posts: 497

Re: [SOLVED] shred command with -u parameter freezes thunar

The big difference between thunar and thunar-git is that the thunar-git package still includes the Deactivate-SEND-MOVED patch once proposed to fix bug 12264. It was never included in the final fix set for the thunar bug however it does seem to fix this issue.

@graysky, it also works with the 1GB file as you asked to test.

Bug report created upstream.

Offline

#10 2017-04-16 15:17:32

ninetls
Member
Registered: 2017-04-16
Posts: 1

Re: [SOLVED] shred command with -u parameter freezes thunar

There is another bug related to Thunar freezes. https://bugzilla.xfce.org/show_bug.cgi?id=13481
The patch provided in 3rd comment can fix your problem as well.

Offline

#11 2017-04-19 00:25:08

linuxpragma
Member
Registered: 2016-12-01
Posts: 8

Re: [SOLVED] shred command with -u parameter freezes thunar

Considering all the advices, including this from nintls about the patch, i selected to test on the extended version of Thunar in the repos. Installation went great, no arguments added. I used the shred command, in the custom actions, as follows:
shred -fvuz %F
Now shred items disappear as expected from my view. No freezing!
I decided to follow the extended version stream. It appears the applied patches work well for me.
Thank you all very much for your help! Will make a post on the xfce forums too when i get some free time.
If i don't see any comments soon, will mark the post as solved after 2 days.

Offline

#12 2017-04-19 07:28:09

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] shred command with -u parameter freezes thunar

ninetls wrote:

There is another bug related to Thunar freezes. https://bugzilla.xfce.org/show_bug.cgi?id=13481
The patch provided in 3rd comment can fix your problem as well.

That patch seems to have fixed my issue as well.

EDIT: https://bugs.archlinux.org/task/53712

Last edited by graysky (2017-04-19 07:36:42)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB