Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] d.mon wx0 crashes after a few seconds (Manjaro, Arch Linux / AUR) #1576

Closed
neteler opened this issue May 15, 2021 · 3 comments
Closed
Labels
invalid This doesn't seem to be a bug

Comments

@neteler
Copy link
Member

neteler commented May 15, 2021

Describe the bug

When starting a GRASS GIS monitor, it crashes after a few seconds upon mouse-over, rendering an important part of GRASS GIS unusable.

Originally reported here:

GRASS 7.8.5 (nc_spm_08_grass7):~ > ps aux | grep python
manjaro     1248  0.1  1.2 566708 74276 ?        Sl   08:37   0:01 python3 /usr/bin/manjaro-hello
manjaro     1273  0.0  0.9 478728 60332 ?        Sl   08:37   0:00 /usr/bin/python /usr/bin/blueman-applet
manjaro     1474  0.0  0.7 391516 47076 ?        Sl   08:37   0:00 /usr/bin/python /usr/bin/blueman-tray
manjaro   116960  0.0  0.2  19788 15532 pts/0    Ss   08:59   0:00 python3 /usr/bin/grass78
manjaro   117045  1.0  0.0      0     0 pts/0    Z    09:01   0:02 [python3] <defunct>
manjaro   117586  2.9  2.4 796652 151940 pts/0   Sl   09:04   0:00 /opt/grass/gui/wxpython/mapdisp/main.py /opt/grass/gui/wxpython/mapdisp/main.py wx0 /home/manjaro/grassdata/nc_spm_08_grass7/user1/.tmp/manjaro/MONITORS/wx0 720 480 0
manjaro   117647  0.0  0.0   6404  2376 pts/0    S+   09:05   0:00 grep pytho
GRASS 7.8.5 (nc_spm_08_grass7):~ > strace -p 117586
strace: attach: ptrace(PTRACE_SEIZE, 117586): Operation not permitted
GRASS 7.8.5 (nc_spm_08_grass7):~ > sudo strace -p 117586
strace: Process 117586 attached
restart_syscall(<... resuming interrupted read ...>) = 0
newfstatat(AT_FDCWD, "/home/manjaro/grassdata/nc_spm_08_grass7/user1/.tmp/manjaro/MONITORS/wx0/cmd", {st_mode=S_IFREG|0644, st_size=0, ...}, 0) = 0
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=8, events=POLLIN}], 3, 0) = 0 (Timeout)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)

...

recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=8, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=8, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\204(\3\0\211\0\200\4\2\0\200\4", iov_len=12}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 12
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1(\226\17\7\0\0\0002\5\0\0\0\0\0\0\0\0/\3\0\0\316\2\0\0\326\0\0\0\264\1"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 60
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="((\4\0\211\0\200\0042\5\0\0\1\0*\0", iov_len=16}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 16
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\227\17\0\0\0\0\226$\205\0Z\2D\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="+(\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\2\230\17\0\0\0\0\212\0\200\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="5\30\4\0\330\2\200\4\211\0\200\4\212\1\30\0\214\4\6\0\331\2\200\4\330\2\200\4*\0\0\0"..., iov_len=1016}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 1016
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x10} ---
+++ killed by SIGSEGV (core dumped) +++

I tried to debug it but I am not familiar enough with gdb debugging of a child process. I updated initial steps here:

https://grasswiki.osgeo.org/wiki/GRASS_Debugging#Attaching_to_child_process

and would appreciate support.

At system level, this message is seen:

sudo dmesg  | grep python
[ 1451.246029] python3[117148]: segfault at 10 ip 00007f9fc4d4f54d sp 00007ffdd42a37a0 error 4 in libpython3.9.so.1.0[7f9fc4c9a000+21a000]

To Reproduce
Steps to reproduce the behavior:

(I installed Manjaro in Virtualbox for this test)

  1. Download https://manjaro.org/download/
  2. Register the ISO in Virtualbox, start
  3. Boot into Manjaro
  4. add AUR repo to Manjaro: https://linuxconfig.org/how-to-install-a-package-from-aur-on-manjaro-linux (then just install grass after update of the package database)
  5. run GRASS GIS, start d.mon wx0
  6. move the mouse over the monitor and it will close after a few seconds (the segfault message isn't shown)

Expected behavior
Should not crash...

System description (please complete the following information):

  • Operating System: Manjaro / AUR
  • GRASS GIS version
g.version -rge
version=7.8.5
date=2020
revision=4e3f393
build_date=2021-05-15
build_platform=x86_64-pc-linux-gnu
build_off_t_size=8
libgis_revision=2021-05-15T06:53:09+00:00
libgis_date=2021-05-15T10:00:00+02:00
proj=8.0.0
gdal=3.2.2
geos=3.9.1
sqlite=3.35.5

python3 -c "import sys, wx; print(sys.version); print(wx.version())"
3.9.4 (default, Apr 20 2021, 15:51:38) 
[GCC 10.2.0]
4.0.7.post2 gtk3 (phoenix) wxWidgets 3.0.5

@neteler neteler added bug Something isn't working help wanted Extra attention is needed labels May 15, 2021
@neteler neteler added this to the 7.8.6 milestone May 15, 2021
@petrasovaa
Copy link
Contributor

Isn't this the same as #1123?

@tmszi
Copy link
Member

tmszi commented May 15, 2021

Isn't this the same as #1123?

I think so, the indicator is a combination of Python version 3.9.4 (default, Apr 20 2021, 15:51:38) and wxPython version 4.0.7.post2 gtk3 (phoenix) wxWidgets 3.0.5 if it is unpatched.

@neteler
Copy link
Member Author

neteler commented May 15, 2021

Ah, I had forgotten about this old report.

@benducke, it seems Arch/Manjaro are missing this upstream fix for wxPseudoDC.FindObjects crash:

wxWidgets/Phoenix#1849

(in Fedora, it had been backported in https://src.fedoraproject.org/rpms/python-wxpython4/c/f5471fb86aaae46a686b85c654fcbb98516355e6?branch=rawhide)

I'll close this report since it is not directly a GRASS GIS problem but has to be fixed in wxWidgets.
Please contact the maintainer of wxWidgets to patch it accordingly.

@neteler neteler closed this as completed May 15, 2021
@neteler neteler removed bug Something isn't working help wanted Extra attention is needed labels May 15, 2021
@neteler neteler removed this from the 7.8.6 milestone May 15, 2021
@neteler neteler added the invalid This doesn't seem to be a bug label May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem to be a bug
Projects
None yet
Development

No branches or pull requests

3 participants