Closed jorgy80236 closed 1 year ago
Have you tried to debug this with upstream yet?
Looking at the history of the formula the resources in it were updated a couple of times, it could be that one of the component updates broke your usage.
I don't have a way to test on the consoles of the KVM servers, as they are headless. However, running virt-manager on the servers and tunneling X11 through ssh to my mac, works on all servers. Are there other ways you'd like me to test?
I meant with the upstream developers. I guess with this particular tool that term can get confusing.
+1 this is also happening on my intel mac running Monterey.
+1 I can also confirm I see the same issue on my mac running Ventura 13.0.1.
Hmm this is tricky to track down given I don't have the means to test this.
This sounds like https://gitlab.gnome.org/GNOME/gtk-vnc/-/issues/17, but that issue was reported over a year ago and gtk-vnc has not been touched in as long. So if it is a new issue, then there must be something else that's triggering it.
But with that said I'm happy to apply the --with-coroutine=gthread
change to gtk-vnc if anyone can confirm it works. ucontext does seem to have been deprecated on macOS for a while now.
+1 on Monterey 12.6.1 w/ Intel
Please stop posting +1, it only hides debugging information. Instead write an issue for the developers of virt-manager and get them to help.
@Bo98 I confirm it's working using the --with-coroutine=gthread
on macOS: 12.6.2-x86_64
I edited the gtk-vnc.rb and change the install function :
def install
mkdir "build" do
# This is workaround. MacOS has deprecate coroutine ucontext.
# It needs to be fixed in gtk-vnc - use gthread coroutines.
on_macos do
system "meson", *std_meson_args, "-Dwith-coroutine=gthread", ".."
end
on_linux do
system "meson", *std_meson_args, "-Dwith-vala=disabled", ".."
end
system "ninja", "-v"
system "ninja", "install", "-v"
end
end
I'm relatively new to brew (former ports user). I haven't seen this update show up in my installation yet. I looked around for the gtk-vnc-rb and found two:
./Library/Taps/homebrew/homebrew-core/Formula/gtk-vnc.rb
./Cellar/gtk-vnc/1.3.1/.brew/gtk-vnc.rb
How do I make the change locally? Thank you.
You can do brew edit formula
As upstream maintainer of gtk-vnc
, I can confirm the ucontext
coroutine backend is completely broken. the macOS aarch64 impl of getcontext
writes outside the bounds of the struct ucontext_t
pointer it is given, smashing data in other GTK-VNC structs.
Please build with -Dwith-coroutine=gthread
on macOS aarch64 platforms.
I would also recommend running ninja test
as part of the formula, as that would have identified that the current build was broken from the start on M1.
Could you make that coroutine setting the default in your project? That would make sure everyone uses the correct setting and not just Homebrew.
Upstream, I'm aiming to try to make a sigaltstack based coroutine impl, since the gthread impl is quite high overhead. Either way the next release of gtk-vnc will do the right thing automatically. I don't have an ETA for the next release, so meanwhile homebrew needs to add that build flag for gthread to avoid being completely broken on M1.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This should be fixed now. You may need to do
brew update && brew reinstall gtk-vnc
to pick up the fix.
Please open a new issue if the above command does not fix it for you.
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
A couple of days ago, I did a
brew upgrade
and now virt-manager is failing when I connect to the console of remote KVM machines.What happened (include all command output)?
This is a fully patched Monterey Apple Silicon box running an up-to-date brew. When I start virt-manager, I get a new warning, but it seems to start okay.
However, when I try to pull up a guest on a remote host, it crashes trying to access the console. No error message on console is given. Here is the output from the macOS crash dialog:
https://gist.github.com/jorgy80236/08c37d8b4d4e9aa910dc9cdc6c44d557
It doesn't happen on every host I've tested, but reliably crashes on the ones that don't work.
Fedora Core 34 libvirt-7.0.0-8.fc34.x86_64 Crash: no
Rocky 8.6 libvirt-8.0.0-5.4.module+el8.6.0+1000+18e3b59f.x86_64 Crash: yes - used to work
Rocky 8.6 libvirt-8.0.0-5.5.module+el8.6.0+1052+ff61d164.x86_64 Crash: yes - used to work, and several servers on this rev all crash
It used to work everywhere, and it looks like there is something that has been introduced in the most recent virt-viewer brew update that doesn't like the version 8.0.0 of libvirt on the server. I will be pleased to furnish any more information required. Thanks,
jorgy
What did you expect to happen?
After starting brew-manager, and opening up a remote console, in the past I was able to interact with the console of the KVM guest. However now, the python app crashes and I'm presented with a macOS stack track (attached above).
Step-by-step reproduction instructions (by running
brew
commands)