| Summary: | >=mail-filter/spamassassin-4.0.0: spamd fails to start with error `child process [1234] exited or timed out without signaling production of a PID file: (no status) at /usr/sbin/spamd line 3133.` | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Robert Gill <rtgill82> |
| Component: | Current packages | Assignee: | Philippe Chaintreuil <gentoo_bugs_peep> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | CC: | hydrapolic, proxy-maint |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Robert Gill
2023-03-23 21:05:09 UTC
I didn't include the error in the full description. It is as follows: spamd fails to start with error `child process [1234] exited or timed out without signaling production of a PID file: (no status) at /usr/sbin/spamd line 3133.` I saw this error as well: Mar 26 11:03:38 pab002 spamd[3141]: config: no rules were found! Do you need to run 'sa-update'? Mar 26 11:03:39 pab002 spamd[3124]: child process [3141] exited or timed out without signaling production of a PID file: exit 255 at /usr/sbin/spamd line 3133. And, noticing the "no rules were found!" in on the first line I ran: /etc/cron.daily/update-spamassassin-rules Afterwards spamd started ok. Just wanted to add that running sa-update was indicated at the end of the build (I overlooked that earlier): * Messages for package mail-filter/spamassassin-4.0.0-r1: * Log file: /var/log/portagex/mail-filter:spamassassin-4.0.0-r1:20230326-163713.log * * No rules are installed by default. You will need to run sa-update * at least once, and most likely configure SpamAssassin before it * will work. * * Configuration and update help can be found on the wiki: * * https://wiki.gentoo.org/wiki/SpamAssassin * * If this version of SpamAssassin causes permissions issues * with your user configurations or bayes databases, then you * may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service * configuration file, or remove the --username and --groupname * flags from the SPAMD_OPTS variable in your systemd service * configuration file. Robert, any chance your "spamd" user doesn't have write access to /run/? I guess I should state, it's working for me (as root). ========================================================================== $ sudo /etc/init.d/spamd stop * Stopping spamd ... [ ok ] $ ls -la /run/spa* ls: cannot access '/run/spa*': No such file or directory $ sudo /etc/init.d/spamd start * Starting spamd ... [ ok ] $ ls -la /run/spa* -rw-r--r-- 1 root root 6 Mar 27 15:47 /run/spamd.pid ========================================================================== In case it matters/helps, the permissions on my /run are: drwxr-xr-x 24 root root 960 Mar 27 15:47 /run/ I dug into the spamd code to understand what's going on in order to ensure this is not a more serious issue and this is was I come up with. In /usr/sbin/spamd the routine daemonize() (defined at line 3102) gets called at line 1248 to created the daemon process. The fork is succcessful and the parent loops waiting for the newly created process to report back. The newly created/forked process returns from daemonize() and continues with its initialization. At line 1263 it calls $spamtest->init_learner() which is defined at line 703 in /usr/lib64/perl5/vendor_perl/5.36/Mail/SpamAssassin.pm. That routine in turn calls $self->init(1) at line 709. The routinge init() is defined at line 1666 in /usr/lib64/perl5/vendor_perl/5.36/Mail/SpamAssassin.pm and is what generates the first log message: Mar 26 11:03:38 pab002 spamd[3141]: config: no rules were found! Do you need to run 'sa-update'? When this message is generated it is done through a die() call, so the that newly created/forked process exits and never gets to the point of attempting to created the pidfile, which would be done on line 1299 in /usr/sbin/spamd. And, since the no attempt was made to create the pid file, the parent process times out and we get the second line log message: Mar 26 11:03:39 pab002 spamd[3124]: child process [3141] exited or timed out without signaling production of a PID file: exit 255 at /usr/sbin/spamd line 3133. This confirms, the problem doesn't have anything to do with permissions and everything to do with the missing rules. Thanks for digging in that deep, acmondor! If that's the case, it sounds like it's doing what it should. There's no PID file because spamd isn't actually running. That said, I'm going to ask around to see if there's a historical or boot-strapping reason we don't run sa-update automatically post-install. |