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

Segmentation fault (core dumped) Fedora 29 SwayWM #768

Closed
GeoDerp opened this issue Jan 26, 2019 · 6 comments
Closed

Segmentation fault (core dumped) Fedora 29 SwayWM #768

GeoDerp opened this issue Jan 26, 2019 · 6 comments

Comments

@GeoDerp
Copy link

GeoDerp commented Jan 26, 2019

Source

Compiled and https://download.opensuse.org/repositories/home:manuelschneid3r/Fedora_29/home:manuelschneid3r.repo (tried both)

Environment

  Albert version: 0.16.1
            Build date: Jan 26 2019 15:31:13
            Qt version: 5.11.3
  QT_QPA_PLATFORMTHEME: 
       Binary location: /usr/bin/albert
                   PWD: /home/geo
                 SHELL: /bin/bash
                  LANG: en_AU.UTF-8
      XDG_SESSION_TYPE: wayland
   XDG_CURRENT_DESKTOP: 
       DESKTOP_SESSION: sway
   XDG_SESSION_DESKTOP: sway
                    OS: Fedora 29 (Workstation Edition)
     OS (type/version): fedora/29
             Build ABI: x86_64-little_endian-lp64
  Arch (build/current): x86_64/x86_64
 Kernel (type/version): linux/4.20.3-200.fc29.x86_64 
\S
Kernel \r on an \m (\l)
4.20.3-200.fc29.x86_64
DESKTOP_SESSION=sway
XDG_SESSION_TYPE=wayland
XDG_SESSION_DESKTOP=sway
QMake version 3.1
Using Qt version 5.11.3 in /usr/lib64
albert 0.16.1

Steps to reproduce

Fedora 29 Workstation
Sway WM

mkdir Albert
  cd Albert
  sudo dnf install python3-devel qt5-qtx11extras-devel qt5-qtsvg-devel muParser-devel libqalculate-devel qt5-qtcharts-devel qt5-qtwayland-devel -y
  git clone --recursive https://github.com/albertlauncher/albert.git
  mkdir albert-build
  cd albert-build
  cmake ../albert -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug

Expected behaviour

No Segmentation fault's

Actual behaviour

17:16:16 [INFO:default] Systems icon theme is: "hicolor"
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
17:16:16 [WARN:default] Application has not been terminated graciously.
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
17:16:17 [INFO:default] Loading extension "org.albert.extension.applications"
[New Thread 0x7fffe6270700 (LWP 3397)]
17:16:17 [INFO:applications] Start indexing applications.
17:16:17 [INFO:default] Loading extension "org.albert.extension.chromebookmarks"
[New Thread 0x7fffe5a2a700 (LWP 3398)]
17:16:17 [INFO:default] Start indexing Chrome bookmarks.
17:16:17 [INFO:default] Loading extension "org.albert.extension.system"
17:16:17 [INFO:default] Loading extension "org.albert.extension.terminal"
17:16:17 [INFO:default] Loading extension "org.albert.extension.websearch"

Error Codes from dgb bt

#0  0x00007ffff7a57aa1 in _XSend (dpy=dpy@entry=0x51db30, data=data@entry=0x0, size=size@entry=0) at xcb_io.c:464
#1  0x00007ffff7a57f24 in _XFlush (dpy=0x51db30) at xcb_io.c:516
#2  0x00007ffff7a5aafd in _XGetRequest (dpy=dpy@entry=0x51db30, type=type@entry=119 'w', len=len@entry=4) at XlibInt.c:1717
#3  0x00007ffff7a46701 in XGetModifierMapping (dpy=0x51db30) at ModMap.c:42
#4  0x00000000004a732f in GlobalShortcut::HotkeyManagerPrivate::HotkeyManagerPrivate (this=0x61d920, parent=0x0)
    at /home/geo/Albert/albert/lib/globalshortcut/src/hotkeymanager_x11.cpp:394
#5  0x00000000004a6282 in GlobalShortcut::HotkeyManager::HotkeyManager (this=0x576f20, parent=0x0)
    at /home/geo/Albert/albert/lib/globalshortcut/src/hotkeymanager.cpp:14
#6  0x0000000000473cf4 in main (argc=1, argv=0x7fffffffdfe8) at /home/geo/Albert/albert/src/app/main.cpp:329

Note: I started with the rebo and it worked fine untill I installed qt5-qtwayland-devel to fix

[WARN:qt.qpa.plugin] Could not find the Qt platform plugin "wayland" in "" error and got the Segmentation error. Now even with qt5-qtwayland-devel uninstalled I get the same error :(

Tried setting QT_QPA_PLATFORM="" environment variable and still no luck.

@ManuelSchneid3r
Copy link
Member

Do the prebuild binaries have the same problem? Have you tried to unset QT_QPA_PLATFORM?

@GeoDerp
Copy link
Author

GeoDerp commented Feb 1, 2019

Do the prebuild binaries have the same problem? Have you tried to unset QT_QPA_PLATFORM?

I'm pretty sure. Sorry for the reply late reply, have been creating an VM to troubleshoot this issue.
(Will re test the prebuild binaries when I get the vm up and running)

Mean while, I have been digging into gdm and this seems to be core of the bug:

(gdb) frame 1
#1  0x00007ffff7a57f24 in _XFlush (dpy=0x51db30) at xcb_io.c:516
516             _XSend(dpy, NULL, 0);
(gdb) list
511      * action is taken.
512      */
513     void _XFlush(Display *dpy)
514     {
515             require_socket(dpy);
516             _XSend(dpy, NULL, 0);
517
518             _XEventsQueued(dpy, QueuedAfterReading);
519     }
520
(gdb) frame 0
#0  0x00007ffff7a57aa1 in _XSend (dpy=dpy@entry=0x51db30, data=data@entry=0x0, size=size@entry=0) at xcb_io.c:464
464             if(dpy->bufptr == dpy->buffer && !size)
(gdb) list
459             _XExtension *ext;
460             xcb_connection_t *c = dpy->xcb->connection;
461             if(dpy->flags & XlibDisplayIOError)
462                     return;
463
464             if(dpy->bufptr == dpy->buffer && !size)
465                     return;
466
467             /* append_pending_request does not alter the dpy request number
468              * therefore we can get it outside of the loop and the if
(gdb) dpy->buffer
Undefined command: "dpy->buffer".  Try "help".
(gdb) p dpy->buffer
$7 = 0x1 <error: Cannot access memory at address 0x1>
(gdb) p dpy
$8 = (Display *) 0x51db30

(Hope that helps)

@Synthetica9
Copy link

Happens to me too (NixOS), but doesn't happen when setting QT_QPA_PLATFORM="xcb".

Ran with AddresssSanitizer:

...
15:34:35 [DEBG:applications] Indexing desktop file: screenkey.desktop
15:34:35 [DEBG:default] org.albert.extension.system loaded in 114 milliseconds
15:34:35 [INFO:default] Loading extension "org.albert.extension.terminal"
15:34:35 [DEBG:default] org.albert.extension.terminal loaded in 0 milliseconds
15:34:35 [INFO:default] Loading extension "org.albert.extension.websearch"
15:34:35 [DEBG:default] Indexing executables in $PATH.
15:34:35 [DEBG:default] org.albert.extension.websearch loaded in 1 milliseconds
ASAN:DEADLYSIGNAL
=================================================================
==5614==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f34bffebaf9 bp 0x60e000151050 sp 0x7ffd37af1b10 T0)
==5614==The signal is caused by a READ memory access.
==5614==Hint: address points to the zero page.
15:34:35 [DEBG:applications] Indexing desktop file: shutter.desktop
15:34:35 [DEBG:applications] Indexing desktop file: spotify.desktop
15:34:35 [DEBG:applications] Indexing desktop file: startcenter.desktop
15:34:35 [DEBG:default] Finished indexing executables in $PATH.
15:34:35 [DEBG:applications] Indexing desktop file: steam.desktop
    #0 0x7f34bffebaf8 in XGetModifierMapping (/nix/store/4zcd8bkx7kyhs6ccnbrh9bgys8sbp6qy-libX11-1.6.7/lib/libX11.so.6+0x34af8)
    #1 0x4ef6ea in GlobalShortcut::HotkeyManagerPrivate::HotkeyManagerPrivate(QObject*) (/nix/store/lip01wp9y7ylsgqz4s5sbggwlah4wilj-albert-0.16.1/bin/.albert-wrapped+0x4ef6ea)
    #2 0x4edbc9 in GlobalShortcut::HotkeyManager::HotkeyManager(QObject*) (/nix/store/lip01wp9y7ylsgqz4s5sbggwlah4wilj-albert-0.16.1/bin/.albert-wrapped+0x4edbc9)
    #3 0x42c994 in main (/nix/store/lip01wp9y7ylsgqz4s5sbggwlah4wilj-albert-0.16.1/bin/.albert-wrapped+0x42c994)
    #4 0x7f34bdb78b5d in __libc_start_main (/nix/store/fivq0nbggp4y8mhy3ixprqd7qyn1hy2j-glibc-2.27/lib/libc.so.6+0x21b5d)
    #5 0x4550a9 in _start (/nix/store/lip01wp9y7ylsgqz4s5sbggwlah4wilj-albert-0.16.1/bin/.albert-wrapped+0x4550a9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/nix/store/4zcd8bkx7kyhs6ccnbrh9bgys8sbp6qy-libX11-1.6.7/lib/libX11.so.6+0x34af8) in XGetModifierMapping
==5614==ABORTING

@GeoDerp
Copy link
Author

GeoDerp commented Feb 18, 2019

When Setting:

QT_QPA_PLATFORM="xcb"

I came to this error:

00:12:45 [INFO:default] Systems icon theme is: "hicolor"
00:12:45 [WARN:default] Application has not been terminated graciously.
00:12:45 [INFO:default] Loading extension "org.albert.extension.applications"
00:12:45 [INFO:applications] Start indexing applications.
00:12:45 [INFO:default] Loading extension "org.albert.extension.chromebookmarks"
00:12:45 [INFO:default] Start indexing Chrome bookmarks.
00:12:45 [INFO:default] Loading extension "org.albert.extension.system"
00:12:46 [WARN:default] QFSFileEngine::open: No file name specified
00:12:46 [WARN:default] Could not open Chrome bookmarks file ''.
00:12:46 [INFO:default] Loading extension "org.albert.extension.terminal"
00:12:46 [INFO:default] Loading extension "org.albert.extension.websearch"
free(): invalid next size (fast)
Aborted (core dumped)

core dumped

Gdb
#0 main (argc=1, argv=0x7fffffffdfa8) at /home/geo/Albert/albert/src/app/main.cpp:57 57 in /home/geo/Albert/albert/src/app/main.cpp

@GeoDerp GeoDerp closed this as completed Feb 24, 2019
@GeoDerp GeoDerp reopened this Feb 24, 2019
@GeoDerp
Copy link
Author

GeoDerp commented Mar 8, 2019

Update: for some reason its working in QT_QPA_PLATFORM="xcb" now? I don't know how but it is. of course that means its running in xwayland so the problem isn't solved but i'm pretty shore you already know that so ill close the issue :) .

@GeoDerp GeoDerp closed this as completed Mar 8, 2019
@albertlauncher albertlauncher locked and limited conversation to collaborators Dec 7, 2020
@ManuelSchneid3r
Copy link
Member

Continue discussion at #958.

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

No branches or pull requests

3 participants