How to kill thunar?

If none of the more specific forums is the right place to ask
Post Reply
Message
Author
kerryhall
Posts: 212
Joined: 2008-08-19 11:06

How to kill thunar?

#1 Post by kerryhall »

I got a message about an SD card being ejected incorrectly (not true, I was careful to eject it before removing) and now thunar is crashed and can't be killed.

Thunar's window is a black / undrawable window for all instances, and kill -9 doesn't work on the PID. ie, the process still lives after kill -9.

I tried reinserting the SD card but no luck.

I just want to recover my thunar sessions if I can, and failing that, at least be able to kill it so I can restart and use it without rebooting.

User avatar
oswaldkelso
Posts: 1325
Joined: 2005-07-26 23:20
Location: UK
Been thanked: 3 times

Re: How to kill thunar?

#2 Post by oswaldkelso »

Try
pstree
to confirm the system thinks it's still running then

Code: Select all

pkill -f Thunar
Free Software Matters
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.

kerryhall
Posts: 212
Joined: 2008-08-19 11:06

Re: How to kill thunar?

#3 Post by kerryhall »

Yep, it's still running, and sadly, that command did not help.

cuckooflew
Posts: 680
Joined: 2018-05-10 19:34
Location: Some where out west

Re: How to kill thunar?

#4 Post by cuckooflew »

I Don't think this would work, maybe "thunar" , but

Code: Select all

pkill -f Thunar 
no.
in fact on my system as "thunar", all lower case did work, and as a normal user.

Code: Select all

40144 cuckoo     28    0   12M   37M onproc/3  -         0:02  0.93% thunar

Code: Select all

$ pkill -f thunar
or

Code: Select all

cuckoo$ pkill 40144
(should work)
But, if that still does not work:
Use 'top', or 'pgrep' to see the full process info, then try , as root ,

Code: Select all

# pkill (PID)
EG, Top shows me Firefox, is PID 79061 to kill FireFox :

Code: Select all

#pkill 79061
Additional details:

Code: Select all

$ man pkill
or 'man pgrep'.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

User avatar
oswaldkelso
Posts: 1325
Joined: 2005-07-26 23:20
Location: UK
Been thanked: 3 times

Re: How to kill thunar?

#5 Post by oswaldkelso »

Interesting. So what did pstree show Thunar or thunar? Anyway I'm glad it's killed.

I don't use xfce or Thunar, but suspect that my really old "Thunar" xfce 4.8 on my Dragora system has been either updated up stream or Debian must tweak it. I only use Bulk-rename and fantastic that is the naming on that leaves a lot to be desired.
Exec=/usr/lib/Thunar/ThunarBulkRename %F

Hopefully they renamed that also :mrgreen:
Free Software Matters
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.

kerryhall
Posts: 212
Joined: 2008-08-19 11:06

Re: How to kill thunar?

#6 Post by kerryhall »

kill -9 <PID> as root does not work.

How do I resolve this?

User avatar
Bloom
Posts: 378
Joined: 2017-11-11 12:23
Been thanked: 1 time

Re: How to kill thunar?

#7 Post by Bloom »

Then your only recourse is to reboot your computer.

User avatar
Head_on_a_Stick
Posts: 13446
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How to kill thunar?

#8 Post by Head_on_a_Stick »

cuckooflew wrote:"thunar", all lower case did work, and as a normal user
^ This.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support

User avatar
Bloom
Posts: 378
Joined: 2017-11-11 12:23
Been thanked: 1 time

Re: How to kill thunar?

#9 Post by Bloom »

Head_on_a_Stick wrote:
cuckooflew wrote:"thunar", all lower case did work, and as a normal user
^ This.
Ow, I missed that. Of course it couldn't find a misspelled name. And unlike "some other OS", case matters in Linux en Unix!

cuckooflew
Posts: 680
Joined: 2018-05-10 19:34
Location: Some where out west

Re: How to kill thunar?

#10 Post by cuckooflew »

Post by kerryhall » 2020-06-23 18:25
kill -9 <PID> as root does not work.

How do I resolve this?
So I will say again:

Looks like the OP missed it as well, it should work and won't hurt anything to try, I have had situations where 'kill' did not work, but 'pkill' did.

Code: Select all

pkill -f thunar 
And if that does not work, try using the PID, instead of thunar.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

kerryhall
Posts: 212
Joined: 2008-08-19 11:06

Re: How to kill thunar?

#11 Post by kerryhall »

It's the correct pid and the correct signal.

It simply does not work.

Further examination shows the process in the "Uninterruptible Sleep" state.

Why is it not possible to a kill a process in that state? Seems like an absolutely insane design choice.

Can I recompile the kernel with some flag that says "yes, in fact, if a cheap sd card stops working I don't want to have to #&@*$ reboot?" :lol:

cuckooflew
Posts: 680
Joined: 2018-05-10 19:34
Location: Some where out west

Re: How to kill thunar?

#12 Post by cuckooflew »

It simply does not work
What do you mean "it" ? Did you try using 'pkill' instead of kill? also
Further examination shows the process in the "Uninterruptible Sleep" state.
What shows this ? show some real out put,...You might be able to try to wake it up,
or just reboot, like bloom suggested, maybe try :

Code: Select all

 killall -9 thunar 
++==================================
Thunar's window is a black / undrawable window for all instances, and kill -9 doesn't work on the PID. ie, the process still lives after kill -9.
Show us what the output of this is.

Code: Select all

$ pgrep -l thunar 
==========================================
Or , some search foo here, https://www.thegeekstuff.com/2009/12/4- ... ill-xkill/
4. Xkill Command – kill a client by X resource

xkill is the simplest way to kill a malfunctioning program. When you want to kill a process, initiate xkill which will offer an cross-hair cursor. Click on the window with left cursor which will kill that process.
See

Code: Select all

$ man xkill
for details, I suggest read it with care :
man xkill

DESCRIPTION
Xkill is a utility for forcing the X server to close connections to
clients. This program is very dangerous, but is useful for aborting
programs that have displayed undesired windows on a user's screen. If
no resource identifier is given with -id, xkill will display a special
cursor as a prompt for the user to select a window to be killed. If a
pointer button is pressed over a non-root window, the server will close
its connection to the client that created the window. ----snip----
Works quite well, so any way there are various options.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

kerryhall
Posts: 212
Joined: 2008-08-19 11:06

Re: How to kill thunar?

#13 Post by kerryhall »

When I say "it has no effect", I mean the process is still running after sending the signal to the PID.

The pid in my case is 1531.

Here is a list of commands that have no effect. All commands have been run both as my user and as root:

Code: Select all

pkill thunar
pkill -HUP thunar
pkill -INT thunar
pkil -QUIT thunar
pkill -KILL thunar
pkill -TERM thunar
pkill -STOP thunar

killall thunar
killall -HUP thunar
killall -INT thunar
killall -QUIT thunar
killall -KILL thunar
killall -TERM thunar
killall -STOP thunar

kill 1531
kill -HUP 1531
kill -INT 1531
kill -QUIT 1531
kill -KILL 1531
kill -TERM 1531
kill -STOP 1531
xkill works to clean up the stale windows, but I still can't launch thunar again and continue to use my desktop!

I know the process state is in "uninterruptible sleep" from:

Code: Select all

kerry     1531  1.0  0.2 687152 83856 ?        Dsl  Jun08 241:35 thunar
This is a problem with the kernel, full stop. I only hope the kernel provides some sort of compilation flag such that I can say "Yes, I do want the ability to kill a process in the uninterruptible sleep state."

I know this is a common problem for NFS shares that become unavailable, but NFS has a mount option used as a workaround. Thunar has no such workaround AFAIK, and I'm tired of rebooting my system every time an SD card has a little trouble. I want my uptime measured in months, not hours, and I use SD cards dozens of times per day, phone, rpis, dashcams, DSLR, etc, etc.

cuckooflew
Posts: 680
Joined: 2018-05-10 19:34
Location: Some where out west

Re: How to kill thunar?

#14 Post by cuckooflew »

Thank you for showing the additional information, sadly it looks like you can not kill it , actually you could, maybe, but it is not simple, quick etc.
So, I see 2 choices, just reboot, I know you don't want to, but , if you consider how much time has been spent on this thread, and how much time would have been spent if you just rebooted, but anyway, now you know, ------
Or, the other choice : I have read this: https://tanelpoder.com/2013/02/21/peeki ... eshooting/
You could read it, and try some of the things it shows, but it is complicated, and even then, it still might not be possible to kill it.
by kerryhall » This is a problem with the kernel, full stop. I only hope the kernel provides some sort of compilation flag such that I can say "Yes, I do want the ability to kill a process in the uninterruptible sleep state."
I don't believe there is such a flag, but that would be a 3rd option, send this in to the developers, as a bug report, for details: https://www.debian.org/Bugs/Reporting
Use the mail list for any feature request, and also for any bugs that are very difficult to fix due to major design considerations.
by kerryhall » ----snip----and I'm tired of rebooting my system every time an SD card has a little trouble. I want my uptime measured in months, not hours, and I use SD cards dozens of times per day, phone, rpis, dashcams, DSLR, etc, etc.

Is this something that happens often ? Maybe consider trying a different file manager, check your hardware and SD cards, etc. This should not be occurring that often, if at all,.....are you sure you are umounting, ejecting correctly ? I have noticed over the years, busy people tend to pressure their selves, and try to rush things way to much, thus making mistakes , and actually causing their selves more problems and down time, where as a careful patient person, may seem slow, but in the long run they get more done, and more "up time", because very seldom do they break things, or make mistakes that cause system problems and down time. I am NOT saying that you are to blame, just saying, I would try to find the cause of the problem, that seems to be occuring when you use or change SD cards, phone, rpis, dashcams, DSLR, etc.Are you unplugging some and plugging in others, I also have had trouble with Thunar, crashes...and kind of stopped using it , most of the time, often the crashes have left me with a "locked up" system, but that would be another topic, simply using a different file manager solved that for me...take care and have a good day :D
Last edited by cuckooflew on 2020-06-25 00:10, edited 1 time in total.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

Bulkley
Posts: 6173
Joined: 2006-02-11 18:35
Been thanked: 2 times

Re: How to kill thunar?

#15 Post by Bulkley »

Before shutting down to kill something persistent I simply log out and back in. That will kill anything that is GUI related.

kerryhall
Posts: 212
Joined: 2008-08-19 11:06

Re: How to kill thunar?

#16 Post by kerryhall »

cuckooflew wrote: if you consider how much time has been spent on this thread, and how much time would have been spent if you just rebooted
I understand that, but my goal here is to fix this issue once and for all. I switched to Linux from Windows over 10 years ago so I could have a system with very high uptime. I have 8 workspaces going, with geda, gimp, inkscape, libreoffice, blender, slic3r, cura, firefox, reaper, dozens of projects going at once. Rebooting is such a huge pain for me, I have to try and resume where I was on each project. It's like incurring 8 context switching penalties all at the same time.

The response might be "Well why do you work in that fashion?" but that's not the point of these forums, is it? The computer is the tool, its job is to help the human with what they are working on, it's not "well human you aren't conforming to the way the computer works so now you need to change the way you've been productive for the past 10 years".

Servers have uptime measured in years. I realize hardware fails, but that is maybe once every 5 years (excluding hard drives)
cuckooflew wrote: You could read it, and try some of the things it shows, but it is complicated, and even then, it still might not be possible to kill it.
Thank you for this, I will try this and see if I can resolve the issue.
cuckooflew wrote: I don't believe there is such a flag, but that would be a 3rd option, send this in to the developers, as a bug report, for details: https://www.debian.org/Bugs/Reporting
Use the mail list for any feature request, and also for any bugs that are very difficult to fix due to major design considerations.
Thank you, I will explore this option as well.
cuckooflew wrote: This should not be occurring that often, if at all,.....are you sure you are umounting, ejecting correctly ? I have noticed over the years, busy people tend to pressure their selves, and try to rush things way to much, thus making mistakes , and actually causing their selves more problems and down time, where as a careful patient person, may seem slow, but in the long run they get more done, and more "up time", because very seldom do they break things, or make mistakes that cause system problems and down time.
Thank you for this, this is a very kind response and I do appreciate it. I think I just hit a corner case where I'm doing a lot with SD cards constantly, SD cards are manufactured to be disposable, and if I'm dealing with a big pile of them, I'm bound to run into this issue sooner or later. I do run into the issue where I click "eject" and thunar just spins forever (I'm guessing SD hardware problems) so I'm forced to pull the thing out so I can get on with my day. I don't want to play the reboot lottery every time an SD card chokes. It's bad design, plain and simple.

Unfortunately switching to say nautilus is no help, as fdisk chokes trying to do "fdisk -l".

cuckooflew
Posts: 680
Joined: 2018-05-10 19:34
Location: Some where out west

Re: How to kill thunar?

#17 Post by cuckooflew »

Your welcome, I am sorry that I could not really come up with a clear , straight forward solution though.
but my goal here is to fix this issue once and for all.
That would be nice, there might very well be something in the : https://tanelpoder.com/2013/02/21/peeki ... eshooting/ link,
I could not really try anything, simply because I can not duplicate the problem, it is something that needs to be tried when the problem occurs, how ever once you got it, you can save the code that was used to kill it, and in the future have it handy to use when needed, ...good luck,..
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

kerryhall
Posts: 212
Joined: 2008-08-19 11:06

Re: How to kill thunar?

#18 Post by kerryhall »

Thank you! Next time this issue happens, I'm going to save the SD card rather than tossing it in the trash, and see if I can repro the issue and the exact steps to repro.

Then I'll file a bug report with Debian.

Post Reply