Bug 1324660

Summary: Watchdog breaks selinux relabel from /.autorelabel
Product: [Fedora] Fedora Reporter: Christian Stadelmann <fedora>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 24CC: fedora, johannbg, lnykryn, msekleta, muadda, s, systemd-maint, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-07 20:58:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
last 20 lines from journal before system rebooted plus some lines before that none

Description Christian Stadelmann 2016-04-06 21:45:29 UTC
Description of problem:
When selinux is relabeling filesystem, it is being aborted by an incorrect watchdog behavior of systemd.

Version-Release number of selected component (if applicable):
systemd-229-7.fc24.x86_64
selinux-policy-3.13.1-180.fc24.noarch
kernel-4.5.0-302.fc24.x86_64

How reproducible:
don't know

Steps to Reproduce:
1. as root, create /.autorelabel
2. reboot
3. watch

Actual results:
After about 10 minutes, system reboots. A look into syslogs reveals that the system ran into a watchdog timeout.

Expected results:
Systemd must not abort selinux relabeling filesystems.

Comment 1 Zbigniew Jędrzejewski-Szmek 2016-04-07 01:43:43 UTC
What watchdog? There are watchdogs both for services and for systemd itself. Your description does not clarify which watchdog fires. Maybe you could paste the logs.

Comment 2 Christian Stadelmann 2016-04-07 07:47:24 UTC
Created attachment 1144593 [details]
last 20 lines from journal before system rebooted plus some lines before that

(In reply to Zbigniew Jędrzejewski-Szmek from comment #1)
> What watchdog? There are watchdogs both for services and for systemd itself.
> Your description does not clarify which watchdog fires. Maybe you could
> paste the logs.

I don't know, but I've attached a log file. selinux was relabeling files (nothing logged to syslog).

Comment 3 Zbigniew Jędrzejewski-Szmek 2016-04-07 11:45:51 UTC
Apr 06 09:33:32 hostname systemd[1]: Shutting down.
Apr 06 09:33:32 hostname systemd[1]: Hardware watchdog 'INTCAMT', version 0
Apr 06 09:33:32 hostname systemd[1]: Set hardware watchdog to 10min.
Apr 06 09:33:32 hostname systemd-shutdown[1]: Sending SIGTERM to remaining processes...

This just means that systemd sets the watchdog for shutdown to 10min. It doesn't specify the reason for shutdown.

Can you attach the whole logs?

Comment 4 Christian Stadelmann 2016-04-07 20:58:22 UTC
> Can you attach the whole logs?

Sorry, I can't. They are gone and I don't understand why.

(In reply to Zbigniew Jędrzejewski-Szmek from comment #3)
> This just means that systemd sets the watchdog for shutdown to 10min. It
> doesn't specify the reason for shutdown.

Ok, then I might be seeing something completely different. Systemd might not even be related.

Still I don't understand why the system was rebooting after some time of restoring context, it should just have continued booting. I'll try to reproduce.

Comment 5 Zbigniew Jędrzejewski-Szmek 2016-04-07 22:15:21 UTC
Oh, it reboots automatically after the relabel is finished. That is expected.

Comment 6 Christian Stadelmann 2016-04-08 09:31:49 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #5)
> Oh, it reboots automatically after the relabel is finished. That is expected.

And that's exactly what is specified in section "File Labeling" in man 8 selinux, I must have overread that. Sorry for wasting your time.

Comment 7 Zbigniew Jędrzejewski-Szmek 2016-04-08 12:10:52 UTC
NP, good that we got that cleared.