Bug 633120 - Cannot start SELinux Troubleshooter (/usr/bin/sealert)
Summary: Cannot start SELinux Troubleshooter (/usr/bin/sealert)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: setroubleshoot
Version: 13
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-13 01:31 UTC by Mark Harig
Modified: 2010-10-05 09:24 UTC (History)
2 users (show)

Fixed In Version: setroubleshoot-2.2.99-1.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-05 09:24:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark Harig 2010-09-13 01:31:46 UTC
Description of problem:
The SELinux Troubleshooter fails to start when selected from the Applications/System Tools menu.

Version-Release number of selected component (if applicable):

$ rpm -q setroubleshoot setroubleshoot-server
setroubleshoot-2.2.96-1.fc13.x86_64
setroubleshoot-server-2.2.96-1.fc13.x86_64

How reproducible:
Every time that SELinux Troubleshooter is selected from the System Tools menu, or when "/usr/bin/sealert -bv" is run from the shell prompt.

Steps to Reproduce:
1. Either select "SELinux Troubleshooter" from the Applications/System Tools menu or enter "/usr/bin/sealert -bv" at the shell prompt.

  
Actual results:
setroubleshoot: abrt: detected unhandled Python exception in /usr/sbin/setroubleshootd
setroubleshoot: [dbus.ERROR] could not start dbus: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1
setroubleshoot: [dbus.proxies.ERROR] Introspect error on :1.136:/org/fedoraproject/Setroubleshootd: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
setroubleshoot: [dbus.ERROR] could not start dbus: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.136 was not provided by any .service files


Expected results:
Expected the SELinux Troubleshooter application to start.

Comment 1 Daniel Walsh 2010-09-13 13:55:39 UTC
Is your session bus running?  Are  you running this as a user or as root?

Comment 2 Mark Harig 2010-09-13 17:12:57 UTC
(In reply to comment #1)
> Is your session bus running?  Are  you running this as a user or as root?

I am running as an ordinary user, using the GNOME desktop.

Here is the output from the 'service messagebus status' and 'sealert -bv' commands from a few minutes ago.  Please let me know if there is more information that I can provide you.

$ sudo service messagebus status
dbus-daemon (pid 2696 1627 1064) is running...

$ sudo sealert -bv
2010-09-13 13:06:54,643 [dbus.proxies.ERROR] Introspect error on :1.3:/org/fedoraproject/Setroubleshootd: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
2010-09-13 13:06:54,647 [dbus.ERROR] could not start dbus: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.3 was not provided by any .service files

$ sealert -bv
2010-09-13 13:07:01,968 [dbus.proxies.ERROR] Introspect error on :1.107:/org/fedoraproject/Setroubleshootd: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
2010-09-13 13:07:01,972 [dbus.ERROR] could not start dbus: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.107 was not provided by any .service files

Comment 3 Daniel Walsh 2010-09-13 18:40:41 UTC
If you run 
sealert -s
does this work?

Comment 4 Mark Harig 2010-09-13 18:43:20 UTC
(In reply to comment #3)
> If you run 
> sealert -s
> does this work?

$ sealert -s
Service
Exception AttributeError: "'SETroubleshootdDBus' object has no attribute 'iface'" in <bound method SETroubleshootdDBus.__del__ of <SETroubleshootdDBus object at 0x1f7e640 (__main__+SETroubleshootdDBus at 0x1f51d00)>> ignored

$ sudo sealert -s
Service
Exception AttributeError: "'SETroubleshootdDBus' object has no attribute 'iface'" in <bound method SETroubleshootdDBus.__del__ of <SETroubleshootdDBus object at 0x17f3500 (__main__+SETroubleshootdDBus at 0x17c5b00)>> ignored

Comment 5 Daniel Walsh 2010-09-13 18:57:21 UTC
You you see if something is screwed up in the install.

yum reinstall setroubleshoot-server setroubleshoot

Comment 6 Mark Harig 2010-09-13 19:16:12 UTC
(In reply to comment #5)
> You you see if something is screwed up in the install.
> 
> yum reinstall setroubleshoot-server setroubleshoot


$ rpm -V setroubleshoot-server setroubleshoot || echo $?
missing     /etc/audisp/plugins.d/sedispatch.conf (Permission denied)
1

$ sudo rpm -V setroubleshoot-server setroubleshoot && echo $?
0


$ sudo yum reinstall setroubleshoot-server setroubleshoot
... (partial log of output -- let me know if you want the full log)

Installed:
  setroubleshoot.x86_64 0:2.2.96-1.fc13
  setroubleshoot-server.x86_64 0:2.2.96-1.fc13

Complete!

$ rpm -V setroubleshoot-server setroubleshoot
missing     /etc/audisp/plugins.d/sedispatch.conf (Permission denied)

$ sealert -s
Service
Exception AttributeError: "'SETroubleshootdDBus' object has no attribute 'iface'" in <bound method SETroubleshootdDBus.__del__ of <SETroubleshootdDBus object at 0x2f04640 (__main__+SETroubleshootdDBus at 0x2ed7900)>> ignored

$ sealert -bv
2010-09-13 15:14:50,283 [dbus.proxies.ERROR] Introspect error on :1.103:/org/fedoraproject/Setroubleshootd: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
2010-09-13 15:14:50,320 [dbus.ERROR] could not start dbus: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.103 was not provided by any .service files

Comment 7 Daniel Walsh 2010-09-13 19:45:49 UTC
Are you seeing anything in /var/log/messages or /var/log/setroubleshoot/setroubleshoot.log?

Comment 8 Mark Harig 2010-09-13 20:07:33 UTC
(In reply to comment #7)
> Are you seeing anything in /var/log/messages or
> /var/log/setroubleshoot/setroubleshoot.log?

Second one first: All of the recent setroubleshootd.log files are empty (I assume that you meant setroubleshootd.log and not setroubleshoot.log -- there are not setroubleshoot.log files).


# ls -l /var/log/setroubleshoot/*
-rw-r--r--. 1 root root 0 Sep 13 15:15 /var/log/setroubleshoot/setroubleshootd.log
-rw-r--r--. 1 root root 0 Sep  5 16:31 /var/log/setroubleshoot/setroubleshootd.log-20100905
-rw-r--r--. 1 root root 0 Sep 12 01:48 /var/log/setroubleshoot/setroubleshootd.log-20100912

The error messages in /var/log/messages appear to be related to the 'sealert' commands.  Here are a few lines.  I will continue looking to see if I can find anything that is possibly relevant.

# tail /var/log/messages:
]# tail -4 messages
Sep 13 15:15:34 localhost setroubleshoot: [dbus.proxies.ERROR] Introspect error on :1.1:/org/fedoraproject/Setroubleshootd: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
Sep 13 15:15:34 localhost setroubleshoot: [dbus.ERROR] could not start dbus: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.1 was not provided by any .service files
Sep 13 15:15:42 localhost setroubleshoot: abrt: detected unhandled Python exception in /usr/sbin/setroubleshootd
Sep 13 15:15:42 localhost setroubleshoot: [dbus.ERROR] could not start dbus: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1

Also, in case it is of some use:

# tail /var/log/dmesg:
EXT4-fs (sda1): mounted filesystem with ordered data mode
SELinux: initialized (dev sda1, type ext4), uses xattr
EXT4-fs (dm-2): mounted filesystem with ordered data mode
SELinux: initialized (dev dm-2, type ext4), uses xattr
EXT4-fs (dm-1): mounted filesystem with ordered data mode
SELinux: initialized (dev dm-1, type ext4), uses xattr
Adding 2097148k swap on /dev/mapper/VolGroup00-LogVol01.  Priority:-1 extents:1 across:2097148k
SELinux: initialized (dev binfmt_misc, type binfmt_misc), uses genfs_contexts

Comment 9 Mark Harig 2010-09-13 20:12:44 UTC
Also, I followed these instructions recently (yesterday) to convert my partitions' file system type from the EXT3 to the EXT4:

http://fedoraproject.org/wiki/Ext4_in_Fedora_11#How_do_I_migrate_from_Ext3_to_Ext4.3F

There is no mention on that wiki page of any ramifications for SELinux.  Am I correct in assuming that SELinux is transparent with respect to file system type, or are there some steps that need to be taken after converting to EXT4?

Comment 10 Daniel Walsh 2010-09-13 20:20:01 UTC
Yes it should not be a problem.

Are you seeing AVC message

ausearch -m avc -ts recent

Also does abrt have any information like a python traceback?

Comment 11 Mark Harig 2010-09-13 20:43:48 UTC
(In reply to comment #10)
> Yes it should not be a problem.
> 
> Are you seeing AVC message
> 
> ausearch -m avc -ts recent

# ausearch -m avc -ts recent || echo $?
<no matches>
1

> 
> Also does abrt have any information like a python traceback?

No tracebacks, just the 'abrt' messages in /var/log/messages:

Sep 13 14:46:42 localhost abrtd: Checking for unsaved crashes (dirs to check:2)
Sep 13 14:46:42 localhost abrtd: Can't create lock file '/var/spool/abrt/ccpp-1283757421-4257.lock': Permission denied
Sep 13 14:50:00 localhost setroubleshoot: abrt: detected unhandled Python exception in /usr/sbin/setroubleshootd


# /bin/ls -ld /var
drwxr-xr-x. 24 root root 4096 Sep 11 21:59 /var

# /bin/ls -ld /var/spool
drwxr-xr-x. 15 root root 4096 Oct  1  2009 /var/spool

# /bin/ls -ld /var/spool/abrt
drwxr-xr-x. 4 abrt abrt 4096 Aug 16 09:22 /var/spool/abrt

Comment 12 Mark Harig 2010-09-13 20:51:58 UTC
(In reply to comment #10)
> Yes it should not be a problem.
> 
> Are you seeing AVC message
> 

Also, there is this from /var/log/messages:

# grep -i avc /var/log/messages

Sep 12 21:40:01 localhost dbus: avc:  received policyload notice (seqno=2)
Sep 13 00:25:31 localhost dbus: avc:  received setenforce notice (enforcing=0)
Sep 13 00:25:31 localhost dbus: avc:  received setenforce notice (enforcing=0)
Sep 13 00:25:31 localhost dbus: avc:  received setenforce notice (enforcing=0)
Sep 13 00:25:49 localhost dbus: avc:  received setenforce notice (enforcing=1)
Sep 13 00:25:49 localhost dbus: avc:  received setenforce notice (enforcing=1)
Sep 13 00:25:49 localhost dbus: avc:  received setenforce notice (enforcing=1)

I had attempted to resolve problems by switching from 'enforcing' to
'permissive'.

Comment 13 Daniel Walsh 2010-09-14 18:44:35 UTC
If you become root and execute 
setroubleshoot -f

Does it throw an exception?

Comment 14 Mark Harig 2010-09-14 18:59:23 UTC
(In reply to comment #13)
> If you become root and execute 
> setroubleshoot -f
> 
> Does it throw an exception?

$ su -
Password:

# setroubleshoot -f
-bash: setroubleshoot: command not found

# whereis setroubleshoot
setroubleshoot: /etc/setroubleshoot /usr/share/setroubleshoot

# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

Comment 15 Mark Harig 2010-09-14 19:01:56 UTC
(In reply to comment #13)
> If you become root and execute 
> setroubleshoot -f
> 
> Does it throw an exception?

Did you mean 'setroubleshootd'?

# setroubleshootd -f
Traceback (most recent call last):
  File "/usr/sbin/setroubleshootd", line 43, in <module>
    name, val =  i.split("=")
ValueError: need more than 1 value to unpack

Comment 16 Daniel Walsh 2010-09-14 19:50:01 UTC
What does your /etc/sysconfig/i18n look like?

Comment 17 Daniel Walsh 2010-09-14 19:59:42 UTC
Fixed in  setroubleshoot-2.2.98-1

Comment 18 Daniel Walsh 2010-09-14 20:00:22 UTC
If you fix your /etc/sysconfig/i18n it should work.  I have changed the code to not crash if this file is not setup correctly.

Comment 19 Fedora Update System 2010-09-14 20:27:12 UTC
setroubleshoot-2.2.98-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/setroubleshoot-2.2.98-1.fc13

Comment 20 Mark Harig 2010-09-14 20:32:19 UTC
(In reply to comment #16)
> What does your /etc/sysconfig/i18n look like?

It has two non-comment lines (and several comment lines, that is, starting with the "#" character).  The non-comment lines are:

$ grep -Ev '^#' /etc/sysconfig/i18n
LANG="en_US.UTF-8"
SYSFONT="ter-u16b"

Comment 21 Mark Harig 2010-09-14 20:33:38 UTC
(In reply to comment #18)
> If you fix your /etc/sysconfig/i18n it should work.  I have changed the code to
> not crash if this file is not setup correctly.

Can you tell me what might be incorrect about my i18n file?  I would like to fix it so that it works with the current version of 'setroubleshoot'.

Comment 22 Daniel Walsh 2010-09-14 20:50:45 UTC
What do your comment lines look like?
There is a bug in setroubleshoot that is misreading your file.  I think there is a line like

LANG = 

With nothing after the = ?

Comment 23 Daniel Walsh 2010-09-14 20:55:01 UTC
Basically if there is a line without a = it will blow up

Comment 24 Fedora Update System 2010-09-15 05:24:42 UTC
setroubleshoot-2.2.98-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update setroubleshoot'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/setroubleshoot-2.2.98-1.fc13

Comment 25 Mark Harig 2010-09-15 06:14:11 UTC
(In reply to comment #23)
> Basically if there is a line without a = it will blow up

I removed all lines from /etc/sysconfig/i18n except the two I listed in Comment #20.  I am now able to start /usr/sbin/setroubleshootd with the '-f' option without any errors or traceback.  I am also able to start the SELinux Troubleshooter application from the Applications/System Tools menu without any errors.

Will the next release of 'setroubleshoot' allow me to restore the comment lines to /etc/sysconfig/i18n?  Will there be an update to 'setroubleshoot-server', too?

Comment 26 Daniel Walsh 2010-09-15 12:44:54 UTC
Yes,  

Download https://admin.fedoraproject.org/updates/setroubleshoot-2.2.98-1.fc13

And try it out.  If it fixes your problem update the karma.

Or you can just install it by executing

yum -y update --enablerepo=updates-testing setroubleshoot\*

Comment 27 Mark Harig 2010-09-15 16:49:12 UTC
(In reply to comment #26)
> Yes,  
> 
> Download https://admin.fedoraproject.org/updates/setroubleshoot-2.2.98-1.fc13
> 
> And try it out.  If it fixes your problem update the karma.
> 
> Or you can just install it by executing
> 
> yum -y update --enablerepo=updates-testing setroubleshoot\*

Confirmed.  After installing the setroubleshoot* packages from the 'updates-testing' repository and restoring my comments in the configuration file /etc/sysconfig/i18n, I am able to start the SELinux Troubleshooter, both from the Applications/System Tools menu and from the shell prompt ('sealert').

Comment 28 Fedora Update System 2010-09-27 14:39:08 UTC
setroubleshoot-2.2.99-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/setroubleshoot-2.2.99-1.fc13

Comment 29 Fedora Update System 2010-10-05 09:24:01 UTC
setroubleshoot-2.2.99-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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