Preload doesn't start because state file has wrong entry.

Bug #299361 reported by Martin Schaaf
92
This bug affects 19 people
Affects Status Importance Assigned to Milestone
preload (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: preload

Preload exists after start with this error message:

loading conf from /etc/preload.conf
loading state from /var/lib/preload/preload.state
failed reading state from /var/lib/preload/preload.state: line 16630: invalid tag
Exiting

This is line 16630:
0 0 0 0 0 0 0 0 0 0 0 0 0

Revision history for this message
DouglasCaixeta (douglasracaixeta) wrote :

I try to fix the lines, or comment, but there is a lot of missing numbers.

Here is my solution:
I delete the file /var/lib/preload/preload.state

Since, even reinstalling was not fixing it.

Now, I think its working. Take a look at my /var/log/preload

[Thu Apr 9 11:02:54 2009] 1294180kb available for preloading, using 0kb of it
[Thu Apr 9 11:03:14 2009] 1190420kb available for preloading, using 0kb of it
[Thu Apr 9 11:03:35 2009] 1035410kb available for preloading, using 0kb of it
[Thu Apr 9 11:03:56 2009] 978850kb available for preloading, using 0kb of it

Revision history for this message
Andrew (andrewabc) wrote :

I have exact same problem.

I created forum thread minutes before finding this bug.
http://ubuntuforums.org/showthread.php?p=8269028

You are using command to checklog
sudo tail -f /var/log/preload.log
?

I tried reinstalling and deleting the preload.state file. Still not working.

Revision history for this message
Andrew (andrewabc) wrote :

Hmm, I just noticed this was originally reported on November 2008 and second comment May 2009. Preload worked fine for me in 8.10/9.04.
Not working in 32bit 9.10 for me.

sudo tail -f /var/log/preload.log

[Sat Nov 7 23:42:42 2009] loading state from /var/lib/preload/preload.state
[Sat Nov 7 23:42:42 2009] cannot open /var/lib/preload/preload.state for reading, ignoring: No such file or directory
[Sat Nov 7 23:46:46 2009] exit requested
[Sat Nov 7 23:46:46 2009] saving state to /var/lib/preload/preload.state
[Sat Nov 7 23:47:38 2009] loading conf from /etc/preload.conf
[Sat Nov 7 23:47:38 2009] loading state from /var/lib/preload/preload.state
[Sat Nov 7 23:50:12 2009] exit requested
[Sat Nov 7 23:50:12 2009] saving state to /var/lib/preload/preload.state
[Sat Nov 7 23:51:03 2009] loading conf from /etc/preload.conf
[Sat Nov 7 23:51:03 2009] loading state from /var/lib/preload/preload.state

Not the normal
978850kb available for preloading, using 0kb of it type of info.

Revision history for this message
Spoilerhead (spoilerhead) wrote :

failed reading state from /var/lib/preload/preload.state: line 33152: invalid syntax

getting similar errors in 9.04 x64
after deleting the preload.state it works for some weeks then fails again

Changed in preload (Ubuntu):
status: New → Confirmed
Revision history for this message
Andrey-kolomytov (andrey-kolomytov) wrote :

Does not work at all in natty.
preload.state errors appear immediately - empty lines, wrong syntax, etc.

Revision history for this message
Woody (wo0dy) wrote :

Also does not working here on natty 64bit
preload.state errors appear immediately - empty lines, wrong syntax, etc.

Revision history for this message
Roberto D'Auria (everlastingfire) wrote :

I have the same problem here, on the LTS release (12.04 64bit).
After some time, preload.state gets corrupted, with comments like "line 2693: invalid tag".
Removing the line does not solve the problem, since it leads to other errors. The only way to get preload working again
is to remove preload.state.

I think this is a severe bug, for a package shipped with a LTS release.

Revision history for this message
Christian Dysthe (christian-dysthe) wrote :

Having the same problem on Ubuntu 12.10 x64 beta 2

Revision history for this message
Michael Garabedian (mikegarabedian42) wrote :

I had the same problem. Reinstalling would fix it, but just for a day or two.

I went through and wrote a script that seemed to work in restarting preload.

This script checks for errors in the preload log, saves the state and log file as an backed up log, and then reinitiates the preload. Which seems to work. It fails maybe once a week, but once the state file is rebuilt, everything operates pretty smoothly.

Put this script in /usr/local/bin, chmod +x it, and then add it to the startup applications, browse to the file and set it.
The notify-send and logger commands, will display an image on the script running so you can check it, and the logger commands will drop it in the syslog for you.

#!/bin/bash
now=$(date +"%m_%d_%Y_%H_%M")
if grep 'invalid syntax\|duplicate index\|failed' /var/log/preload.log;
        then
        service preload stop
        cp /var/log/preload.log /var/log/preload.log.$now
        cp /var/lib/preload/preload.state /var/lib/preload/preload.state.$now
        rm /var/lib/preload/preload.state
        rm /var/log/preload.log
        touch /var/lib/preload/preload.state
        touch /var/log/preload.log
        service preload start
        logger -p local0.notice -t PRELOADCHECK "There was a problem with preload, reset"
        notify-send "PRELOADCHECKER" "There was a problem with preload, it has been reset" -i /usr/share/icons/gnome/256x256/status/error.png -t 5000;
else
        logger -p local0.notice -t PRELOADCHECK "Preload has started successfully"
        notify-send "PRELOADCHECKER" "Preload has started successfully" -i /usr/share/icons/gnome/256x256/status/starred.png -t 5000
        exit 0;
fi

Revision history for this message
87dv (87dv) wrote :

Same problem on Ubuntu 14.04 x64

Revision history for this message
Mathijs Veen (matv1) wrote :

On 15.10 preload 0.6.4-2 is still in the Ubuntu software center but fails to initialize. therefore above script will do no good either.

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

The 'heat' on this bug is > 84, and no-one here argues that Preload works on recent versions of Ubuntu. Given that it doesn't work on Mint (my distribution) either, can something be done, please - such as pulling from the Ubuntu (and hence Mint?) repositories?

I add that the project (https://sourceforge.net/projects/preload/) seems abandoned.

Revision history for this message
DouglasCaixeta (douglasracaixeta) wrote :

Wow. I used linux 10 years ago. This bug was reported in 2008, still ppl are begging to get it solved. This and many other bugs to different organizations I reported and still I get "updates" on them. That is what made me disbelieve on free software. Glad I changed to windows long time ago and stopped the suffering.

Revision history for this message
vadimo (michalgejdos-azet) wrote :

Kubuntu 18.04 and the same error :-P

[Mon Sep 9 12:11:24 2019] loading conf from /etc/preload.conf
[Mon Sep 9 12:11:28 2019] loading state from /var/lib/preload/preload.state
[Mon Sep 9 12:11:29 2019] failed reading state from /var/lib/preload/preload.state: line 89365: invalid syntax
[Mon Sep 9 12:11:29 2019] Exiting

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.