On Thu, Sep 26, 2024 at 09:50:39AM -0700, Ian Z via Exim-users wrote: > On Thu, Sep 26, 2024 at 09:15:07AM GMT, Cam Ellison via Exim-users wrote: > > > > Sep 23 00:00:08 mail exim[1468704]: 2024-09-23 00:00:08 > > > 1ssUci-006A4f-Ph failed to write to main log: length=91 result=-1 errno=9 > > > (Bad file descriptor) > > > Sep 23 00:00:08 mail exim[1468704]: write failed on panic log: > > > length=116 result=-1 errno=9 (Bad file descriptor) [...] > Does exim under any circumstances close() the file descriptors > for the logs?
Exim open()s mainlog/rejectlog/paniclog for writing and close() it on completion of write. Exim listener does not keep them open, it can be checked via /proc/<pid>/fd on Linux and similar kernel interfaces on other OSes. > I feel it shouldn't ever do that, but I have no other explanation for > these errors. Probably memory in running Exim instance is corrupted, leading to wrong contents of memory cells where file descriptors are stored. But such corruption should occur in a small piece of code between open() and close(). Of course, it may be a bug, triggered by some exotic condition. > And how did _these_ errors get logged anyway? Is it > because exim runs under systemd and systemd captures its stdout and > stderr? Yes, cited lines looks like syslog records, it may be also a result of stderr capture by systemd. -- Eugene Berdnikov -- ## subscription configuration (requires account): ## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/ ## unsubscribe (doesn't require an account): ## exim-users-unsubscr...@lists.exim.org ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/