-
Notifications
You must be signed in to change notification settings - Fork 970
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
VNC extension not initialised on Xorg server regeneration #5
Comments
Have you tried completely backing out fc23895? Your upstream bug also references another bug, where this change supposedly originated. Unfortunately that second bug is restricted. Could you open it up so we can see the reason for the change? |
Completely backing out fc23895 shows up the reason for the original change: once the server regenerates, it gets stuck in a loop here:
...which is this loop:
The trouble is that rfb::Configuration has an element whose next element is itself, and that happens at this point:
I hope to make the bug describing this public soon (making sure there are no objections), but those are the details from it. |
https://bugzilla.redhat.com/show_bug.cgi?id=1004093 is public now. |
Moving the 'once' guard so that only rfb::Configuration::enableServerParams() is guarded improves the situation a bit, but now it looks like the InputDevices need re-initialisation. Everything works as expected when closing xterm and starting a new xterm, except for the occasional segfault like:
|
Looking at the code, it looks like everything except As for the input devices, it does indeed look suspect. I have not experienced any crashes with Xvnc though, which should suffer from the same issue. I'll have to investigate and see how it is best solved. |
Aha. Xvnc has a hack that prevents server resets: static void vfbClientStateChange(CallbackListPtr*, pointer, pointer) {
dispatchException &= ~DE_RESET;
} Should probably remove that. If nothing else so that it behaves the same as libvnc.so. |
I'm thinking that maybe all the VNC stuff should also reset as part of the server reset. Two problems though: a) It will disconnect any VNC clients. Probably not what you want. Maybe delay the reset until there are truly no clients, X11 nor VNC. The Xorg code is not really designed for this though, so it would have to be a bit hacky. b) It won't avoid the crashes just by doing that. The extensions are removed after the input devices, which means that there might still be an event or two that fires as we clean things up. |
Can you test the patch in pull request #6 and see if it solves the issue with the input devices not getting reset? (Please don't use the patch for anything permanent though. I'll clean it up once I know it actually solves your issue.) |
That works well for me. I'm testing with: fc23895 reverted; an if(!once) guard only around rfb::configuration::enableServerParams(); and your changes in the inputreset branch. |
I've updated #6. Could you retest? I've included the fix for the whole |
This works well for me. Thanks! (Sorry, added that comment to the pull request instead of here.) |
In tigervnc 1.3.0, with the extension module configured, the VNC extension is lost on server regeneration.
Here's how to demonstrate the problem:
1.Boot to text mode so no X server is running
2.Xorg &
3.DISPLAY=:0 xterm &
4.In the xterm, check the extension is loaded: xdpyinfo | grep VNC
5.Also, from another system, try connecting a vncviewer
6.Now exit the xterm
7.Repeat steps 3-5
The second time xdpyinfo is run, VNC-EXTENSION is not listed.
The second time a vncviewer is run, it connects but just sits there and does not negotiate encodings.
I think it's due to the 'static char once' guard in vncExtensionInitWithParams() in xf86vncModule.cc, introduced in commit fc23895:
Author: Adam Tkac [email protected]
Date: Thu Mar 14 17:52:53 2013 +0000
Setting a breakpoint on that function and manually invoking vncExtensionInit() causes xdpyinfo to list VNC-EXTENSION again, but vncviewer still has trouble connecting so it isn't as simple as that.
Original report:
https://bugzilla.redhat.com/show_bug.cgi?id=1116956
The text was updated successfully, but these errors were encountered: