guake icon indicating copy to clipboard operation
guake copied to clipboard

Core Dump When Starting Guake 3.8.0

Open LunaGNUisance opened this issue 4 years ago • 22 comments

When launching Guake, it will load for 20+ seconds, and nothing will happen. Upon trying to open Guake again, the screen freezes and GNOME core dumps for a few seconds, and then the application opens. This only happens on Guake 3.8.0 and not the previous version.

Expected behavior

When opening Guake, it opens without GNOME core dumping.

Actual behavior

Guake takes a long time to open and only opens after GNOME core dumps.

To Reproduce

Open Guake on GNOME. I was able to reproduce this behavior on three different Arch Linux GNOME machines. On the third machine, something slightly different happens; it kicks me out to the display manager, and I have to login again, and then try to open Guake again. It may or may not work the second or third time.

Other Details

I have Guake set to autostart on login, and I have guake-toggle set to a keybinding that I use to bring up Guake. Looking at journalctl, there are many lines of "Could not resolve keysm" after GNOME core dumps.

Guake behaves as normal after managing to get into the application. Additionally, on two of the machines with the exact same behavior, I have the AppIndicator extension installed, and when launching Guake, the Guake icon in the system tray is black until it core dumps. Not sure how relevant that is, but it's consistent behavior.


$ guake --support

Guake Version: 3.8.0

Vte Version: 0.66.0

Vte Runtime Version: 0.66.0


GTK+ Version: 3.24.30

GDK Backend: <GdkX11.X11Display


Desktop Session: gnome-xorg


Display: :1

RGBA visual: True

Composited: True

  • Monitor: 0 - NCP eDP1
    • Geometry: 1920 x 1080 at 0, 0
    • Size: 340 x 190 mm²
    • Primary: True
    • Refresh rate: 120.035 Hz
    • Subpixel layout: unknown

LunaGNUisance avatar Oct 25 '21 03:10 LunaGNUisance

Is it possible to attach your coredump here or via email? Or you may print out the coredump backtrace for us, it will help a lot for us to debug this issue.

mlouielu avatar Oct 25 '21 03:10 mlouielu

Is it possible to attach your coredump here or via email? Or you may print out the coredump backtrace for us, it will help a lot for us to debug this issue.

Let me know if there's a particular command you want me to run. I've attached an extract to this comment that was generated using journalctl -p 3. guake-coredump-log.txt

LunaGNUisance avatar Oct 25 '21 06:10 LunaGNUisance

If run from terminal have no issue, get this output:

Guake not running, starting it
Loading Gnome schema from: /usr/share/glib-2.0/schemas
Language previously loaded from: /usr/share/locale
Guake Terminal 3.8.1
VTE 0.66.0
Gtk 3.24.30
created fresh notebook for workspace 0
Spawning new terminal at /home/vantu5z

(guake:47377): VTE-WARNING **: 16:43:51.301: (../vte/src/vtepty.cc:667):bool _vte_pty_spawn_sync(VtePty*, const char*, const char* const*, const char* const*, GSpawnFlags, GSpawnChildSetupFunc, gpointer, GDestroyNotify, GPid*, int, GCancellable*, GError**): runtime check failed: ((spawn_flags & ignored_spawn_flags()) == 0)
current workspace is 0
can't bind show-focus key
Guake initialized

Found that Vte.Terminal.spawn_sync() deprecated and Vte.Terminal.spawn_async() should be used instead.

vantu5z avatar Oct 26 '21 13:10 vantu5z

Playing around with moving to async was actually already happening on a local branch I have, but it's still very broken and needs work

Davidy22 avatar Oct 26 '21 14:10 Davidy22

VTE-WARNING can be fixed by removing ignored flag, as documentation says: Note that GLib.SpawnFlags.DO_NOT_REAP_CHILD will always be added to spawn_flags

terminal.py   (line 572)

-GLib.SpawnFlags(Vte.SPAWN_NO_PARENT_ENVV | GLib.SpawnFlags.DO_NOT_REAP_CHILD),
+GLib.SpawnFlags(Vte.SPAWN_NO_PARENT_ENVV),

vantu5z avatar Oct 27 '21 05:10 vantu5z

Have this message (journalctl -f) on show Guake and nothing for hide: gnome-shell[63949]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x260000c

vantu5z avatar Oct 27 '21 07:10 vantu5z

Difference of envv variable passed to spawn_sync: Run from terminal:

"SHLVL=1"
"GSETTINGS_SCHEMA_DIR=/home/vantu5z/data"
"VTE_VERSION=6600"
"GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/4429569c_c180_49b1_bbc7_43634fc3f22d"
"GNOME_TERMINAL_SERVICE=:1.75"
"_=/usr/bin/guake"

Run by desktop file:

"SHLVL=0"
"DESKTOP_STARTUP_ID=gnome-shell/Терминал Guake/73925-1-vantu5zbook_TIME69845480"
"GJS_DEBUG_TOPICS=JS ERROR;JS LOG"
"INVOCATION_ID=a2ec9a3468734a17aa4246e2f0e2d78f"
"MANAGERPID=991"
"GJS_DEBUG_OUTPUT=stderr"
"JOURNAL_STREAM=8:276478"
"GIO_LAUNCHED_DESKTOP_FILE_PID=74478"
"GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/guake.desktop"

vantu5z avatar Oct 27 '21 10:10 vantu5z

Oh, I didn't remove the don't reap child flag when I was adding the other one but that'll be a nice little cleanup.

_NET_ACTIVE_WINDOW issue is a known different issue at #1857, I did a quick search up for solutions and put it aside at the time.

Environment variables are passed in by taking parent env variables, modifying one or two, then passing in manually with the SPAWN_NO_PARENT_ENVV flag. You should find that envv when launched from the terminal reflect your terminal's env, while the one from desktop should reflect the environment of things run from the desktop

Davidy22 avatar Oct 27 '21 10:10 Davidy22

I give up.. Have no ideas and can't find place where it crash Shell. While debuging found that settings.get_string(key) can return empty string, so check should be:

keybindings.py

    def reload_global(self, settings, key, user_data):
        value = settings.get_string(key)
-        if value == "disabled":
+        if not value or value == "disabled":
            return

Also I don't know why it works if run from terminal and don't if run by desktop file. Maybe we should add something to desktop file?

And I don't see crash on autorun on boot (use X11 with LightDM).

vantu5z avatar Oct 27 '21 12:10 vantu5z

I figured out what the cause was.

I have a variant of this added as a hook for Guake on all of my GNOME computers:

guake --execute=cu

I have cu set as a bash alias for checkupdates, which is a script that is part of pacman-contrib which will check my mirrorlist for package updates. I have this set on all of my GNOME machines.

I removed it for all 3 computers and it no longer core dumps on startup. Sorry; I really should have figured that out sooner...

LunaGNUisance avatar Nov 05 '21 03:11 LunaGNUisance

@LunaGNUisance do you have issue if restart Guake?

vantu5z avatar Nov 05 '21 11:11 vantu5z

@vantu5z It core dumps upon restart, but not the first time; I have it set to autostart on login.

LunaGNUisance avatar Nov 05 '21 14:11 LunaGNUisance

Since this was apparently a local config issue, closing.

Davidy22 avatar Nov 06 '21 15:11 Davidy22

This issue is not solved. And reason is not detected. Guake crash gnome-shell on hiding if it started manualy.

vantu5z avatar Nov 06 '21 18:11 vantu5z

I don't think that checkupdates is causing GNOME to core dump; I think that something about the process of Guake attempting to run this hook on startup causes it to core dump. I've also observed behavior where, even if it starts up fine with autostart, if I right click > Preferences, it will core dump.

LunaGNUisance avatar Nov 07 '21 05:11 LunaGNUisance

Alright, I'll try adding a command to my guake startup and get back on what I notice

Davidy22 avatar Nov 10 '21 08:11 Davidy22

Update after using gnome shell for a good while, I did experience some difficulty getting Guake to open on startup when adding it to the startup applications list on gnome tweak tool, but the start guake at login checkbox in Guake's preferences worked for me. Does this also resolve it for you?

Davidy22 avatar Jan 18 '22 03:01 Davidy22

Update after using gnome shell for a good while, I did experience some difficulty getting Guake to open on startup when adding it to the startup applications list on gnome tweak tool, but the start guake at login checkbox in Guake's preferences worked for me. Does this also resolve it for you?

I'm not sure how related this is to the original issue, but on some systems I had difficulty adding it to Startup Applications with GNOME Tweaks, but yes checking "Start Guake at Login" in its preferences worked fine.

I stopped adding any hooks upon startup a few days after posting this issue so I don't know if it's been resolved. At my first opportunity, I'll add the checkupdates script as a hook and try some other programs/scripts to see if it's that particular script.

LunaGNUisance avatar Jan 18 '22 05:01 LunaGNUisance

I can't get hooks to work at all now. I tried various strings in Hooks > On start:

checkupdates, ls, newsboat but couldn't get anything to display in the terminal window. Adding newsboat caused the application to hang and not start at all, so I ended up force-ending it, while using ls didn't impact ability to startup but wrote nothing to standard output.

Guake seems to startup fine if you just don't add any hooks.

LunaGNUisance avatar Jan 19 '22 07:01 LunaGNUisance

I don't have newsboat and it looks like there's some setup to it so I didn't use that but I tested touch a and it looks like a file is being created, but programs that display something like ls aren't showing anything for me either. This probably gets me closer to figuring out what's wrong.

Davidy22 avatar Jan 19 '22 11:01 Davidy22

newsboat is actually very simple to setup. All you need to do is create the file ~/.newsboat/urls and then put a link to an RSS feed you want to get news from on each line (e.g. https://blog.mojeek.com/atom.xml). But I'm not sure how suitable it is to being a hook for Guake; I just wanted something relatively complex to test to see how Guake handled it as a hook.

touch nameoffile seems to work for me too, but I can't get it to write anything to standard output with ls, for example.

LunaGNUisance avatar Jan 22 '22 04:01 LunaGNUisance

Ok, so it must have been getting buried because I normally use --verbose to run guake when I'm testing, but I found where the standard output of guake hooks are going, they go to the place that Guake is called, not the current guake terminal. Looks like the feature's just for silent scripts, if desired though I could see if I can get a command autofilled into the current terminal

Davidy22 avatar Jan 24 '22 15:01 Davidy22