Yaouh! out (update for tangogps maps)
helge.hafting at hist.no
Tue Jan 20 13:54:19 CET 2009
Helge Hafting wrote:
> I noticed another problem yesterday though. I worked around the
> problem by making a symlink, and the program ran. I have
> slightly more than 50.000 tiles. After a while, Yaouh had worked through
> 12000, updating about 4000. It seems 1 in 3 tiles were changed.
> This took a lot of time, so I left it running overnight. It crashed
> sometimes during the night, and the disk was not full.
> The log file merely told that yaouh.py was
> interrupted by a segmentation fault.
> Could there be a memory leak? Or will yaouh use memory proportional to
> the number of tiles (or perhaps the number of out-of-date tiles)?
> With 128M and 50000 tiles, there is no more than 2684 bytes per tile. So
> linear memory consumption will not work well.
I think I may have found the problem. yaouh (and tangogps) outputs lots
of text while working, and this text ends up in /var/volatile/tmp/x.log
(Or /tmp/x.log, /tmp symlinks to /var/tmp which again links to
The file is currently 30M, yaouh is not the only offender, but the
file keep growing.
Now, /var/volatile is tmpfs in main memory, so I am currently wasting
30M of the precious 128M this phone has. (A quarter of all memory,
for a log file!)
This output is rarely seen by users. I guess it is useful for debugging,
but could be removed from a "production" release, or at least add a
debug flag that must be used to get output. If the amount of output is
proportional to the amount of tiles being checker or downloaded, then
some users will run out of memory just from that.
Looks like many programs like to fill this log. People who don't have
swap, and see instability after "too much" uptime, may want to check the
size of /var/volatile/tmp/x.log. My 30M accumulated over 4 days, I have
swap to help me though. It looks like tmpfs is limited to half of
memory, but the remaining 64M could get tight. Also, some programs don't
like it when /tmp gets full.
A reboot fixes this, but we don't want to reboot to clear out logfiles. :-/
More information about the community