unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / Atom feed
* Emacs Daemon --- Dies silently
@ 2021-01-13 21:13 T.V Raman
  2021-01-13 23:27 ` Daniel Brooks
  2021-01-14  3:26 ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: T.V Raman @ 2021-01-13 21:13 UTC (permalink / raw)
  To: emacs-devel

I've used an emacs that runs for weeks (if not months) on my
workstation --- even more  so since the pandemic forced us all to
remain home.

But in the lsat week, my Emacs daemon quietly dies when I close the
client. Note: it does not die when I hit C-x C-c to close the frame,
verified via ssh that the emacs process is still alive. However when i
log back in later, often, the emacs process has quietly
disappeared. Did something change with respect to emacs --daemon?

Also, starting an emacs --daemon from within an ssh session, then
connecting to it via emacsclient appears to leave stdin in a strange
state -- many times, M-x on a frame connected to the daemon appears to
get minibuffer input -- wonder if this somehow related to the
mega-thread "stop frames stealing one other's minibuffer", and changes
made in relation to that bug.

-- 

Thanks,

--Raman
♉ Id: kg:/m/0285kf1  🦮

-- 

Thanks,

--Raman
♉ Id: kg:/m/0285kf1  🦮



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Emacs Daemon --- Dies silently
  2021-01-13 21:13 Emacs Daemon --- Dies silently T.V Raman
@ 2021-01-13 23:27 ` Daniel Brooks
  2021-01-14  3:26 ` Eli Zaretskii
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel Brooks @ 2021-01-13 23:27 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

"T.V Raman" <raman@google.com> writes:

> I've used an emacs that runs for weeks (if not months) on my
> workstation --- even more  so since the pandemic forced us all to
> remain home.
>
> But in the lsat week, my Emacs daemon quietly dies when I close the
> client. Note: it does not die when I hit C-x C-c to close the frame,
> verified via ssh that the emacs process is still alive. However when i
> log back in later, often, the emacs process has quietly
> disappeared. Did something change with respect to emacs --daemon?

Record it with rr (see rr-project.org) so that you have a reproducible
debugging target. That'll let you find out why it's exiting, and what
the ultimate cause is.

db48x



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Emacs Daemon --- Dies silently
  2021-01-13 21:13 Emacs Daemon --- Dies silently T.V Raman
  2021-01-13 23:27 ` Daniel Brooks
@ 2021-01-14  3:26 ` Eli Zaretskii
  2021-01-14 15:48   ` T.V Raman via Emacs development discussions.
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-01-14  3:26 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

> From: "T.V Raman" <raman@google.com>
> Date: Wed, 13 Jan 2021 13:13:00 -0800 (PST)
> 
> But in the lsat week, my Emacs daemon quietly dies when I close the
> client. Note: it does not die when I hit C-x C-c to close the frame,
> verified via ssh that the emacs process is still alive. However when i
> log back in later, often, the emacs process has quietly
> disappeared. Did something change with respect to emacs --daemon?

Do you see anything pertinent in the system's message log?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Emacs Daemon --- Dies silently
  2021-01-14  3:26 ` Eli Zaretskii
@ 2021-01-14 15:48   ` T.V Raman via Emacs development discussions.
  2021-01-14 16:45     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: T.V Raman via Emacs development discussions. @ 2021-01-14 15:48 UTC (permalink / raw)
  To: eliz; +Cc: emacs-devel, raman

Looked, found nothing.

Eli Zaretskii writes:
 > > From: "T.V Raman" <raman@google.com>
 > > Date: Wed, 13 Jan 2021 13:13:00 -0800 (PST)
 > > 
 > > But in the lsat week, my Emacs daemon quietly dies when I close the
 > > client. Note: it does not die when I hit C-x C-c to close the frame,
 > > verified via ssh that the emacs process is still alive. However when i
 > > log back in later, often, the emacs process has quietly
 > > disappeared. Did something change with respect to emacs --daemon?
 > 
 > Do you see anything pertinent in the system's message log?

-- 
♉Id: kg:/m/0285kf1  🦮♉

--
♉Id: kg:/m/0285kf1  🦮♉



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Emacs Daemon --- Dies silently
  2021-01-14 15:48   ` T.V Raman via Emacs development discussions.
@ 2021-01-14 16:45     ` Eli Zaretskii
  2021-01-14 20:01       ` T.V Raman
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-01-14 16:45 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

> From: "T.V Raman" <raman@google.com>
> Date: Thu, 14 Jan 2021 07:48:46 -0800
> Cc: raman@google.com,
>     emacs-devel@gnu.org
> 
> Looked, found nothing.

Then my suggestion would be to attach GDB to the daemon, set a
breakpoint on the function 'exit', and when it breaks, show the
backtrace.  Then we might get an idea why this is happening.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Emacs Daemon --- Dies silently
  2021-01-14 16:45     ` Eli Zaretskii
@ 2021-01-14 20:01       ` T.V Raman
  2021-01-14 20:39         ` Mario Lang
  0 siblings, 1 reply; 8+ messages in thread
From: T.V Raman @ 2021-01-14 20:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 352 bytes --]

I've not had a chance to attach via gdb etc. but interestingly,
first starting emacs as emacs -nw on the remote machine appears to avoid
the problem. (I do have server-start in my init).


On the other hand emacs --daemon appears to be quitting when I logout
from the remote machine.
-- 

Thanks,

--Raman
7©4 Id: kg:/m/0285kf1  •0Ü8



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Emacs Daemon --- Dies silently
  2021-01-14 20:01       ` T.V Raman
@ 2021-01-14 20:39         ` Mario Lang
  2021-01-14 21:44           ` T.V Raman via Emacs development discussions.
  0 siblings, 1 reply; 8+ messages in thread
From: Mario Lang @ 2021-01-14 20:39 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

"T.V Raman" <raman@google.com> writes:

[...]

> On the other hand emacs --daemon appears to be quitting when I logout
> from the remote machine.

Shot in the dark, but might systemd have something to do with that?
IOW, do you run emacs --daemon via a systemd user service?
If so, see loginctl, in particular:

   enable-linger [USER...], disable-linger [USER...]
      Enable/disable user lingering for one or more users.
      If enabled for a specific user, a user manager is spawned
      for the user at boot and kept around after logouts. This allows users who
      are not logged in to run long-running services. Takes one or more
      user names or numeric UIDs as argument. If no argument is specified,
      enables/disables lingering for the user of the session of the caller.

      See also KillUserProcesses= setting in logind.conf(5).
           
-- 
CYa,
  ⡍⠁⠗⠊⠕



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Emacs Daemon --- Dies silently
  2021-01-14 20:39         ` Mario Lang
@ 2021-01-14 21:44           ` T.V Raman via Emacs development discussions.
  0 siblings, 0 replies; 8+ messages in thread
From: T.V Raman via Emacs development discussions. @ 2021-01-14 21:44 UTC (permalink / raw)
  To: mlang; +Cc: emacs-devel, raman


I think this was luser error on my part -- I've always run emacs or
emacs --daemon under screen.
Since I was using the daemon, a few days ago I eliminated screen from
my setup -- and then forgot all about it -- I believe screen is what
was  keeping the emacs alive which makes sense. I had somehow
(wrongly?) assumed that if I ran emacs --daemon, it would survive
across  sessions with respect to ssh --- I was clearly wrong.
Mario Lang writes:
 > "T.V Raman" <raman@google.com> writes:
 > 
 > [...]
 > 
 > > On the other hand emacs --daemon appears to be quitting when I logout
 > > from the remote machine.
 > 
 > Shot in the dark, but might systemd have something to do with that?
 > IOW, do you run emacs --daemon via a systemd user service?
 > If so, see loginctl, in particular:
 > 
 >    enable-linger [USER...], disable-linger [USER...]
 >       Enable/disable user lingering for one or more users.
 >       If enabled for a specific user, a user manager is spawned
 >       for the user at boot and kept around after logouts. This allows users who
 >       are not logged in to run long-running services. Takes one or more
 >       user names or numeric UIDs as argument. If no argument is specified,
 >       enables/disables lingering for the user of the session of the caller.
 > 
 >       See also KillUserProcesses= setting in logind.conf(5).
 >            
 > -- 
 > CYa,
 >   ⡍⠁⠗⠊⠕

-- 
♉Id: kg:/m/0285kf1  🦮♉

--
♉Id: kg:/m/0285kf1  🦮♉



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-14 21:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 21:13 Emacs Daemon --- Dies silently T.V Raman
2021-01-13 23:27 ` Daniel Brooks
2021-01-14  3:26 ` Eli Zaretskii
2021-01-14 15:48   ` T.V Raman via Emacs development discussions.
2021-01-14 16:45     ` Eli Zaretskii
2021-01-14 20:01       ` T.V Raman
2021-01-14 20:39         ` Mario Lang
2021-01-14 21:44           ` T.V Raman via Emacs development discussions.

unofficial mirror of emacs-devel@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/emacs-devel/0 emacs-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 emacs-devel emacs-devel/ https://yhetil.org/emacs-devel \
		emacs-devel@gnu.org
	public-inbox-index emacs-devel

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.devel
	nntp://news.gmane.io/gmane.emacs.devel


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git