Bug 1369528 - Failed to start login service
Summary: Failed to start login service
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 25
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-23 16:32 UTC by Marek Greško
Modified: 2017-12-12 10:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:24:40 UTC
Type: Bug


Attachments (Terms of Use)
Extract from log (25.92 KB, text/plain)
2016-10-09 13:39 UTC, Marek Greško
no flags Details

Description Marek Greško 2016-08-23 16:32:54 UTC
Description of problem:
Getting Failed to start login service on boot after running fixfiles -v -F relabel and thus unable to login.


Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.13.1-191.12.fc24.noarch


How reproducible:
Happens always after reboot when fixfiles -v -F relabel was run.

Steps to Reproduce:
1. Run fixfiles -v -F relabel
2. Answer no to the question on removing tmp files
3. Reboot

Actual results:
I get Failed to start login service and I am unable to login.

Expected results:
Login service starts enables me to login.

Additional info:
To workaround the problem I should boot with enforcing=0 once and after next reboot it usually works. Sometimes I need it to repeat once more, I do not know why.

I am using gdm and proprietary nvidia drivers from rpmfusion. Probably related.

Comment 1 Marek Greško 2016-08-25 19:12:03 UTC
I found out that the coincidence with fixfiles is probably false. It looks like it happens randomly after reboot.

I found this in journal:

aug 25 21:01:28 hostname audit[1]: USER_AVC pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc:  denied  { status } for auid=n/a uid=0 gid=0 cmdline="/usr/lib/systemd/systemd-logind" scontext=system_u:system_r:systemd_logind_t:SystemLow tcontext=system_u:system_r:init_t:s0 tclass=system
                                           exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
aug 25 21:01:28 hostname systemd-logind[1256]: Failed to enable subscription: Access denied
aug 25 21:01:28 hostname audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
aug 25 21:01:28 hostname audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 25 21:01:28 hostname audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 25 21:01:28 hostname audit[1]: USER_AVC pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc:  denied  { status } for auid=n/a uid=0 gid=0 cmdline="/usr/lib/systemd/systemd-logind" scontext=system_u:system_r:systemd_logind_t:SystemLow tcontext=system_u:system_r:init_t:s0 tclass=system
                                           exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
aug 25 21:01:28 hostname audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
aug 25 21:01:28 hostname audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 25 21:01:28 hostname audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 25 21:01:28 hostname audit[1]: USER_AVC pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc:  denied  { status } for auid=n/a uid=0 gid=0 cmdline="/usr/lib/systemd/systemd-logind" scontext=system_u:system_r:systemd_logind_t:SystemLow tcontext=system_u:system_r:init_t:s0 tclass=system
                                           exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
aug 25 21:01:28 hostname audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
aug 25 21:01:28 hostname audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 25 21:01:28 hostname audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 25 21:01:28 hostname systemd-logind[1256]: Failed to fully start up daemon: Permission denied
aug 25 21:01:28 hostname systemd[1]: systemd-logind.service: Main process exited, code=exited, status=1/FAILURE
aug 25 21:01:28 hostname systemd[1]: Failed to start Login Service.

Comment 2 Marek Greško 2016-08-28 17:55:43 UTC
audit2why reports multiple instances of:

libsepol.mls_from_string: invalid MLS context SystemLow
libsepol.mls_from_string: could not construct mls context structure
libsepol.context_from_record: could not create context structure
libsepol.context_from_string: could not create context structure
libsepol.sepol_context_to_sid: could not convert system_u:system_r:systemd_logind_t:SystemLow to sid

Comment 3 Marek Greško 2016-10-09 13:39:22 UTC
Created attachment 1208577 [details]
Extract from log

Might this log extract help?

Comment 4 Marek Greško 2016-11-12 02:41:42 UTC
The bug is present also in Fedora 25. It is reproduced also without nvidia drivers. So these are not the cause.

Comment 5 Marek Greško 2016-11-13 15:07:10 UTC
I found this thread: http://selinux.tycho.nsa.narkive.com/cZUV3wmW/selinux-set-callback-problem referencing this link: https://github.com/systemd/systemd/commit/24154879845c6aa68a82d3a606f037e9df7527e0.

So I tried to stop and disable mcstransd service and rerun fixfiles -v -F relabel.

It looks it helped. So we have workaround for those who do not need mcstransd.

Comment 6 Göran Uddeborg 2017-07-28 14:10:34 UTC
FYI, this sounds quite similar to the problem I've investigated and reported in bug 1476015 yesterday.  (I'm not sure why I missed this one when searching bugzilla.)

As a workaround until the real bug gets fixed, I've created a file /etc/systemd/system/systemd-logind.service.d/nomcstrans.conf with the contents

[Unit]
Before=mcstransd.service

Comment 7 Fedora End Of Life 2017-11-16 19:53:09 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. 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 '25'.

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 25 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 8 Fedora End Of Life 2017-12-12 10:24:40 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 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.