You are not logged in.

#1 2013-01-03 14:51:31

Ambrevar
Member
Registered: 2011-08-14
Posts: 212
Website

[SOLVED] Slow shutdown with systemd when emacs daemon is running.

[Running an up to date Arch x86_64 with systemd]

Hi,

I'm used to running emacs as daemon: 'emacs --daemon'. However I noticed that systemd hangs for ~5 seconds on shutdown when emacs daemon has been started. I've tested this running nothing but the login shell.

I used the Free desktop Wiki to keep a trace during shutdown.

I diffed the two logs (whenever emacs daemon is launched or not).

With emacs daemon started, in the middle of the process:

systemd[1]: Received SIGCHLD from PID 731 (emacs).
systemd[1]: Got SIGCHLD for process 731 (emacs)
systemd[1]: Child 731 died (code=dumped, status=6/ABRT)

This is processed instantly according to the time log (I've removed it for better diff results).

Without emacs daemon started, at the very end:

systemd[1]: Shutting down.
systemd[1]: Hardware watchdog 'iTCO_wdt', version 0
systemd[1]: Set hardware watchdog to 10min.
watchdog watchdog0: watchdog did not stop!
systemd-journald[151]: Received SIGTERM
EXT4-fs (sda1): re-mounted. Opts: (null)
EXT4-fs (sda1): re-mounted. Opts: (null)
EXT4-fs (sda1): re-mounted. Opts: (null)
EXT4-fs (sda1): re-mounted. Opts: (null)
EXT4-fs (sda1): re-mounted. Opts: (null)
EXT4-fs (sda1): re-mounted. Opts: (null)

With emacs daemon started, there is no SIGTERM sent to systemd-journal, so the log is

systemd[1]: Shutting down.
systemd[1]: Hardware watchdog 'iTCO_wdt', version 0
systemd[1]: Set hardware watchdog to 10min.
watchdog watchdog0: watchdog did not stop!
EXT4-fs (sda1): re-mounted. Opts: (null)
EXT4-fs (sda1): re-mounted. Opts: (null)
EXT4-fs (sda1): re-mounted. Opts: (null)
EXT4-fs (sda1): re-mounted. Opts: (null)
EXT4-fs (sda1): re-mounted. Opts: (null)
EXT4-fs (sda1): re-mounted. Opts: (null)

It seems to hang where SIGTERM should be sent to systemd-journal.

On linux-lts, it does not happen, I mean when

  systemd[1]: Shutting down.

has been reached, system halts almost instantly.

However linux-lts is by far much slower for systemd boot up and systemd shutdown than with linux 3.6+. I'm curious to know why.

Any clue?

Thanks in advance.

Last edited by Ambrevar (2013-02-02 09:21:36)

Offline

#2 2013-02-02 09:21:00

Ambrevar
Member
Registered: 2011-08-14
Posts: 212
Website

Re: [SOLVED] Slow shutdown with systemd when emacs daemon is running.

I do not really know why, but problem seems to be gone. Maybe due to a systemd update, or the fact that now I'm using an 'em' script to start emacs deamon (see Arch Wiki / Emacs).

Offline

Board footer

Powered by FluxBB