Does not turncate and limit size of log file

Bug #146243 reported by Sebastian Heinlein
This bug report is a duplicate of:  Bug #164412: tracker used all my disk space up. Edit Remove
12
Affects Status Importance Assigned to Milestone
tracker (Ubuntu)
In Progress
Undecided
Jamie McCracken

Bug Description

Binary package hint: tracker

I reguarly have to delete the tracker log file in ~/.local/share/tracker since it consumes several gigabyte.

It would be nice if tracker could turncate the large file and remove older logs automatically.

Revision history for this message
Jamie McCracken (jamiemcc-blueyonder) wrote :

logging is disabled by default except for errors

did you enable logging manaully? (logging is only for debugging purposes!)

if not can you let us know what errors are present?

also log is recreated whenever trackerd is restarted so should be overwritten when you next log on

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

renate@renate-laptop:tracker$ tail tracker.log
28 Sep 2007, 13:13:26:192 - ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
28 Sep 2007, 13:13:26:192 - ERROR: execution of prepared query CreateService failed due to database disk image is malformed with return code 11
28 Sep 2007, 13:13:26:192 - ERROR: CreateService uri is /usr/share//applications/screensavers/flipscreen3d.desktop
28 Sep 2007, 13:13:26:192 - ERROR: could not get file id for /usr/share//applications/screensavers/flipscreen3d.desktop - unable to continue indexing this file
28 Sep 2007, 13:13:26:193 - ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
28 Sep 2007, 13:13:26:194 - ERROR: execution of prepared query CreateService failed due to database disk image is malformed with return code 11
28 Sep 2007, 13:13:26:195 - ERROR: CreateService uri is /usr/share//applications/screensavers/molecule.desktop
28 Sep 2007, 13:13:26:195 - ERROR: could not get file id for /usr/share//applications/screensavers/molecule.desktop - unable to continue indexing this file
28 Sep 2007, 13:13:26:340 - ERROR: statement could not be finalized for CreateService with error database disk image is malformed
28 Sep 2007, 13:13:26:340 - ERROR: statement could not be finalized for GetServiceID with error database disk image is malformed

I have not touched the configuration.

Revision history for this message
Sebastian Heinlein (glatzor) wrote :
Download full text (3.6 KiB)

Oh, tracker really creates a lot of error messages. Runnig trackerd in the Terminal:

renate@renate-laptop:tracker$ trackerd | head -n 40

Tracker version 0.6.2 Copyright (c) 2005-2006 by Jamie McCracken (<email address hidden>)

This program is free software and comes without any warranty.
It is licensed under version 2 or later of the General Public License which can be viewed at http://www.gnu.org/licenses/gpl.txt

Initialising tracker...
Throttle level is 0
ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
ERROR: execution of prepared query CreateService failed due to database disk image is malformed with return code 11
ERROR: CreateService uri is /usr/local/share/applications
ERROR: could not get file id for /usr/local/share//applications - unable to continue indexing this file
ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
ERROR: execution of prepared query CreateService failed due to database disk image is malformed with return code 11
ERROR: CreateService uri is /usr/share//applications/gnome-btdownload.desktop
ERROR: could not get file id for /usr/share//applications/gnome-btdownload.desktop - unable to continue indexing this file
ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
ERROR: execution of prepared query CreateService failed due to database disk image is malformed with return code 11
ERROR: CreateService uri is /usr/share//applications/nautilus.desktop
ERROR: could not get file id for /usr/share//applications/nautilus.desktop - unable to continue indexing this file
ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
ERROR: execution of prepared query CreateService failed due to database disk image is malformed with return code 11
ERROR: CreateService uri is /usr/share//applications/gnome-panel.desktop
ERROR: could not get file id for /usr/share//applications/gnome-panel.desktop - unable to continue indexing this file
ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
ERROR: execution of prepared query CreateService failed due to database disk image is malformed with return code 11
ERROR: CreateService uri is /usr/share//applications/reclevel.desktop
ERROR: could not get file id for /usr/share//applications/reclevel.desktop - unable to continue indexing this file
ERROR: execution of prepared query GetServiceID failed due to database disk image is malformed with return code 11
ERROR: execution of prepared query CreateService failed due to database disk image ...

Read more...

Revision history for this message
Jamie McCracken (jamiemcc-blueyonder) wrote :

your database looks corrupted - pls reindex

I will add code to automatically reindex if corruption detected

for now pls run trackerd --reindex or wait for tracker 0.6.3 which forces a reindex

Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

I've got this too. So did that code ever get added?

Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

reindex does not fix the issue!

Revision history for this message
dkg (dkg0) wrote : confirmation

I'm seeing this problem with tracker 0.6.3-0ubuntu3 on a freshly-updated gutsy install as well.

in my case, the logs are filled with:

30 Oct 2007, 17:43:19:732 - ERROR: unknown service Applications
30 Oct 2007, 17:43:19:732 - ERROR: unknown service Applications
30 Oct 2007, 17:43:19:736 - ERROR: unknown service Applications
30 Oct 2007, 17:43:19:737 - ERROR: unknown service Applications
30 Oct 2007, 17:43:19:737 - ERROR: unknown service Applications
30 Oct 2007, 17:43:19:737 - ERROR: unknown service Applications
30 Oct 2007, 17:43:19:737 - ERROR: unknown service Applications
30 Oct 2007, 17:43:19:737 - ERROR: unknown service Applications
30 Oct 2007, 17:43:19:737 - ERROR: unknown service Applications
30 Oct 2007, 17:43:19:738 - ERROR: unknown service Applications

it rapidly exhausts the couple hundred megs left free in /home/ on one machine, and i need to kill it and clean it up for the machine to work properly:

killall trackerd
> ~/.local/share/tracker/tracker.log

Seems like there are several problems here:

 * writing the same error message every thousandth of a second is bad policy -- what about "last message repeated N times", the way debian's sysklogd package does it?
 * allowing the log to grow to arbitrary size is also bad policy -- what about piping it through something sensible like svlogd from the runit suite?
 * running "trackerd --reindex" just spews the same error messages to the console, so that doesn't seem to help.

Suggestions?

Revision history for this message
Mendez (ubuntu-mendez) wrote :

I'm also having this problem, with it having created 7GB of error logs in less than 24 hours filling up my /home partition.

The errors in my case seemed to be...

17 Nov 2007, 23:19:21:915 - ERROR: CreateService uri is /home/mendez/.local/share/applications/vlc-usercustom.desktop
17 Nov 2007, 23:19:21:915 - ERROR: could not get file id for /home/mendez/.local/share/applications/vlc-usercustom.desktop - unable to continue indexing this file
17 Nov 2007, 23:19:21:916 - ERROR: execution of prepared query CreateService failed due to database disk image is malformed with return code 11

And as these started after an unexpected loss of power I can believe that it is caused by database corruption (or possibly filesystem - I'd installed VLC prior to the power loss) so I'm doing a reindex.

My suggestion would be that if the program encounters more than a certain continuous number of errors it simply shuts itself down (or black lists the files causing the error if that's more appropriate). I can't see any merit in it persisting, nor to creating huge volumes of logs no-one is likely to ever wade through. It's also made worse by the logs being in /home - it would be much better if they were saved to /var - I've just had problems saving work due to home being unexpectedly full.

Revision history for this message
Jamie McCracken (jamiemcc-blueyonder) wrote :

I am working on this to reset the log after it grows over a few MBs

Note latest svn has corruption checks at startup and will automatically reindex if it detects corruption as well

Changed in tracker:
assignee: nobody → jamiemcc-blueyonder
status: New → In Progress
Revision history for this message
charsi (charsi) wrote :
Download full text (4.8 KiB)

facing the same problem.. in my case the file fills up with the following errors..

29 Jan 2008, 11:47:19:913 - ERROR: failed to prepare query GetServiceID with sql SELECT ID, IndexTime, IsDirectory, ServiceTypeID FROM Services WHERE Path = ? AND Name = ?;
due to code 26 and file is encrypted or is not a database
29 Jan 2008, 11:47:19:913 - ERROR: incorrect no of parameters 2 supplied to GetServiceID
29 Jan 2008, 11:47:19:914 - ERROR: parameter 0 could not be bound to GetServiceID
29 Jan 2008, 11:47:19:914 - ERROR: parameter 1 could not be bound to GetServiceID
29 Jan 2008, 11:47:19:914 - ERROR: execution of prepared query GetServiceID failed due to file is encrypted or is not a database with return code 21
29 Jan 2008, 11:47:19:914 - ERROR: unknown service Applications
29 Jan 2008, 11:47:19:914 - ERROR: failed to prepare query GetServiceID with sql SELECT ID, IndexTime, IsDirectory, ServiceTypeID FROM Services WHERE Path = ? AND Name = ?;
due to code 26 and file is encrypted or is not a database
29 Jan 2008, 11:47:19:914 - ERROR: incorrect no of parameters 2 supplied to GetServiceID
29 Jan 2008, 11:47:19:914 - ERROR: parameter 0 could not be bound to GetServiceID
29 Jan 2008, 11:47:19:914 - ERROR: parameter 1 could not be bound to GetServiceID
29 Jan 2008, 11:47:19:914 - ERROR: execution of prepared query GetServiceID failed due to file is encrypted or is not a database with return code 21
29 Jan 2008, 11:47:19:914 - ERROR: unknown service Applications
29 Jan 2008, 11:47:19:915 - ERROR: failed to prepare query GetServiceID with sql SELECT ID, IndexTime, IsDirectory, ServiceTypeID FROM Services WHERE Path = ? AND Name = ?;
due to code 26 and file is encrypted or is not a database
29 Jan 2008, 11:47:19:915 - ERROR: incorrect no of parameters 2 supplied to GetServiceID
29 Jan 2008, 11:47:19:915 - ERROR: parameter 0 could not be bound to GetServiceID
29 Jan 2008, 11:47:19:915 - ERROR: parameter 1 could not be bound to GetServiceID
29 Jan 2008, 11:47:19:916 - ERROR: execution of prepared query GetServiceID failed due to file is encrypted or is not a database with return code 21
29 Jan 2008, 11:47:19:916 - ERROR: unknown service Applications
29 Jan 2008, 11:47:19:916 - ERROR: failed to prepare query GetServiceID with sql SELECT ID, IndexTime, IsDirectory, ServiceTypeID FROM Services WHERE Path = ? AND Name = ?;
due to code 26 and file is encrypted or is not a database
29 Jan 2008, 11:47:19:916 - ERROR: incorrect no of parameters 2 supplied to GetServiceID
29 Jan 2008, 11:47:19:916 - ERROR: parameter 0 could not be bound to GetServiceID
29 Jan 2008, 11:47:19:916 - ERROR: parameter 1 could not be bound to GetServiceID
29 Jan 2008, 11:47:19:916 - ERROR: execution of prepared query GetServiceID failed due to file is encrypted or is not a database with return code 21
29 Jan 2008, 11:47:19:917 - ERROR: unknown service Applications
29 Jan 2008, 11:47:19:917 - ERROR: failed to prepare query GetServiceID with sql SELECT ID, IndexTime, IsDirectory, ServiceTypeID FROM Services WHERE Path = ? AND Name = ?;
due to code 26 and file is encrypted or is not a database
29 Jan 2008, 11:47:19:917 - ERROR: incorrect no of parameters 2 supplied to GetServiceID
29 Jan ...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.