Bug 70002 - Found ordering cycle on local-fs.target/stop (Due to network mount)
Summary: Found ordering cycle on local-fs.target/stop (Due to network mount)
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Zbigniew Jedrzejewski-Szmek
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-01 14:25 UTC by Umut Tezduyar
Modified: 2013-10-04 15:46 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Umut Tezduyar 2013-10-01 14:25:46 UTC
Adding a network mount point creates a cycling stop dependency that becomes visible during shutdown with systemd 207.

I started seeing following message on my journal:


2013-09-30T23:19:23.726+00:00 [ WARNING ] systemd[1]: Found ordering cycle on local-fs.target/stop
2013-09-30T23:19:23.726+00:00 [ INFO    ] systemd[1]: Walked on cycle path to var-spool-storage-NetworkShare.mount/stop
2013-09-30T23:19:23.727+00:00 [ INFO    ] systemd[1]: Walked on cycle path to network.target/stop
2013-09-30T23:19:23.728+00:00 [ INFO    ] systemd[1]: Walked on cycle path to net@eth0.service/stop
2013-09-30T23:19:23.728+00:00 [ INFO    ] systemd[1]: Walked on cycle path to basic.target/stop
2013-09-30T23:19:23.736+00:00 [ INFO    ] systemd[1]: Walked on cycle path to sysinit.target/stop
2013-09-30T23:19:23.737+00:00 [ INFO    ] systemd[1]: Walked on cycle path to local-fs.target/stop
2013-09-30T23:19:23.740+00:00 [ WARNING ] systemd[1]: Breaking ordering cycle by deleting job var-spool-storage-NetworkShare.mount/stop

Steps to reproduce

1) Mount network drive: mount -t cifs -o username=x,password=x //x.x.x.x/video /var/spool/storage/NetworkShare
2) Powercycle with systemctl reboot

Cycle can be seen here:

[root@ /mnt/flash/root]1391# systemctl show -p Before var-spool-storage-NetworkShare.mount
Before=local-fs.target umount.target
[root@ /mnt/flash/root]1391# systemctl show -p Before local-fs.target
Before=sysinit.target journal-flush.service
[root@ /mnt/flash/root]1391# systemctl show -p Before sysinit.target
Before=basic.target dbus.socket sshd.socket rescue.target rescue.service
[root@ /mnt/flash/root]1391# systemctl show -p Before basic.target
Before=rsyslog.service dbus.service sshdgenkeys.service multi-user.target systemd-ask-password-wall.service net@eth0.service
[root@ /mnt/flash/root]1391# systemctl show -p Before net@eth0.service
Before=network.target shutdown.target
[root@ /mnt/flash/root]1391# systemctl show -p Before network.target
Before=multi-user.target var-spool-storage-NetworkShare.mount

I believe the problem is coming from:

src/core/mount.c (mount_add_one) > r = unit_add_dependency_by_name(u, UNIT_BEFORE, SPECIAL_LOCAL_FS_TARGET, NULL, true);
Comment 1 Zbigniew Jedrzejewski-Szmek 2013-10-03 16:48:16 UTC
See also http://lists.freedesktop.org/archives/systemd-devel/2012-September/006449.html
Comment 2 Zbigniew Jedrzejewski-Szmek 2013-10-04 02:22:22 UTC
Fixed (according to my very simple testing) in http://cgit.freedesktop.org/systemd/systemd/commit/?id=7700945.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.