Bug 1324660 - Watchdog breaks selinux relabel from /.autorelabel
Summary: Watchdog breaks selinux relabel from /.autorelabel
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-06 21:45 UTC by Christian Stadelmann
Modified: 2016-04-08 12:10 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-07 20:58:22 UTC
Type: Bug


Attachments (Terms of Use)
last 20 lines from journal before system rebooted plus some lines before that (2.92 KB, text/plain)
2016-04-07 07:47 UTC, Christian Stadelmann
no flags Details

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.


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