|
|
#1 |
|
Prospect
Join Date: Nov 2002
Location: Madrid, Spain
Posts: 33
|
When trying to open a text file (regular .txt file, about 4K) TextEdit became totally unresponsive
(cursor spinning nonstop, etc.). It can't be killed either with Command-Option-Control, nor via the Dock. I tried killing it the usual Unix way, but it misteriously refuses to die: Code:
% ps ax | grep -i textedit 19085 ?? U 0:00.66 /Applications/TextEdit.app/Contents/MacOS/TextEdit -psn_0_124256257 19237 std R+ 0:00.00 grep -i textedit % kill -9 19085 % % ps ax | grep -i textedit 19085 ?? U 0:00.66 /Applications/TextEdit.app/Contents/MacOS/TextEdit -psn_0_124256257 have to say about the "stubborn" TextEdit: Code:
% fstat | grep -i textedit artemio TextEdit 19085 wd 2 drwxrwxr-t 5120 r / artemio TextEdit 19085 0 40019844 ?rw-rw-rw- null r /dev artemio TextEdit 19085 1 39915140 ?rw------- console w /dev artemio TextEdit 19085 2 39915140 ?rw------- console w /dev xxx TextEdit 19085 3 3220508 -rw-r--r-- 4182877 r / artemio TextEdit 19085 4 2047167 -rw-r--r-- 3177 r / artemio TextEdit 19085 5 2047164 -rw-r--r-- 38743 r / artemio TextEdit 19085 6 3220512 -rw-r--r-- 153584 r / artemio TextEdit 19085 7 3220506 -rw-r--r-- 527850 r / % lsof -c TextEdit COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME TextEdit 19085 artemio cwd VDIR 14,9 5120 2 / (/dev/disk0s9) TextEdit 19085 artemio 0r VCHR 3,2 0t0 40019844 /dev/null TextEdit 19085 artemio 1w VCHR 0,0 0t0 39915140 /dev/console TextEdit 19085 artemio 2w VCHR 0,0 0t0 39915140 /dev/console TextEdit 19085 artemio 3r VREG 14,9 4182877 3220508 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras.rsrc TextEdit 19085 artemio 4r VREG 14,9 3177 2047167 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/Resources/HIServices.rsrc TextEdit 19085 artemio 5r VREG 14,9 38743 2047164 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/Resources/English.lproj/Localized.rsrc TextEdit 19085 artemio 6r VREG 14,9 153584 3220512 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/HIToolbox.rsrc TextEdit 19085 artemio 7r VREG 14,9 527850 3220506 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/English.lproj/Localized.rsrc TextEdit 19085 artemio 8r 0x03887154 file struct, ty=0x3, op=0x2dd090 TIA, Artemio Gonzalez artemiog@mac.com |
|
|
|
|
|
#2 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
odd, i can find no documentation in the ps command about the process state U
otherwise, it looks copacetic. quit some other processes to see if it will unblock anything in system.log?
__________________
On a clear disk, you can seek forever. |
|
|
|
|
|
#3 |
|
All Star
Join Date: Jan 2002
Location: CO, USA
Posts: 908
|
A look at the source says that state U is TH_STATE_UNINTERRUPTIBLE. Guess that may be a bit obvious now...
Not sure what precisely that means, nor how to change the state, however. |
|
|
|
|
|
#4 |
|
Hall of Famer
Join Date: Jan 2002
Posts: 3,541
|
A kill -9 failed to stop the process? Holy crizzap.
Have you tried this command: % sacrifice -virgin [pid] -appGods ? |
|
|
|
|
|
#5 |
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
|
thread in uninterruptible wait
The state TH_STATE_UNINTERRUPTIBLE means the thread is in an uninterruptible wait state. (Not that that is too much more useful to you.)
A google search on 'uninterruptible kill' ( http://www.google.com/search?q=uninterruptible+kill ) gives a bunch of discussions of this issue. The first hit (Answer Gang 83) is particularly interesting. But no solution better than killing the parent process is offered. Last edited by hayne; 05-20-2003 at 06:18 PM. |
|
|
|
|
|
#6 |
|
Prospect
Join Date: Nov 2002
Location: Madrid, Spain
Posts: 33
|
Thanks, Merv. The only thing in /var/log/system.log that looks unusual is this line:
May 20 16:53:07 tillina csmount[19034]: getattr for non-existent file handle 0x98765432 0x2 (As I said in my previous post, TextEdit actually started getting "stuck" right after trying to open a file). There was a csmount process running (with a PID close to TextEdit's) that I killed, but it's still impossible to kill TextEdit. Artemio |
|
|
|
|
|
#7 |
|
All Star
Join Date: Jan 2002
Location: CO, USA
Posts: 908
|
Hmm, csmount is part of the ftp filesystem; is the file you're attempting to open in TextEdit going over that?
|
|
|
|
|
|
#8 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
odd, textedit here has some network connections:
Code:
$ lsof -c TextEdit; fstat |grep -i textedit COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME TextEdit 28283 merv cwd VDIR 14,22 5376 2 / (/dev/disk1s9) TextEdit 28283 merv 0r VCHR 3,2 0t0 59707780 /dev/null TextEdit 28283 merv 1w VCHR 0,0 0t0 59708292 /dev/console TextEdit 28283 merv 2w VCHR 0,0 0t0 59708292 /dev/console TextEdit 28283 merv 3r 0x0394645c file struct, ty=0x3, op=0x2dd090 TextEdit 28283 merv 4r VREG 14,22 3177 4465 / (/dev/disk1s9) TextEdit 28283 merv 5r VREG 14,22 38743 4462 / (/dev/disk1s9) TextEdit 28283 merv 6r VREG 14,22 156864 914998 / (/dev/disk1s9) TextEdit 28283 merv 7r VREG 14,22 527850 914988 / (/dev/disk1s9) TextEdit 28283 merv 8r VREG 14,22 4182877 914994 / (/dev/disk1s9) TextEdit 28283 merv 9u inet 0x064d04ec 0t0 TCP localhost:58657->localhost:ipp (CLOSE_WAIT) TextEdit 28283 merv 10u inet 0x05873d1c 0t0 TCP localhost:58656->localhost:ipp (CLOSE_WAIT) merv TextEdit 28283 wd 2 drwxr-xr-t 5376 r / merv TextEdit 28283 0 59707780 ?rw-rw-rw- null r /dev merv TextEdit 28283 1 59708292 ?rw------- console w /dev merv TextEdit 28283 2 59708292 ?rw------- console w /dev merv TextEdit 28283 4 4465 -rw-r--r-- 3177 r / merv TextEdit 28283 5 4462 -rw-r--r-- 38743 r / merv TextEdit 28283 6 914998 -rw-r--r-- 156864 r / merv TextEdit 28283 7 914988 -rw-r--r-- 527850 r / merv TextEdit 28283 8 914994 -rw-r--r-- 4182877 r / merv TextEdit 28283 9* internet stream tcp 64d04ec merv TextEdit 28283 10* internet stream tcp 5873d1c wonder if something in that arena collided.
__________________
On a clear disk, you can seek forever. |
|
|
|
|
|
#9 | |||||||||||||||||||
|
Prospect
Join Date: Nov 2002
Location: Madrid, Spain
Posts: 33
|
No, the file I was trying to open was a local file. In fact, the csmount process probably has to do with an ftp server I accessed before (but not right before) TextEdit started acting up. Merv's point about network connections being open by his TextEdit is interesting. However, a perfectly healthy copy of TextEdit running in my home computer has no network connections; in fact, the lsof and fstat output from the healthy TextEdit is very similar to that of the "sick" one:
Finally, hayne's observation about the meaning of "U" in ps was quite enlightening (by the way, hayne, where did you get it from? I couldn't find it in the regular man pages). From the thread quoted in hayne's message it seems that the only way (if any) to kill an uninterruptible process (by the way, according to the thread this type of process is almost always related to a disk driver and the "mount" command) is to kill its parent process. But, as far as I could find (using pstree), the parent process of TextEdit is not a shell but "loginwindow". What would be the effects of killing loginwindow? Would that be similar to an "unclean" logout, or perhaps even more drastic? Thanks everybody for your help, Artemio [edit: fold -mt] Last edited by mervTormel; 05-21-2003 at 06:16 AM. |
|||||||||||||||||||
|
|
|
|
|
#10 | ||||||||||||||||||||||||||||||||||||||
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
|
I merely googled on TH_STATE_UNINTERRUPTIBLE - it was blb who found the interpretation of 'U' by looking at the source code. (see blb's post above)
I believe it would be like an "unclean" logout. Better just to logout normally rather than doing that. But if you can get this problem to happen reproducibly, you should let Apple know about it. Re: pstree I just found out that if you use the "-g 2" option, it gives a much nicer display. Last edited by hayne; 05-21-2003 at 03:12 AM. |
||||||||||||||||||||||||||||||||||||||
|
|
|
![]() |
|
|