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

Core Dump When Starting Guake 3.8.0 #1950

Open
LunaGNUisance opened this issue Oct 25, 2021 · 22 comments
Open

Core Dump When Starting Guake 3.8.0 #1950

LunaGNUisance opened this issue Oct 25, 2021 · 22 comments

Comments

@LunaGNUisance
Copy link

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
@mlouielu
Copy link
Collaborator

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.

@LunaGNUisance
Copy link
Author

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

@vantu5z
Copy link
Contributor

vantu5z commented Oct 26, 2021

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.

@Davidy22
Copy link
Collaborator

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

@vantu5z
Copy link
Contributor

vantu5z commented Oct 27, 2021

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
Copy link
Contributor

vantu5z commented Oct 27, 2021

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
Copy link
Contributor

vantu5z commented Oct 27, 2021

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"

@Davidy22
Copy link
Collaborator

Davidy22 commented Oct 27, 2021

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

@vantu5z
Copy link
Contributor

vantu5z commented Oct 27, 2021

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).

@LunaGNUisance
Copy link
Author

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...

@vantu5z
Copy link
Contributor

vantu5z commented Nov 5, 2021

@LunaGNUisance do you have issue if restart Guake?

@LunaGNUisance
Copy link
Author

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

@Davidy22
Copy link
Collaborator

Davidy22 commented Nov 6, 2021

Since this was apparently a local config issue, closing.

@Davidy22 Davidy22 closed this as completed Nov 6, 2021
@vantu5z
Copy link
Contributor

vantu5z commented Nov 6, 2021

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

@LunaGNUisance
Copy link
Author

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.

@Davidy22 Davidy22 reopened this Nov 10, 2021
@Davidy22
Copy link
Collaborator

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

@Davidy22
Copy link
Collaborator

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?

@LunaGNUisance
Copy link
Author

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
Copy link
Author

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.

@Davidy22
Copy link
Collaborator

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.

@LunaGNUisance
Copy link
Author

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.

@Davidy22
Copy link
Collaborator

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

c31io added a commit to c31io/guake that referenced this issue Jun 20, 2022
Davidy22 pushed a commit that referenced this issue Jun 20, 2022
PhungXuanAnh pushed a commit to PhungXuanAnh/guake that referenced this issue Oct 28, 2023
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

4 participants