[systemd-devel] One shot service failure on Fedora 37

Bill Steinberg bill at ponusridge.com
Mon Apr 17 23:59:19 UTC 2023


Hi Barry,

Thanks for the response. Answers inline below.

> On Apr 17, 2023, at 5:09 PM, Barry <barry at barrys-emacs.org> wrote:
> 
> 
> 
>> On 17 Apr 2023, at 19:05, Bill Steinberg <bill at ponusridge.com> wrote:
>> 
>> Hello systemd devel,
>> 
>> I have a systemd service that I’ve run on prior versions of fedora which fails to start via systemd on Fedora release 37. It is a oneshot service that starts the distributed checksum clearing house’s dccifd service via a shell script. Here is the definition of the service:
>> 
>> [Unit]
>> Description=Distributed Checksum Clearinghouses dccifd daemon
>> After=syslog.target network.target
>> 
>> [Service]
>> Type=oneshot
> 
> Oneshot seems wrong.
> 
>> RemainAfterExit=yes
>> ExecStart=/var/dcc/libexec/rcDCC -m dccifd start
> Does this run a background daemon?

Yes, the rcDCC shell script starts and runs a linux executable, a background daemon as you call it.

> Can you just run that daemon directly?

I could run the shell script directly to start the dccifd executable however if the fedora linux server is rebooted I would need to remember to run the shell script manually. I’d like the dccifd daemon to start automatically when the fedora linux server is started. Isn’t systemd meant for this?

> Hopefully that program can be run without demonising.
> 
> 
>> ExecStop=/var/dcc/libexec/rcDCC -m dccifd stop
> If it is oneshot it does not need a stop

Is there another type that should be used besides oneshot? I may want to run systemctl stop dccifd.service, for example when dccifd is being upgraded to a new version.

The dccifd executable is started and stopped using a shell script. It is not run directly. One reason is that the shell script contains the arguments that are passed to the dccifd linux executable.

> 
>> Restart=no
>> 
>> [Install]
>> WantedBy=multi-user.target
>> 
>> 
>> The error in the journalctl log is:
>> 
>> systemd[1]: Starting dccifd.service - Distributed Checksum Clearinghouses dccifddaemon…
>> systemd[1]: dccifd.service: Main process exited, code=killed, status=11/SEGV
>> systemd[1]: dccifd.service: Failed with result 'signal’.
>> systemd[1]: Failed to start dccifd.service - Distributed Checksum Clearinghouses dccifddaemon.
>> 
>> The two scripts in ExecStart and ExecStop run successfully outside of systemd. Any info as to why systemd fails when executing these scripts would be appreciated.
>> 
>> Best,
>> Bill Steinberg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20230417/30b3acb1/attachment.htm>


More information about the systemd-devel mailing list