1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
The systemd System and Service Manager
Go to file
Lennart Poettering 8c759b33a4 tests: when running a manager object in a test, migrate to private cgroup subroot first (#6576)
Without this "meson test" will end up running all tests in the same
cgroup root, and they all will try to manage it. Which usually isn't too
bad, except when they end up clearing up each other's cgroups. This race
is hard to trigger but has caused various CI runs to fail spuriously.

With this change we simply move every test that runs a manager object
into their own private cgroup. Note that we don't clean up the cgroup at
the end, we leave that to the cgroup manager around it.

This fixes races that become visible by test runs throwing out errors
like this:

```
exec-systemcallfilter-failing.service: Passing 0 fds to service
exec-systemcallfilter-failing.service: About to execute: /bin/echo 'This should not be seen'
exec-systemcallfilter-failing.service: Forked /bin/echo as 5693
exec-systemcallfilter-failing.service: Changed dead -> start
exec-systemcallfilter-failing.service: Failed to attach to cgroup /exec-systemcallfilter-failing.service: No such file or directory
Received SIGCHLD from PID 5693 ((echo)).
Child 5693 ((echo)) died (code=exited, status=219/CGROUP)
exec-systemcallfilter-failing.service: Child 5693 belongs to exec-systemcallfilter-failing.service
exec-systemcallfilter-failing.service: Main process exited, code=exited, status=219/CGROUP
exec-systemcallfilter-failing.service: Changed start -> failed
exec-systemcallfilter-failing.service: Unit entered failed state.
exec-systemcallfilter-failing.service: Failed with result 'exit-code'.
exec-systemcallfilter-failing.service: cgroup is empty
Assertion 'service->main_exec_status.status == status_expected' failed at ../src/src/test/test-execute.c:71, function check(). Aborting.
```

BTW, I tracked this race down by using perf:

```
        # perf record -e cgroup:cgroup_mkdir,cgroup_rmdir
        …
        # perf script
```

Thanks a lot @iaguis, @alban for helping me how to use perf for this.

Fixes #5895.
2017-08-09 09:42:49 -04:00
.github github: how to report bugs for older distribution versions (#6146) 2017-06-20 20:20:25 +02:00
.mkosi mkosi.arch: fix comment (#6470) 2017-07-28 09:24:12 +02:00
catalog build-sys: drop gitignore patterns for in-tree builds 2017-07-18 10:05:06 -04:00
coccinelle tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
docs build-sys: drop gitignore patterns for in-tree builds 2017-07-18 10:05:06 -04:00
factory/etc factory: remove broken pam_limits 2014-07-30 15:21:54 +02:00
hwdb hwdb: Add axis range for System76 Galago Pro (galp2) (#6439) 2017-07-25 11:35:58 +10:00
man build-sys: fix invalid args detected by meson 0.42 (#6561) 2017-08-09 09:41:44 -04:00
modprobe.d modprobe.d: ship drop-in to set bonding max_bonds to 0 (#6448) 2017-08-02 08:41:18 -04:00
network build-sys: drop automake support 2017-07-18 10:04:44 -04:00
po build-sys: drop gitignore patterns for in-tree builds 2017-07-18 10:05:06 -04:00
rules rules: split the rfkill subsystem rule (#6556) 2017-08-08 08:41:15 +02:00
shell-completion Merge pull request #6465 from keszybz/drop-kdbus 2017-07-28 09:29:07 +02:00
src tests: when running a manager object in a test, migrate to private cgroup subroot first (#6576) 2017-08-09 09:42:49 -04:00
sysctl.d build-sys: drop gitignore patterns for in-tree builds 2017-07-18 10:05:06 -04:00
system-preset build-sys: drop automake support 2017-07-18 10:04:44 -04:00
sysusers.d units,sysusers: use DynamicUser= for journal-gatewayd and drop user systemd-journal-gateway from sysusers 2017-07-28 13:37:10 +09:00
test tests: use ninja-build if ninja is not available (#6544) 2017-08-07 11:06:07 +02:00
tmpfiles.d build-sys: drop gitignore patterns for in-tree builds 2017-07-18 10:05:06 -04:00
tools meson: install the git hook (#6425) 2017-07-24 10:41:45 +02:00
units units: do not perform m4 if not necessary (#6575) 2017-08-09 09:13:41 -04:00
xorg login: support user-bus on dbus1 2015-08-31 18:12:37 +02:00
.dir-locals.el meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
.editorconfig editors: only extend line width to 119 for C and XML files 2016-02-10 12:29:32 +01:00
.gitattributes git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore build-sys: drop gitignore patterns for in-tree builds 2017-07-18 10:05:06 -04:00
.mailmap mailmap: add entry 2017-07-18 10:04:44 -04:00
.travis.yml remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
.vimrc vimrc: fix indentation logic for our docbook xml files 2016-04-29 12:23:34 +02:00
.ycm_extra_conf.py ycm: update flag blacklist 2014-06-04 15:41:10 -04:00
CODING_STYLE tree-wide: set SA_RESTART for signal handlers we install 2016-12-01 12:41:17 +01:00
configure build-sys: add basic support for ./configure && make && make install 2017-07-18 10:05:06 -04:00
DISTRO_PORTING DISTRO_PORTING: document that distros may/should change fallback DNS as well as fallback NTP if they wish 2017-07-24 11:49:16 +02:00
ENVIRONMENT.md Rename $TEST_DIR to $SYSTEMD_TEST_DATA, document it 2017-02-16 21:36:31 +01:00
HACKING HACKING: update for meson 2017-07-18 10:05:06 -04:00
LICENSE.GPL2
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile build-sys: Fix Makefile wrapper for install target (#6548) 2017-08-07 11:29:20 +02:00
meson_options.txt Merge pull request #6420 from keszybz/gateway-name 2017-08-01 09:43:41 +02:00
meson.build build-sys: fix invalid args detected by meson 0.42 (#6561) 2017-08-09 09:41:44 -04:00
mkosi.build mkosi: use '[' rather than 'test' everywhere 2017-07-20 14:37:05 +02:00
mkosi.default mkosi: create .mkosi directory 2016-10-06 11:53:58 -04:00
NEWS Revert "README: document that gperf 3.1 is required for building now" (#6541) 2017-08-05 18:30:37 -04:00
README Revert "README: document that gperf 3.1 is required for building now" (#6541) 2017-08-05 18:30:37 -04:00
README.md README: include small graphs of open issues and pull requests (#5576) 2017-03-13 08:10:04 +01:00
TODO Drop kdbus bits 2017-07-23 12:01:54 -04:00

systemd - System and Service Manager

Count of open issues over time Count of open pull requests over time Build Status
Coverity Scan Status

Details

General information about systemd can be found in the systemd Wiki.

Information about build requirements are provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the HACKING file for information how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.