GNOME Bugzilla – Bug 720179
tp-logger log corrupted
Last modified: 2015-04-29 14:51:11 UTC
Created attachment 263897 [details] Corrupted log file Not sure if it is tp-logger only bug, just in case, I file here since polari fails to start, but not empathy. Error messsage: /home/csoriano/.local/share/TpLogger/logs/idle_irc_csoriano0/chatrooms/#gnome-shell/20131209.log:318: parser error : Opening and ending tag mismatch: message line 178 and log </log> ^ /home/csoriano/.local/share/TpLogger/logs/idle_irc_csoriano0/chatrooms/#gnome-shell/20131209.log:319: parser error : Premature end of data in tag log line 3 ^ (polari:27737): tp-logger-WARNING **: Failed to parse file:'/home/csoriano/.local/share/TpLogger/logs/idle_irc_csoriano0/chatrooms/#gnome-shell/20131209.log' Segmentation fault (core dumped) And I attached the corrupted file
*** Bug 722729 has been marked as a duplicate of this bug. ***
Created attachment 267727 [details] Another one Gtk-Message: Failed to load module "canberra-gtk-module" /home/carlos/.local/share/TpLogger/logs/idle_irc_csoriano0/chatrooms/#gedit/20140129.log:16: parser error : xmlParseCharRef: invalid xmlChar value 8 me='slaf' token='' isuser='false' type='normal'>nud : just a joke about nud ^ /home/carlos/.local/share/TpLogger/logs/idle_irc_csoriano0/chatrooms/#gedit/20140129.log:16: parser error : xmlParseCharRef: invalid xmlChar value 8 token='' isuser='false' type='normal'>nud : just a joke about nud> ^ (polari:26400): tp-logger-WARNING **: Failed to parse file:'/home/carlos/.local/share/TpLogger/logs/idle_irc_csoriano0/chatrooms/#gedit/20140129.log' Segmentation fault (core dumped)
*** Bug 723883 has been marked as a duplicate of this bug. ***
*** Bug 721660 has been marked as a duplicate of this bug. ***
I'm hitting this too due to #gnome-design last night. slaf again ;-) ^ /home/christian/.local/share/TpLogger/logs/idle_irc_hergertme_5f_5f0/chatrooms/#gnome-design/20141023.log:10: parser error : xmlParseCharRef: invalid xmlChar value 8 ' id='slaf' name='slaf' token='' isuser='false' type='normal'>iio7>
*** Bug 739816 has been marked as a duplicate of this bug. ***
Mmmh, so looks like I only commented on this on irc/dupes. Unfortunately TpLogger bails out on us, so this is not something we can catch in Polari. However I don't discard that I'm doing something stupid which triggers the corruption in the first place, so let's keep this open for now.
*** Bug 729696 has been marked as a duplicate of this bug. ***
*** Bug 735563 has been marked as a duplicate of this bug. ***
*** Bug 740039 has been marked as a duplicate of this bug. ***
(In reply to comment #7) > Mmmh, so looks like I only commented on this on irc/dupes. Unfortunately > TpLogger bails out on us, so this is not something we can catch in Polari. > However I don't discard that I'm doing something stupid which triggers the > corruption in the first place, so let's keep this open for now. Empathy doesn't hit the problem and they use TpLogger. Maybe it worth to take a look
(In reply to comment #11) > (In reply to comment #7) > > Mmmh, so looks like I only commented on this on irc/dupes. Unfortunately > > TpLogger bails out on us, so this is not something we can catch in Polari. > > However I don't discard that I'm doing something stupid which triggers the > > corruption in the first place, so let's keep this open for now. > > Empathy doesn't hit the problem and they use TpLogger. Maybe it worth to take a > look Last time I checked they didn't show history in group chats, and their log window is using TpLogger's search API which apparently does not have this issue.
(In reply to comment #5) > /home/christian/.local/share/TpLogger/logs/idle_irc_hergertme_5f_5f0/chatrooms/#gnome-design/20141023.log:10: > parser error : xmlParseCharRef: invalid xmlChar value 8 > ' id='slaf' name='slaf' token='' isuser='false' > type='normal'>iio7> So at least this is definitively a TpLogger bug: Messages are escaped using the GMarkup API (a *subset* of XML), while parsing is done using libxml2 (full-blown XML). In particular the documentation for g_markup_escape_text() explicitly mentions: "Note also that this function will produce character references in the range of &x1; ... &x1f; for all control sequences except for tabstop, newline and carriage return. The character references in this range are not valid XML 1.0, but they are valid XML 1.1 and will be accepted by the GMarkup parser."
Arguably comment 13 tells us there are two bugs in tp-logger! Firstly it writes corrupt log files and secondly it can SEGVs when asked to parse a corrupted file. Having polari crash at startup was bugging me a little and, thankfully, the later problem is actually a very easy fix. I have posted a patch: https://bugs.freedesktop.org/attachment.cgi?id=114349&action=edit I'd be interested to know if this is sufficient to fix the issue for others.
Relevant patches are in https://bugs.freedesktop.org/show_bug.cgi?id=40675 and https://bugs.freedesktop.org/show_bug.cgi?id=89595 The patch in the first bug is enough to handle all the faulty log files that I could find related to this bug. I don't know why the logs are being written like that in the first place.
All patches pushed and bugs closed. A new telepathy-logger release will appear shortly.