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

Crash on arm64 #51

Closed
khumarahn opened this issue Mar 10, 2018 · 7 comments
Closed

Crash on arm64 #51

khumarahn opened this issue Mar 10, 2018 · 7 comments

Comments

@khumarahn
Copy link

khumarahn commented Mar 10, 2018

Hi, I observe a crash with 0.3.1 on arm64 on gentoo. It does not happen with 0.2.0.

dmesg output:

[ 1042.559123] lxterminal[5862]: unhandled level 1 translation fault (11) at 0x0000000c, esr 0x92000005
[ 1042.559147] pgd = ffffffc07129e000
[ 1042.562888] [0000000c] *pgd=0000000000000000

[ 1042.567718] CPU: 3 PID: 5862 Comm: lxterminal Not tainted 3.10.104 #5
[ 1042.567732] task: ffffffc071006700 ti: ffffffc06b108000 task.ti: ffffffc06b108000
[ 1042.567757] PC is at 0x7f93680f30
[ 1042.567768] LR is at 0x7f9377fda4
[ 1042.567780] pc : [<0000007f93680f30>] lr : [<0000007f9377fda4>] pstate: 80000000
[ 1042.567789] sp : 0000007fcf30edf0
[ 1042.567799] x29: 0000007fcf30edf0 x28: 0000007fcf30f0b8 
[ 1042.567814] x27: 0000005581afc020 x26: 0000007f937d4000 
[ 1042.567830] x25: 0000007f937d5000 x24: 0000007f937d4000 
[ 1042.567855] x23: 0000000000000001 x22: 0000000000000000 
[ 1042.567870] x21: 0000000000000002 x20: 0000000000000000 
[ 1042.567884] x19: 0000005581aeb680 x18: 0000000000000008 
[ 1042.567898] x17: 0000007f937d5288 x16: 0000007f93680f30 
[ 1042.567912] x15: 0000000000000002 x14: 0000007f93675c68 
[ 1042.567927] x13: 0000007f93679418 x12: 0000000000000000 
[ 1042.567941] x11: 0000007f93a5a530 x10: 0000000000000000 
[ 1042.567955] x9 : 0000007f9592a900 x8 : 0000000000000001 
[ 1042.567969] x7 : 0000000000000000 x6 : 0000007f9592a900 
[ 1042.567983] x5 : 0000000000000000 x4 : 0000007f9592a900 
[ 1042.567997] x3 : 0000000000000000 x2 : 2f9797d512b76e00 
[ 1042.568011] x1 : 0000000000000000 x0 : 0000000000000000 
@khumarahn
Copy link
Author

$ valgrind lxterminal 
==13876== Memcheck, a memory error detector
==13876== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==13876== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==13876== Command: lxterminal
==13876== 
==13876== Invalid read of size 4
==13876==    at 0x6ED0F30: xcb_glx_query_server_string_string_length (in /usr/lib64/libxcb-glx.so.0.0.0)
==13876==  Address 0xc is not stack'd, malloc'd or (recently) free'd
==13876== 
==13876== 
==13876== Process terminating with default action of signal 11 (SIGSEGV)
==13876==  Access not within mapped region at address 0xC
==13876==    at 0x6ED0F30: xcb_glx_query_server_string_string_length (in /usr/lib64/libxcb-glx.so.0.0.0)
==13876==  If you believe this happened as a result of a stack
==13876==  overflow in your program's main thread (unlikely but
==13876==  possible), you can try to increase the size of the
==13876==  main thread stack using the --main-stacksize= flag.
==13876==  The main thread stack size used in this run was 8388608.
==13876== 
==13876== HEAP SUMMARY:
==13876==     in use at exit: 261,783 bytes in 1,419 blocks
==13876==   total heap usage: 2,852 allocs, 1,433 frees, 411,204 bytes allocated
==13876== 
==13876== LEAK SUMMARY:
==13876==    definitely lost: 0 bytes in 0 blocks
==13876==    indirectly lost: 0 bytes in 0 blocks
==13876==      possibly lost: 1,528 bytes in 22 blocks
==13876==    still reachable: 257,511 bytes in 1,373 blocks
==13876==                       of which reachable via heuristic:
==13876==                         length64           : 40 bytes in 1 blocks
==13876==                         newarray           : 1,552 bytes in 17 blocks
==13876==         suppressed: 0 bytes in 0 blocks
==13876== Rerun with --leak-check=full to see details of leaked memory
==13876== 
==13876== For counts of detected and suppressed errors, rerun with: -v
==13876== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault

@medicalwei
Copy link
Contributor

medicalwei commented Mar 11, 2018 via email

@khumarahn
Copy link
Author

Here is some more details. The issue appeared after a recent update, and I just noticed that it is not only with lxterminal (e.g. speedcrunch also). It is likely that lxterminal is not at fault... but what is?

GNU gdb (Gentoo 8.1 p1) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from lxterminal...Reading symbols from /usr/lib/debug//usr/bin/lxterminal.debug...done.
done.
(gdb) run
Starting program: /usr/bin/lxterminal 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
xcb_glx_query_server_string_string_length (R=R@entry=0x0) at glx.c:1695
1695	}
(gdb) backtrace
#0  xcb_glx_query_server_string_string_length (R=R@entry=0x0) at glx.c:1695
#1  0x0000007fb5e4e224 in __glXQueryServerString (dpy=dpy@entry=0x556f7d87b0, opcode=<optimized out>, screen=screen@entry=0, name=name@entry=2) at /usr/src/debug/media-libs/mesa-17.3.6/mesa-17.3.6/src/glx/glx_query.c:55
#2  0x0000007fb5e4b7b0 in AllocAndFetchScreenConfigs (priv=0x556f7f3a60, dpy=0x556f7d87b0) at /usr/src/debug/media-libs/mesa-17.3.6/mesa-17.3.6/src/glx/glxext.c:808
#3  __glXInitialize (dpy=dpy@entry=0x556f7d87b0) at /usr/src/debug/media-libs/mesa-17.3.6/mesa-17.3.6/src/glx/glxext.c:946
#4  0x0000007fb5e467c8 in GetGLXPrivScreenConfig (dpy=dpy@entry=0x556f7d87b0, scrn=scrn@entry=0, ppriv=0x7fffffe500, ppriv@entry=0x7fffffe530, ppsc=0x7fffffe4f8, ppsc@entry=0x7fffffe528)
    at /usr/src/debug/media-libs/mesa-17.3.6/mesa-17.3.6/src/glx/glxcmds.c:174
#5  0x0000007fb5e470dc in glXQueryServerString (dpy=0x556f7d87b0, screen=0, name=2) at /usr/src/debug/media-libs/mesa-17.3.6/mesa-17.3.6/src/glx/glxcmds.c:1355
#6  0x0000007fb70f304c in epoxy_glx_version () from /usr/lib64/libepoxy.so.0
#7  0x0000007fb77d17c4 in ?? () from /usr/lib64/libgdk-3.so.0
#8  0x0000000000000043 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) quit
A debugging session is active.

	Inferior 1 [process 15270] will be killed.

Quit anyway? (y or n) y

@khumarahn
Copy link
Author

a better backtrace:

GNU gdb (Gentoo 8.1 p1) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from lxterminal...Reading symbols from /usr/lib/debug//usr/bin/lxterminal.debug...done.
done.
(gdb) run
Starting program: /usr/bin/lxterminal 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
xcb_glx_query_server_string_string_length (R=R@entry=0x0) at glx.c:1695
1695	}
(gdb) backtrace
#0  xcb_glx_query_server_string_string_length (R=R@entry=0x0) at glx.c:1695
#1  0x0000007fb5e4e224 in __glXQueryServerString (dpy=dpy@entry=0x557bdee7b0, opcode=<optimized out>, screen=screen@entry=0, name=name@entry=2) at /usr/src/debug/media-libs/mesa-17.3.6/mesa-17.3.6/src/glx/glx_query.c:55
#2  0x0000007fb5e4b7b0 in AllocAndFetchScreenConfigs (priv=0x557be09a60, dpy=0x557bdee7b0) at /usr/src/debug/media-libs/mesa-17.3.6/mesa-17.3.6/src/glx/glxext.c:808
#3  __glXInitialize (dpy=dpy@entry=0x557bdee7b0) at /usr/src/debug/media-libs/mesa-17.3.6/mesa-17.3.6/src/glx/glxext.c:946
#4  0x0000007fb5e467c8 in GetGLXPrivScreenConfig (dpy=dpy@entry=0x557bdee7b0, scrn=scrn@entry=0, ppriv=0x7fffffe500, ppriv@entry=0x7fffffe530, ppsc=0x7fffffe4f8, ppsc@entry=0x7fffffe528)
    at /usr/src/debug/media-libs/mesa-17.3.6/mesa-17.3.6/src/glx/glxcmds.c:174
#5  0x0000007fb5e470dc in glXQueryServerString (dpy=0x557bdee7b0, screen=0, name=2) at /usr/src/debug/media-libs/mesa-17.3.6/mesa-17.3.6/src/glx/glxcmds.c:1355
#6  0x0000007fb70f304c in epoxy_glx_version () from /usr/lib64/libepoxy.so.0
#7  0x0000007fb77d17c4 in gdk_x11_screen_init_gl (screen=screen@entry=0x557be00020) at /usr/src/debug/x11-libs/gtk+-3.22.26/gtk+-3.22.26/gdk/x11/gdkglcontext-x11.c:866
#8  0x0000007fb77d1b6c in _gdk_x11_screen_update_visuals_for_gl (screen=screen@entry=0x557be00020) at /usr/src/debug/x11-libs/gtk+-3.22.26/gtk+-3.22.26/gdk/x11/gdkglcontext-x11.c:1210
#9  0x0000007fb77daecc in _gdk_x11_screen_init_visuals (screen=screen@entry=0x557be00020) at /usr/src/debug/x11-libs/gtk+-3.22.26/gtk+-3.22.26/gdk/x11/gdkvisual-x11.c:309
#10 0x0000007fb77d7e90 in _gdk_x11_screen_new (display=display@entry=0x557bdfb0e0, screen_number=<optimized out>) at /usr/src/debug/x11-libs/gtk+-3.22.26/gtk+-3.22.26/gdk/x11/gdkscreen-x11.c:939
#11 0x0000007fb77c6f4c in _gdk_x11_display_open (display_name=<optimized out>) at /usr/src/debug/x11-libs/gtk+-3.22.26/gtk+-3.22.26/gdk/x11/gdkdisplay-x11.c:1603
#12 0x0000007fb7798034 in gdk_display_manager_open_display (manager=<optimized out>, name=0x0) at /usr/src/debug/x11-libs/gtk+-3.22.26/gtk+-3.22.26/gdk/gdkdisplaymanager.c:472
#13 0x0000007fb7a79454 in gtk_init_check (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/x11-libs/gtk+-3.22.26/gtk+-3.22.26/gtk/gtkmain.c:1103
#14 0x0000007fb7a79490 in gtk_init (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/x11-libs/gtk+-3.22.26/gtk+-3.22.26/gtk/gtkmain.c:1160
#15 0x000000557bd8a434 in main (argc=<optimized out>, argv=<optimized out>) at lxterminal.c:1720
(gdb) frame 15
#15 0x000000557bd8a434 in main (argc=<optimized out>, argv=<optimized out>) at lxterminal.c:1720
1720	    gtk_init(&argc, &argv);
(gdb) quit
A debugging session is active.

	Inferior 1 [process 24811] will be killed.

Quit anyway? (y or n) y

@medicalwei
Copy link
Contributor

medicalwei commented Mar 12, 2018 via email

@khumarahn
Copy link
Author

I am on Olimex Teres 1 laptop, it has Allwinner A64 processor. I am restricted to the 3.10 kernel, and the graphics is fbturbo.

@khumarahn
Copy link
Author

khumarahn commented Mar 12, 2018

After such a long search, I found the cause of the problem. This is the gentoo bug
https://bugs.gentoo.org/486712

They removed the symlink /usr/lib -> /usr/lib64 and this broke the selection of the opengl renderer.

The problem has nothing to do with lxterminal, sorry to bother you with this. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants