Bug 1185278 - sftp-chroot: systemd --user -> Failed at step CHDIR spawning /usr/bin/kill
Summary: sftp-chroot: systemd --user -> Failed at step CHDIR spawning /usr/bin/kill
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-23 11:18 UTC by Harald Reindl
Modified: 2015-06-30 00:02 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-30 00:02:51 UTC
Type: Bug


Attachments (Terms of Use)

Description Harald Reindl 2015-01-23 11:18:35 UTC
on machines which nss-mysql for a ton of sftp-users out of mysql you need a reboot alias with a forced fsck at next boot because otherwise shutdown hangs by failing to kill the systemd-user sessions

alias reboot='/usr/bin/systemctl stop crond.service; /usr/bin/sleep 3; /usr/bin/systemctl stop mysqld.service; /usr/bin/touch /forcefsck; /usr/bin/sync; /usr/sbin/reboot -f'

WHY do systemd need to spawn kill as rection of a SIGKILL to the PID of "/usr/lib/systemd/systemd --user"

[root@sftp:~]$ kill 29657

[root@sftp:~]$ cat messages
Oct 22 16:51:48 sftp systemd: Failed at step CHDIR spawning /usr/bin/kill: No such file or directory
Oct 22 16:51:48 sftp systemd: systemd-exit.service: main process exited, code=exited, status=200/CHDIR
Oct 22 16:51:48 sftp systemd: Failed to start Exit the Session.
Oct 22 16:51:48 sftp systemd: Dependency failed for Exit the Session.
Oct 22 16:51:48 sftp systemd:
Oct 22 16:51:48 sftp systemd: Unit systemd-exit.service entered failed state.

Comment 1 Harald Reindl 2015-01-23 11:30:48 UTC
that sounds BTW related to F20 bug https://bugzilla.redhat.com/show_bug.cgi?id=1185277

Comment 2 Lennart Poettering 2015-02-04 19:31:53 UTC
How is chrooting implemented for that user? How come systemd is available in the chroot, but kill isn't?

Comment 3 Harald Reindl 2015-02-04 20:13:09 UTC
> How is chrooting implemented for that user? 

ordinary opensssh chroots, a ton of them and the users are in a mysql-database via libnss-mysql-1.5-20.fc20, the gid, uid, hashed pwd and userhome itself are stored in the database 

/etc/nsswitch.conf
passwd:     files mysql
shadow:     files mysql
group:      files mysql

Match User "customer1"
 ChrootDirectory "/data/sftp/customer1"

Match User "customer1_user1"
 ChrootDirectory "/data/sftp/customer1/customer1_user1"

Match User "customer1_user2"
 ChrootDirectory "/data/sftp/customer1/customer1_user2"

Match User "customer1_user3"
 ChrootDirectory "/data/sftp/customer1/customer1_user3"

> How come systemd is available in the chroot, but kill isn't?

ask that the systemd-developers - how comes that this setup exists since 2010 and had no problems until update to Fedora 20 and systemd-208 introducing the systemd-user sessions with their other drwabacks like log-flooding and so on

i just tried to find out what hangs 90 seconds *for every* "/usr/lib/systemd/systemd --user" and/or "(sd-pam)" process and send a SIGTERM to the PID auf sthe systemd-user-process brings the result above

starting with F20 and continued with F21 systemd seems to have growing design errors and heavily changed internal behavior up to no longer relieable implementing own features working for years until now - see also F21: https://bugzilla.redhat.com/show_bug.cgi?id=1184016 and https://bugzilla.redhat.com/show_bug.cgi?id=1185277

Comment 4 Fedora End Of Life 2015-05-29 13:37:50 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2015-06-30 00:02:51 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.