[GRASS-dev] [GRASS GIS] #3740: The GRASS session is "leaking" to the environment
GRASS GIS
trac at osgeo.org
Tue Jan 29 02:25:44 PST 2019
#3740: The GRASS session is "leaking" to the environment
--------------------------+-------------------------
Reporter: pmav99 | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone:
Component: Startup | Version: svn-trunk
Resolution: | Keywords:
CPU: Unspecified | Platform: Linux
--------------------------+-------------------------
Comment (by pmav99):
Replying to [comment:6 mmetz]:
> This is what happens for me: the `Quit GRASS GIS` button returns me to
my own shell.
I don't doubt you, but I am afraid this is not the behavior I am observing
though. The complete setup on my end is the following:
1. Create a fresh VM running ubuntu 18.04
2. Check out trunk
3. Compile
Note: In order to avoid the overhead of running Xorg in the VM, I make the
VM headless and connect via SSH. Whenever I need to run a gui application
in the VM I launch an xpra server in the VM: https://xpra.org/
In case someone is not familiar with xpra, it is more or less the
equivalent of X11 forwarding on SSH. I can't say that xpra is definitely
not interfering, but I don't think it is very likely. I will try to test
with plain X11 forwarding to rule that out.
So, when I want to e.g. launch the GRASS GUI, I start an instance of a
terminal emulator (e.g. `terminator`) via xpra. Just to make sure that
everything is clear, the terminal emulator is running on the VM; not on my
laptop. It is being rendered on my laptop's Xorg though. But, at least in
theory this should not be important.
So from within this terminal emulator I launch GRASS using my script. As I
said in a previous message, I did try to launch `grass77` directly from
the emulator's shell (i.e. without the script) but this didn't change
anything. Anyway, while the GRASS GUI is running, the relevant processes
on the VM are:
{{{
pmav99 8770 2.7 2.3 1131716 192136 ? Sl 12:02 0:04
/usr/bin/python2 /usr/bin/xpra start --speaker=disabled --start-
child=terminator --microphone=disabled --webcam=disabled --pulseaudio=no
--env=XPR
pmav99 8772 3.1 2.9 1196104 239844 ? Ssl 12:02 0:04 \_
/usr/lib/xorg/Xorg-for-Xpra-S8753 -noreset -novtswitch -nolisten tcp
+extension GLX +extension RANDR +extension RENDER -auth /home/pmav99/.Xau
pmav99 8896 0.3 0.9 1132248 76916 ? Sl 12:02 0:00 \_
/usr/bin/python /usr/bin/terminator
pmav99 8921 0.4 0.0 54412 6684 pts/1 Ss 12:02 0:00 \_
/bin/zsh
pmav99 9094 0.0 0.0 15244 3116 pts/1 S 12:04 0:00
\_ bash src2/grass/run_gui.sh
pmav99 9098 0.1 0.1 35200 12344 pts/1 S 12:04 0:00
\_ python /home/pmav99/src2/grass/bin.x86_64-pc-linux-gnu/grass77
pmav99 9151 0.3 0.0 49808 5980 pts/1 S+ 12:04 0:00
\_ /bin/zsh
pmav99 9152 4.2 2.0 1087160 169400 pts/1 Sl 12:04 0:01
\_ python /home/pmav99/src2/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/wxgui.py
}}}
As you can see, `grass77` starts two child processes ,9151 and 9152. Both
of them are functioning as they should (the process states are S+ and Sl
respectively). Now, when I click on `Quit GRASS GIS`, the GUI closes, but
the shell remains. And this is how the process tree is looking:
{{{
pmav99 8770 1.4 2.2 1116340 183864 ? Sl 12:02 0:05
/usr/bin/python2 /usr/bin/xpra start --speaker=disabled --start-
child=terminator --microphone=disabled --webcam=disabled --pulseaudio=no
--env=XPR
pmav99 8772 1.3 2.6 1089848 213520 ? Ssl 12:02 0:05 \_
/usr/lib/xorg/Xorg-for-Xpra-S8753 -noreset -novtswitch -nolisten tcp
+extension GLX +extension RANDR +extension RENDER -auth /home/pmav99/.Xau
pmav99 8896 0.1 0.9 1132248 76916 ? Sl 12:02 0:00 \_
/usr/bin/python /usr/bin/terminator
pmav99 8921 0.1 0.0 54412 6684 pts/1 Ss 12:02 0:00 \_
/bin/zsh
pmav99 9094 0.0 0.0 15244 3116 pts/1 S 12:04 0:00
\_ bash src2/grass/run_gui.sh
pmav99 9098 0.0 0.1 35200 12344 pts/1 S 12:04 0:00
\_ python /home/pmav99/src2/grass/bin.x86_64-pc-linux-gnu/grass77
pmav99 9151 0.0 0.0 49808 5980 pts/1 S+ 12:04 0:00
\_ /bin/zsh
pmav99 9152 0.8 0.0 0 0 pts/1 Z 12:04 0:02
\_ [python] <defunct>
}}}
9151 is still running (state `S+`) while 9152 is a zombie process
I would be happy to hear any suggestions to debug this
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3740#comment:7>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list