Bug 10174 - systemd kills running ppp daemon
Summary: systemd kills running ppp daemon
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: systemd (show other bugs)
Version: 3
Hardware: unspecified Unspecified
: - Unknown - - Unknown -
Assignee: Stefan Schantl
QA Contact: Michael Tremer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-01 17:32 UTC by Michael Tremer
Modified: 2013-05-19 21:54 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Tremer 2012-07-01 17:32:33 UTC
There is a very mysterious problem with pppd and systemd.

It happens when you use the modem hook with an UMTS modem (should happen with everything else as well, but I only have this device).

I created the zone with the following command:
network zone create upl3 modem --apn="event.vodafone.de" --pin=1234 --username="test" --password="test" --device="/dev/ttyUSB0" --monitor-device="/dev/ttyUSB1"

Then, the create the connection:
network zone upl3 up

The connection gets established and is immediately stopped. pppd exits with code 16. We are using Type=forking with PIDFile here, which will block systemctl until the first pppd process is finished creating the connection, but pppd will fork into the background. The background process is the one that gets killed.

The problem can be worked around by replacing pppd by a shell script like this:

pppd:
> #!/bin/bash
> pppd.bin $@
> sleep 30

where pppd is the actual ppp daemon. The reason why this works is that after pppd has detached, there will be a short time for systemd to read the main pid and when the sleep command has finished, systemd will let the background daemon alone.

The connection works totally fine when starting pppd by hand.
Comment 1 Stefan Schantl 2013-05-19 21:54:05 UTC
Problem has been fixed with the introducion of the "pppd-angel".

The fix can be found here:
http://git.ipfire.org/?p=network.git;a=commit;h=ea5f63541bc739489f5f9f61051c1de991ffc25e