Bug 527548 - setroubleshoot: [xml.ERROR] read_xml_file() libxml2.parserError: xmlParseFile() failed
setroubleshoot: [xml.ERROR] read_xml_file() libxml2.parserError: xmlParseFile...
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: setroubleshoot (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F12Target
  Show dependency treegraph
 
Reported: 2009-10-06 17:49 EDT by Nicolas Mailhot
Modified: 2012-04-27 23:30 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-01-21 16:21:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
audit_listener_database.xml (1.50 KB, application/x-xz)
2009-10-10 03:21 EDT, Nicolas Mailhot
no flags Details
Corrupted audit_listener_database.xml (7.29 KB, text/xml)
2010-12-07 21:35 EST, hkoba
no flags Details

  None (edit)
Description Nicolas Mailhot 2009-10-06 17:49:46 EDT
Description of problem:

In today's boot logs:

Oct  6 23:44:53 restorecond: Unable to watch (/home/nim/public_html/*) No such file or directory
Oct  6 23:44:57 setroubleshoot: [xml.ERROR] read_xml_file() libxml2.parserError: xmlParseFile() failed

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

setroubleshoot-2.2.33-1.fc12.x86_64
Comment 1 Daniel Walsh 2009-10-07 10:40:14 EDT
The first one is not a bug as restorecond is supposed to watch for content in public_html and you don't have that directory.

Not sure what causes the second.  Could you attach the /var/lib/setroubleshoot/audit_listener_database.xml

File, there is something in there that is causing a problem.  If you zero out this file, setroubleshoot should start working again.

> /var/lib/setroubleshoot/audit_listener_database.xml

You will loose all of your setroubleshoot data.
Comment 2 Nicolas Mailhot 2009-10-10 03:21:37 EDT
Created attachment 364333 [details]
audit_listener_database.xml
Comment 3 Daniel Walsh 2009-10-13 11:39:55 EDT
What did you compress this file with?
Comment 4 Nicolas Mailhot 2009-10-13 11:55:26 EDT
It's an xz file
Comment 5 Daniel Walsh 2009-10-13 17:00:38 EDT
Never heard of it.

I moved your xml file into /var/lib/setroubleshoot/audit_listener_database.xml


And my setroubleshoot had no problem reading the file.

setroubleshoot-2.2.37-1.fc12.x86_64
Comment 6 Daniel Walsh 2010-01-21 16:21:56 EST
If
Comment 7 hkoba 2010-12-07 21:35:56 EST
Created attachment 467348 [details]
Corrupted audit_listener_database.xml

This problem still occurs in F13. I don't know about F14.

Obviously, localized message is truncated without respecting UTF-8
character boundary. 

Note: My /etc/sysconfig/i18n is LANG="ja_JP.UTF-8"

IMHO,

*: XML is fragile, at least for critical logging purpose.
*: At the time of logging (to disk), english diag message(and/or diag#) is enough.
Localization should be a matter of its Viewer.
Comment 8 cnfixit 2012-04-26 01:47:51 EDT
I had same problem,and I change the file's code from ansi to utf-8,it's seems to be ok.

/var/lib/setroubleshoot/audit_listener_database.xml
Comment 9 Daniel Walsh 2012-04-27 11:10:50 EDT
cnfixit, I do not understand what you did?
Comment 10 cnfixit 2012-04-27 22:24:25 EDT
(In reply to comment #9)
> cnfixit, I do not understand what you did?


ah,my bad

the attachment's  encoding is ansi,and xml file's head:

<?xml version="1.0" encoding="utf-8"?>

I change the file's encoding from ansi to utf-8,it's seems
to be ok.


# uname -a
Linux localhost.localdomain 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 EDT 2010 i686 i686 i386 GNU/Linux

# cat /etc/sysconfig/i18n
LANG="zh_CN.UTF-8"
Comment 11 cnfixit 2012-04-27 23:30:44 EDT
(In reply to comment #9)
> cnfixit, I do not understand what you did?


ah,my bad

the attachment's  encoding is ansi,and xml file's head:

<?xml version="1.0" encoding="utf-8"?>

I change the file's encoding from ansi to utf-8,it's seems
to be ok.


# uname -a
Linux localhost.localdomain 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 EDT 2010 i686 i686 i386 GNU/Linux

# cat /etc/sysconfig/i18n
LANG="zh_CN.UTF-8"

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