* bug#53814: process-status returns invalid/undocumented status file-error for network process
@ 2022-02-06 7:26 emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-06 10:44 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 6+ messages in thread
From: emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-06 7:26 UTC (permalink / raw)
To: 53814
M-x list-process shows some network processes with the
status file-error.
According to the docs this is not a valid return
value for process-status:
Return the status of PROCESS.
The returned value is one of the following symbols:
run -- for a process that is running.
stop -- for a process stopped but continuable.
exit -- for a process that has exited.
signal -- for a process that has got a fatal signal.
open -- for a network stream connection that is open.
listen -- for a network stream server that is listening.
closed -- for a network stream connection that is closed.
connect -- when waiting for a non-blocking connection to complete.
failed -- when a non-blocking connection has failed.
nil -- if arg is a process name and no such process exists.
PROCESS may be a process, a buffer, the name of a process, or
nil, indicating the current buffer's process.
Apparently, process.c does set this this invalid status for some
reason:
Lisp_Object data = get_file_errno_data (err, contact, xerrno);
pset_status (p, list2 (Fcar (data), Fcdr (data)));
unbind_to (count, Qnil);
return;
https://github.com/emacs-mirror/emacs/blob/3af9e84ff59811734dcbb5d55e04e1fdb7051e77/src/process.c#L3642
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#53814: process-status returns invalid/undocumented status file-error for network process
2022-02-06 7:26 bug#53814: process-status returns invalid/undocumented status file-error for network process emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-02-06 10:44 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-06 12:32 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-06 23:27 ` Lars Ingebrigtsen
0 siblings, 2 replies; 6+ messages in thread
From: emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-06 10:44 UTC (permalink / raw)
To: 53814
>
> Apparently, process.c does set this this invalid status for some
> reason:
>
> Lisp_Object data = get_file_errno_data (err, contact, xerrno);
> pset_status (p, list2 (Fcar (data), Fcdr (data)));
> unbind_to (count, Qnil);
> return;
>
So process.c sets the status to file-error, and it also has
error message obtained via get_file_errno_data.
I checked what it says for such a process:
("make client process failed" "Too many open files" :name "example.com" ...)
So I guess it's a too many open connections error, but instead of
saying that, it sets the status to the undocumented file-error.
What's strange is when I delete such a 'file-error' process from
the process list, then it immediately goes to connect and then open
state for the given domain, which is not clear for me how it is
possible, since delete-process removes the process from the list
of processes.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#53814: process-status returns invalid/undocumented status file-error for network process
2022-02-06 10:44 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-02-06 12:32 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-06 23:26 ` Lars Ingebrigtsen
2022-02-06 23:27 ` Lars Ingebrigtsen
1 sibling, 1 reply; 6+ messages in thread
From: emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-06 12:32 UTC (permalink / raw)
To: 53814
> So I guess it's a too many open connections error, but instead of
> saying that, it sets the status to the undocumented file-error.
I found a relevant commit from 2018 by Lars, and its commit says:
src/process.c (connect_network_socket): When an async :family
'local client fails (with a file error, for instance), mark the
process as failed.
https://github.com/emacs-mirror/emacs/commit/92ba34d89ac4f5b5bbb818e1c39a3cc12a405790#diff-18c8f6291e2c6a6f88223e509421492528e624157da1ba063401a6ffc36e63b6L3595
Does failed here mean the Qfailed status? Then why is status set to
to the car of file error returned by get_file_errno_data which
returns file-error or some other file related bug?
Somebody who was part of this discussion then may be able to shed
some light on it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#53814: process-status returns invalid/undocumented status file-error for network process
2022-02-06 10:44 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-06 12:32 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-02-06 23:27 ` Lars Ingebrigtsen
2022-02-07 6:39 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-06 23:27 UTC (permalink / raw)
To: emacsq; +Cc: 53814
emacsq <laszlomail@protonmail.com> writes:
> What's strange is when I delete such a 'file-error' process from
> the process list, then it immediately goes to connect and then open
> state for the given domain, which is not clear for me how it is
> possible, since delete-process removes the process from the list
> of processes.
Presumably something is waiting for the connection to complete, and then
reconnects when it is?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#53814: process-status returns invalid/undocumented status file-error for network process
2022-02-06 23:27 ` Lars Ingebrigtsen
@ 2022-02-07 6:39 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 6+ messages in thread
From: emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-07 6:39 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 53814
>
> > What's strange is when I delete such a 'file-error' process from
> > the process list, then it immediately goes to connect and then open
> > state for the given domain, which is not clear for me how it is
> > possible, since delete-process removes the process from the list
> > of processes.
>
> Presumably something is waiting for the connection to complete, and reconnects when it is?
Apparently, url-http has some kind of a retry mechanism,
so when the failed process is deleted then the process sentinel
restarts the connection.
Which does not feel entirely right, because if I delete the process
explicitly then the process sentinel should be deactivated,
instead of being called and letting it restart the connection.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-02-07 6:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-06 7:26 bug#53814: process-status returns invalid/undocumented status file-error for network process emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-06 10:44 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-06 12:32 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-06 23:26 ` Lars Ingebrigtsen
2022-02-06 23:27 ` Lars Ingebrigtsen
2022-02-07 6:39 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
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).