unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Patrick Nicodemus <gadget142@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 73110@debbugs.gnu.org
Subject: bug#73110: 29.4; emacs.service failed with result 'timeout'
Date: Sun, 13 Oct 2024 22:05:01 +0300	[thread overview]
Message-ID: <26443.0871162162$1728846908@news.gmane.org> (raw)
In-Reply-To: <CADZEZBb+=sXQkDw_XBat8GN17yaeSPQfEYAH3DvDub7Nws=jBA@mail.gmail.com> (Patrick Nicodemus's message of "Sun, 13 Oct 2024 11:43:06 -0400")

Patrick Nicodemus <gadget142@gmail.com> writes:

> Neither Eli or I proposed supporting this use case (using systemd as a
> service without compiling with support for libsystemd)

I didn't mean to say literally supporting but more like if there's a bug
from such a use case than it shouldn't be worth investing time in.

> I think it's perfectly valid to ask the user to compile Emacs with
> libsystemd support for this to work. Thus, this is a documentation bug.

Now looking at the service again made find the issue I think.
The service uses 'Type=notify' which means that Emacs has to tell
systemd that it is ready.

To quote systemd.service(5):

> Behavior of notify is similar to exec; however, it is
> expected that the service sends a "READY=1" notification
> message via sd_notify(3) or an equivalent call when it has
> finished starting up. systemd will proceed with starting
> follow-up units after this notification message has been
> sent. If this option is used, NotifyAccess= (see below)
> should be set to open access to the notification socket
> provided by systemd. If NotifyAccess= is missing or set to
> none, it will be forcibly set to main.

> Systemd is able to manage many programs on my computer without them being
> compiled with a special support for libsystemd, so I do not expect to
> require a special additional library to get Emacs to work if the
> documentation does not mention it.

It is able to but if a program opts into systemd features such
as notify it has to also support them.

> Chapter 40 of the manual does not indicate that running Emacs as a server
> is special non-core functionality, therefore as a user I assume that if
> this functionality is not working then it is broken, not that I
> misconfigured it at compile time. If this is supposed to be core
> functionality then the build should fail loudly if the dependencies are not
> found at compile time unless the user supplies the --without-libsystemd
> flag.

The service file would have to use another Type such as 'exec'
if not compiled with libsystemd support enabled during build.

>
> On Sun, Oct 13, 2024, 7:26 AM Björn Bidar <bjorn.bidar@thaodan.de> wrote:
>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> >> From: Patrick Nicodemus <gadget142@gmail.com>
>> >> Date: Sat, 7 Sep 2024 13:22:30 -0400
>> >>
>> >> I want to run Emacs as a service and connect to it with a client. I
>> >> followed the instructions here:
>> >>
>> >>
>> https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html
>> >>
>> >> and ran the command
>> >> systemctl --user enable emacs
>> >>
>> >> This apparently creates a file at
>> >> ~/.config/systemd/user/default.target.wants/emacs.service
>> >> For some reason emacs is not successfully communicating to systemd that
>> >> it has launched successfully, and so systemd terminates emacs.
>> >
>> > According to this:
>> >
>> >> Configured features:
>> >> ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ
>> >> IMAGEMAGICK JPEG JSON LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP
>> >> NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
>> >> TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM XWIDGETS GTK3 ZLIB
>> >
>> > your Emacs is built without libsystemd support, which I think is
>> > required for this to work?  Or maybe I'm missing something.
>>
>> I don't know exactly if libsystemd is required for the service to work,
>> I think it shouldn't however, but why?
>> Why would use the systemd user service but also not built with
>> libsystemd?
>> Even if there's something wrong why support such as usecase?
>>


PS: I'm not sure about if there's a netiquette on this list but
top-posting and HTML mails are usually frowned upon. 





      reply	other threads:[~2024-10-13 19:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07 17:22 bug#73110: 29.4; emacs.service failed with result 'timeout' Patrick Nicodemus
2024-09-07 17:45 ` Eli Zaretskii
2024-09-21  9:05   ` Eli Zaretskii
     [not found]     ` <CADZEZBaL7ktCnB6J6sBw-NXve0R1bS=dpZ3gtObh7hdL5=6Keg@mail.gmail.com>
2024-10-12 12:39       ` Eli Zaretskii
2024-10-13 11:26   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]   ` <670bae7e.a70a0220.3720fa.5d6fSMTPIN_ADDED_BROKEN@mx.google.com>
2024-10-13 15:43     ` Patrick Nicodemus
2024-10-13 19:05       ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='26443.0871162162$1728846908@news.gmane.org' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=73110@debbugs.gnu.org \
    --cc=bjorn.bidar@thaodan.de \
    --cc=eliz@gnu.org \
    --cc=gadget142@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).