After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720179 - tp-logger log corrupted
tp-logger log corrupted
Status: RESOLVED NOTGNOME
Product: polari
Classification: Applications
Component: general
unspecified
Other Linux
: Normal blocker
: ---
Assigned To: Polari maintainers
Polari maintainers
: 721660 722729 723883 729696 735563 739816 740039 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-12-10 09:28 UTC by Carlos Soriano
Modified: 2015-04-29 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Corrupted log file (59.25 KB, text/plain)
2013-12-10 09:28 UTC, Carlos Soriano
Details
Another one (11.72 KB, text/x-log)
2014-01-31 13:13 UTC, Carlos Soriano
Details

Description Carlos Soriano 2013-12-10 09:28:00 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
Comment 1 Carlos Soriano 2014-01-31 13:11:30 UTC
*** Bug 722729 has been marked as a duplicate of this bug. ***
Comment 2 Carlos Soriano 2014-01-31 13:13:05 UTC
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&#x8;
                                                                               ^
/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&#x8;&gt;&#x8;
                                                                               ^

(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)
Comment 3 Daniel Korostil 2014-02-13 23:03:53 UTC
*** Bug 723883 has been marked as a duplicate of this bug. ***
Comment 4 Florian Müllner 2014-02-22 00:25:08 UTC
*** Bug 721660 has been marked as a duplicate of this bug. ***
Comment 5 Christian Hergert 2014-10-24 20:35:43 UTC
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&#x8;&gt;&#x8;
Comment 6 Florian Müllner 2014-11-08 13:47:57 UTC
*** Bug 739816 has been marked as a duplicate of this bug. ***
Comment 7 Florian Müllner 2014-11-12 20:06:57 UTC
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.
Comment 8 Florian Müllner 2014-11-12 20:07:18 UTC
*** Bug 729696 has been marked as a duplicate of this bug. ***
Comment 9 Florian Müllner 2014-11-12 20:07:25 UTC
*** Bug 735563 has been marked as a duplicate of this bug. ***
Comment 10 Florian Müllner 2014-11-12 23:31:53 UTC
*** Bug 740039 has been marked as a duplicate of this bug. ***
Comment 11 Carlos Soriano 2014-11-13 10:09:05 UTC
(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
Comment 12 Florian Müllner 2014-11-13 10:12:29 UTC
(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.
Comment 13 Florian Müllner 2014-11-28 16:55:15 UTC
(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&#x8;&gt;&#x8;

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."
Comment 14 Daniel Thompson 2015-03-16 14:57:59 UTC
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.
Comment 15 Debarshi Ray 2015-04-20 12:22:54 UTC
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.
Comment 16 Debarshi Ray 2015-04-29 14:51:11 UTC
All patches pushed and bugs closed. A new telepathy-logger release will appear shortly.