-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
tigervnc: a working runit service for the tigervnc vncserver cannot be written #45522
Comments
As @ahesford says here: Void will not accept the patch to not daemonize vncsession until upstream accepts it. Therefore, this issue cannot be fixed without help from upstream, and upstream seems not interested in supporting systems like Void that do not use a Type=forking systemd service. For example, see the comment of an upstream developer here about non-systemd systems: TigerVNC/tigervnc#1443 (comment) and this comment of the same upstream developer which places the burden on downstreams like Void to adjust the upstream TigerVNC server to work with non-systemd service managers that downstreams might use: TigerVNC/tigervnc#1443 (comment) This makes it difficult to use the TigerVNC server on Void in a manner that upstream intends, because AFAICT Void does not currently have a way to port a Type=forking systemd service to runit, and upstream is not willing to do the work of supporting non-systemd system managers like runit on Void. So what is the solution for the problem of porting an upstream component like vncsession that forks and is therefore not compatible with Void's runit system? Do we just say we cannot use that upstream component in the official Void packages? |
I don't see why upstream wouldn't accept a simple "don't daemonize" flag, which carries essentially no maintenance burden on them, doesn't involve ensuring that it works with any supervisor, and would generally be useful for debugging anyway. |
Well, I guess we can wait and see if they review the PR I submitted upstream in which I point out there is not much much cost to adding the flag. So far, they have ignored the PR, and their comments about supporting non-systemd systems are not encouraging. Essentially, upstream is saying, "it's not our bug, it is downstream's bug if downstream can't use a systemd Type=forking service." |
Your entire issue is predicated on a failure to understand the behavior of runsv and an inability to make "an appropriate runit service" (which Void does not provide) control a daemonizing process. This is not a bug. |
The issue was predicated on the fact that no one told me, until now, that Void has a strict policy requirement that runit services must run in the foreground. Not just that it is expected, |
You seem incapable of distinguishing "policy" from "design requirements". The operation of Your service is broken because the |
Is this a new report?
Yes
System Info
Void 6.3.13_1 x86_64-musl GenuineIntel/VM notuptodate rFFF (I am not sure why this is reporting notuptodate)
Package(s) Affected
tigervnc-1.12.0_1
Does a report exist for this bug with the project's home (upstream) and/or another distro?
TigerVNC/tigervnc#1649
TigerVNC/tigervnc#1651
Expected behaviour
The package is supposed to be able to configure a vncserver service on Xvnc displays configured in /etc/tigervnc/vncserver.users on an ordinarily configured Void installation. It is expected that the service will start and run correctly after enabling it, allowing the user or users configured in /etc/tigervnc/vncserver.users to connect to the tigervnc server for a remote session.
Actual behaviour
The service starts and stops immediately in an endless loop (every second I think) unless the down file is added to the service directory. And even with the down file, the service will not start with the 'sv once vncserver' command (assuming the runit service directory is named vncserver) but instead exits without successfully starting. Details of the causes of these problems follow...
The first error in the log (presuming sockog is configured according to the handbook) is:
2023-08-10T14:30:22.21984 auth.crit: Aug 10 14:30:22 vncsession[1311]: pam_open_session failed: 28 (Module is unknown)
This error appears in the /var/log/socklog/secure/current logfile with the default socklog configuration.
After fixing the PAM configuration, the service still fails with a different error, also in the /var/log/socklog/secure/current logfile:
2023-08-10T14:50:30.43823 auth.warn: Aug 10 14:50:30 vncsession[2384]: vncsession: vncserver exited with status=2
This error is caused by the fact that upstream expects an Xsession wrapper script to be at /etc/X11/xinit/Xsession or /etc/X11/Xsession but a typical Void installation lacks those files. Other major distros such as Debian and Fedora have such files, but not Void.
This can be fixed by patching the vncserver perl script provided by upstream so it can find an appropriate Xsession wrapper script on Void.
After fixing the Xsession wrapper script, there is the third problem: The vncsession binary provided by upstream forks, detaches, and runs in the background without providing an option (not even a debug option) to run in the foreground, and this is totally incompatible with Void's runit system. This is also the cause of the endless loop of stop and start without having the down file in the service directory. This can be fixed by patching the vncession.c file in the upstream source so it runs in the foreground. That is what the above mentioned pull request to the upstream project does, but so far the upstream project has not responded in any way to the PR.
A PR has also been submitted to void-packages to fix all these issues and update the package to version 1.13.1:
#45307
Steps to reproduce
exec /usr/libexec/vncsession-start "${DISPLAY:-:1}"
Otherwise, you will need to use the ugly hack using fghack provided by the daemontools package:
exec fghack /usr/libexec/vncsession-start "${DISPLAY:-:1}"
The text was updated successfully, but these errors were encountered: