Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 636574 - >=sys-apps/openrc-0.31.2 cannot start multiple instances of a daemon
Summary: >=sys-apps/openrc-0.31.2 cannot start multiple instances of a daemon
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-05 09:00 UTC by Martin
Modified: 2017-11-17 23:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
test.patch (test.patch,792 bytes, patch)
2017-11-05 21:24 UTC, William Hubbs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin 2017-11-05 09:00:54 UTC
With sys-apps/openrc-0.31.2 and above, start-stop-daemon cannot start multiple instances of a daemon anymore, if they are differentiated just by the pidfile and not by name or uid. Taking apache as an example, the first instance with SVCNAME apache2-u1 starts fine, but the second with SVCNAME apache2-u2 wont start:

#> /etc/init.d/apache2-u2 start
* Starting apache2-u2 …
* start-stop-daemon: fopen `/run/apache2-u2.pid': No such file or directory
* Sending signal 0 to PID 24323 ... [ ok ]
* Sending signal 0 to PID 24314 ... [ ok ]
* Sending signal 0 to PID 24306 ... [ ok ]
* Sending signal 0 to PID 24303 ... [ ok ]
* start-stop-daemon: /usr/sbin/apache2 is already running

The apache2-u2.pid file does not exist, as apache2-u2 is not running yet. However, start-stop-daemon seems to find the four processes of apache2-u1 and beliefs –u2 is already running. 

Up to sys-apps/openrc-0.31.1, the config setup works like a charm. For a simpler config setup, I tested with multiple instances of net-misc/iperf(3) as well, but same result.
Comment 1 William Hubbs gentoo-dev 2017-11-05 18:30:36 UTC
I just started multiple instances of my own test daemon with a
multiplexed script that only changes the pid file for each instance and
it worked successfully. This is with OpenRC 0.34.5.

Can you verify whether you have the issue with that version?

Thanks,

William
Comment 2 William Hubbs gentoo-dev 2017-11-05 21:24:30 UTC
Created attachment 502756 [details, diff]
test.patch

Hi,

Can you please apply this patch and let me know if it fixes your issue?

Thanks,

William
Comment 3 William Hubbs gentoo-dev 2017-11-07 22:20:55 UTC
Hi, can you please test with OpenRC 0.34.6 and let me know if the issue
is still there?

Thanks,

William
Comment 4 Martin 2017-11-08 19:54:29 UTC
sys-apps/openrc-0.34.6 fixed this issue, multiple instances do start up again. Many thanks!
Comment 5 William Hubbs gentoo-dev 2017-11-17 23:28:39 UTC
No problem, closing.