[GRASS5] d.legend and d.out.png

Moritz Lennert mlennert at club.worldonline.be
Wed Sep 22 09:18:40 EDT 2004

On Sat, August 28, 2004 1:08, Glynn Clements said:
> Moritz Lennert wrote:
>> > The next step is to try to debug the child process. Try running
>> > d.what.vect but don't interact with it. Use "ps" to check whether the
>> > child process ($GISBASE/etc/form/form) is still running at this point.
>> > If it is, try attaching to it with gdb, e.g.
>> >
>> > 	$ gdb $GISBASE/etc/form/form
>> > 	> attach <pid>
>> >
>> > where <pid> is the PID of the etc/form/form process.
>> >
>> > Or use "strace -p <pid>".
>> Ok, the form process appears once I click on the map, not before. When
>> everything works fine I can see the form process appear normally. When
>> d.what.vect doesn't work (i.e. no reaction after the first click) a
>> defunct form process appears:
>> $ ps -A | grep form
>>  5820 pts/27   00:00:00 form <defunct>
> The "<defunct>" means that it's a "zombie" process, i.e. it has
> terminated, but the parent hasn't called wait() (or waitpid() etc) for
> it, so its entry remains in the process table (until the parent has
> called wait() or similar, essentially, its PID cannot be reused, and
> its exit status has to be stored somewhere).
>> This disappears when d.what.vect terminates silently after the second
>> left-click. Next time around it reappears but with a different pid.
>> When I try to attach in gdb or use strace -p I get:
>> (gdb) attach 5849
>> Attaching to process 5849
>> ptrace: Op&#65533;ration non permise.
>> and
>> $ strace -p 5849
>> attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted
>> be it as normal user or as root.
> Note that you have to do this before it has died. Once it is in the
> <defunct> state, you can't trace it or debug it.

I only get a form process when d.what.vect works. When it doesn't work
(i.e. silently dies after two clicks), I never see the form process come
up, so I can't attach to it.

When d.what.vect works, I can attach to the form process in gdb, but then
I get no reaction from GRASS anymore until I detach in gdb.
I can send you the results of a strace -p <form pid> during a successful
session with d.what.vect. But I guess this won't help ?


More information about the grass-dev mailing list