[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] Problem with Ghostscript
From: |
Michèle Garoche |
Subject: |
Re: [Texmacs-dev] Problem with Ghostscript |
Date: |
Fri, 2 May 2003 21:12:28 +0200 |
Le vendredi, 2 mai 2003, à 14:20 Europe/Paris, Joris van der Hoeven a
écrit :
Can someone show me the results of "ps -l" when
ghostscript is busy and when we are in the dead-lock.
I've just launched TeXmacs with texmacs in an xterm, then tried to
load
Help->Configuration->Browse.
TeXmacs display the window with menus, then hangs trying to load the
/sw/share/TeXmacs-1.0.1.11/misc/images/tm_gnu1.ps (Fink port), so no
contents are displayed.
Here's the result of ps -l:
153 [02/05/2003 11:41] [imac:/Users/mylogin]% ps -l
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT
TIME
COMMAND
501 503 502 0 31 0 6176 1040 - S+ p1
0:01.89
-tcsh (tcsh)
501 2224 14536 0 31 0 20816 9356 - S+ p2
0:06.70
texmacs.bin
501 2476 2224 0 31 0 14532 3460 - S+ p2
0:00.21
(gs)
501 14536 14535 0 31 0 6176 1008 - Ss p2
0:00.27
-tcsh (tcsh)
501 2478 2477 0 31 0 6176 1020 - S std
0:00.24
-tcsh (tcsh)
Thanks for the feedback.
What does the Ss in STAT stand for?
S is for sleeping process, it is perfectly normal as indeed it is not
doing something as the moment ps is running. By the way, if I perform
ps -aux, all processes are sleeping except ps which is runnable (R).
+ stands for the process is in the foreground process group of its
control terminal. Again normal here as I launched texmacs in the
foreground in an xterm.
s stands for the process is a session leader.
The timing is as follows:
I - I launch Terminal.app.
If I type very fastly ps -l in it, I obtain:
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 27 0 6176 1016 - R std 0:00.21
-tcsh (tcsh)
So, the process is runnable.
But, thereafter, I obtain:
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.22
-tcsh (tcsh)
The process is already sleeping.
2 - In the Terminal, I launch xdarwin (in fact I launch a shell script
which launches a customized .xinitrc (since I have both Apple'x x11
launchable on display 0 and xdarwin launchable on display 1 with
windowmaker). And once xdarwin is running, I launch an xterm
I obtain:
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.22
-tcsh (tcsh)
501 4376 4375 0 31 0 5872 864 - Ss+ p2 0:00.15
-tcsh (tcsh)
Here the std terminal is sleeping and the new virtual terminal p2 is
sleeping (the xterm), is a session leader (right I've just opened a
session under X) and is in the foreground process group of its control
terminal.
3 - Then I launch texmacs in the xterm just with texmacs
I obtain (I must act very quickly here):
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.24
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1016 - Ss p2 0:00.23
-tcsh (tcsh)
501 4398 4376 0 15 0 17428 5728 - R+ p2 0:02.40
texmacs.bin
So, no change for Terminal, xterm is no more the foregound process (of
course, I've launched texmacs), texmacs becomes the foreground process
and is runnable.
4 - Thereafter I obtain:
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.25
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1016 - Ss p2 0:00.23
-tcsh (tcsh)
501 4398 4376 0 31 0 18824 7324 - S+ p2 0:03.61
texmacs.bin
No change, except that texmacs is sleeping. Again, perfectly normal.
All processes are sleeping, except the ones which effectly use the cpu
at a given time.
5 - Then I click in texmacs on help->configuration->browse
I obtain:
501 4285 4284 0 31 0 6176 1020 - S std 0:00.26
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1016 - Ss p2 0:00.23
-tcsh (tcsh)
501 4398 4376 0 14 0 20168 8980 - R+ p2 0:05.65
texmacs.bin
texmacs is runnable again. Normal it's loading the fonts and so on.
6 - A few second later, I obtain:
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.26
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1016 - Ss p2 0:00.23
-tcsh (tcsh)
501 4398 4376 0 26 0 20816 9328 - S+ p2 0:05.90
texmacs.bin
501 4656 4398 0 27 0 14532 3460 - S+ p2 0:00.22
(gs)
gs have been launched by texmacs, both are sleeping and in the
foreground process group,. gs is trying to process tm_gnu1.ps. Here I
suspect that texmacs does not handle gs with signal and timer, in order
to kill gs as apparently it hangs. So I cannot say it's normal, but it
reflects the situation: texmacs is waiting for gs to terminate and gs
cannot send its terminating signal to texmacs, due possibly to a signal
that is not caught by texmacs (just my guess, I have not browsed the
code).
7 - I send a ctrl-C in xterm.
I obtain:
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.26
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1016 - Ss p2 0:00.23
-tcsh (tcsh)
501 4398 4376 0 31 0 20816 9336 - S+ p2 0:06.04
texmacs.bin
501 4661 4398 0 31 0 14532 3460 - S+ p2 0:00.23
(gs)
Idem as above with tm_gnu2.ps
8 - I send another ctrl-C in xterm
I obtain:
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.26
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1016 - Ss p2 0:00.23
-tcsh (tcsh)
501 4398 4376 0 31 0 20552 9212 - R+ p2 0:06.15
texmacs.bin
Ok, gs is killed, texmacs is runnable again.
9 - Soon after, I obtain:
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.27
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1016 - Ss p2 0:00.23
-tcsh (tcsh)
501 4398 4376 0 31 0 20552 9216 - S+ p2 0:07.48
texmacs.bin
As I cannot run my fingers on the keyboard at the same pace as the
processor runs, it's more than likely that many, many states occur
between each step above.
Moreover ps cannot run as fast as the processor, so the states it
displays are always way behind the current processor's state.
Do you also have Ss just after launching gs?
If I launch gs /sw/share/TeXmacs-1.0.1.11/misc/images/tm_gnu2.ps
I obtain:
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.27
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1016 - Ss p2 0:00.25
-tcsh (tcsh)
501 4674 4376 0 31 0 7176 3424 - S+ p2 0:00.22
gs /sw/share/TeXm...
The philosophy is the same here as with all foreground processes:
sleeping and in the foregroun process group.
(In order to check this, you may create a postscript
file which needs a long to be displayed and carefully
track what happens when opening it from TeXmacs).
I've tried it with a 3.2 Mo ps file, running from gs
I obtain:
1 - first
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.36
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.29
-tcsh (tcsh)
501 4714 4376 0 14 0 7272 3512 - R+ p2 0:02.29
gs balloon-2.en.ps
2 - thereafter
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.37
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.29
-tcsh (tcsh)
501 4714 4376 0 31 0 7196 3436 - S+ p2 0:02.35
gs balloon-2.en.ps
When running inside texmacs (insert an image):
1 -
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.37
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.31
-tcsh (tcsh)
501 4719 4376 0 28 0 27088 14140 - R+ p2 0:09.92
texmacs.bin
2 -
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.39
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.31
-tcsh (tcsh)
501 4719 4376 0 31 0 27088 14188 - S+ p2 0:15.31
texmacs.bin
501 4911 4719 0 0 0 14628 3560 - R+ p2 0:00.61
(gs)
3-
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.39
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.31
-tcsh (tcsh)
501 4719 4376 0 23 0 27088 14188 - R+ p2 0:15.45
texmacs.bin
4-
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.42
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.31
-tcsh (tcsh)
501 4719 4376 0 31 0 22988 10844 - S+ p2 0:16.10
texmacs.bin
If I just launch texmacs and try to launch repeatedly ps -l as fast as
I can (but I'm ooooooooold , so younger people can do it more quickly),
I obtain:
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.55
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.33
-tcsh (tcsh)
501 5485 4376 0 27 0 14792 1932 - R+ p2 0:00.13
texmacs.bin
501 5519 5485 0 31 0 9764 568 - S+ p2 0:00.01
(sh)
501 5520 5519 0 28 0 9764 596 - S+ p2 0:00.03
(sh)
501 5524 5520 0 29 0 9596 532 - R+ p2 0:00.02
(kpsewhich)
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.55
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.33
-tcsh (tcsh)
501 5485 4376 0 21 0 14792 2156 - R+ p2 0:00.35
texmacs.bin
(this one three times)
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.56
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.33
-tcsh (tcsh)
501 5485 4376 0 24 0 16624 4160 - R+ p2 0:01.45
texmacs.bin
501 5559 5485 0 31 0 9764 588 - S+ p2 0:00.00
(sh)
501 5560 5559 0 31 0 9764 80 - R+ p2 0:00.01
(sh)
(two times)
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.56
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.33
-tcsh (tcsh)
501 5485 4376 0 29 0 16624 4164 - S+ p2 0:01.59
texmacs.bin
501 5594 5485 0 27 0 9764 580 - S+ p2 0:00.01
(sh)
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.56
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.33
-tcsh (tcsh)
501 5485 4376 0 6 0 16688 4464 - R+ p2 0:01.74
texmacs.bin
(6 times)
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:00.61
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.33
-tcsh (tcsh)
501 5485 4376 0 28 0 17940 6564 - S+ p2 0:02.68
texmacs.bin
and then a serie R+, S+ for texmacs: normal the processes are cycling
with a quantum in the queues. So it's swapped in, swapped out every x
nanosecondes and its state changes between runing and sleeping. In
fact, there are more states as that, but it's nearly impossible to
catch them with ps (processor is too fast comparing to standard io,
which are slow devices).
meanwhile, texmacs does the following:
TeXmacs] Loading ecrm11 at 300 dpi
TeXmacs] Loading hyphen.us
TeXmacs] Loading ecrm10 at 600 dpi
TeXmacs] Loading texmath.syx
TeXmacs] Loading math.enc
TeXmacs] Loading cmr.enc
TeXmacs] Loading cmmi.enc
TeXmacs] Loading cmsy.enc
TeXmacs] Loading msam.enc
TeXmacs] Loading msbm.enc
TeXmacs] Loading stmary.enc
TeXmacs] Loading wasy.enc
TeXmacs] Loading line.enc
TeXmacs] Loading math-cal.enc
TeXmacs] Loading math-frak.enc
TeXmacs] Loading math-bbb.enc
TeXmacs] Loading math-upgreek.enc
TeXmacs] Loading math-bold-1.enc
TeXmacs] Loading math-bold-2.enc
TeXmacs] Loading math-bold-cal.enc
TeXmacs] Loading long.vfn
TeXmacs] Loading negate.vfn
TeXmacs] Loading misc.vfn
TeXmacs] Loading rubber.enc
TeXmacs] Loading rubber-cmex.enc
TeXmacs] Loading rubber-stmary.enc
TeXmacs] Loading rubber-wasy.enc
TeXmacs] Loading rubber-dummy.enc
TeXmacs] Loading italic.enc
after that I insert the ps image:
TeXmacs] Loading ectt11 at 300 dpi
TeXmacs] Running ghostscript /Users/michga/Desktop/balloon-2.en.ps
TeXmacs] Running ghostscript inline ps
and I have just as above
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:01.01
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.33
-tcsh (tcsh)
501 5485 4376 0 27 0 27088 14204 - S+ p2 0:17.46
texmacs.bin
501 5803 5485 0 21 0 14628 3560 - R+ p2 0:00.25
(gs)
(9 times)
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:01.02
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.33
-tcsh (tcsh)
501 5485 4376 0 13 0 27088 14204 - R+ p2 0:17.55
texmacs.bin
(8 times)
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
COMMAND
501 4285 4284 0 31 0 6176 1020 - S std 0:01.06
-tcsh (tcsh)
501 4376 4375 0 31 0 6176 1024 - Ss p2 0:00.33
-tcsh (tcsh)
501 5485 4376 0 31 0 22988 10860 - S+ p2 0:18.54
texmacs.bin
and then a series of R+, S+.
Sorry for the delay.
Michèle
<http://micmacfr.homeunix.org/>
Re: [Texmacs-dev] Problem with Ghostscript, Karl M. Hegbloom, 2003/05/02
Re: [Texmacs-dev] Problem with Ghostscript, Ralf Treinen, 2003/05/02