Reply
Thread Tools
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#601
Sounds nasty! Can't say I've experienced (or at least noticed) this, but I don't use the GPS very often.

Are you sure about the non-swappable part? It doesn't seem to lock any pages here:

Code:
Nokia-N810-43-7:~# cat /proc/`pidof gpsdriver`/status
Name:	gpsdriver
State:	S (sleeping)
SleepAVG:	91%
Tgid:	4534
Pid:	4534
PPid:	363
TracerPid:	0
Uid:	0	0	0	0
Gid:	0	0	0	0
FDSize:	32
Groups:	0 
VmPeak:	    4864 kB
VmSize:	    4840 kB
VmLck:	       0 kB
VmHWM:	    1908 kB
VmRSS:	    1908 kB
VmData:	     208 kB
VmStk:	      84 kB
VmExe:	     112 kB
VmLib:	    3804 kB
VmPTE:	      18 kB
Threads:	1
SigQ:	23/1024
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000000381000
SigCgt:	0000000180002000
CapInh:	0000000000000000
CapPrm:	00000000fffffeff
CapEff:	00000000fffffeff
Did you notice anything interesting in its smaps file?

Anyway, since DSME restarts it when killed, maybe setting an appropriate ulimit in the init script and letting the kernel look after it could work?
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#602
Well, when I noticed it was using 19 MB of resident memory measured with top (psutils) and bringing the system down to a crawl while I tryed to use Opera I just asumed it was non-swappable (because otherwise it would have swapped out) and didn't investigate more and just restarted it. Then I kept an eye on it for a few days and when confirmed it was growing again I reported it.
I'll turn it on again and have a more detailed look at it, let's see what happens.
I think the ulimit could be a good idea.

Last edited by maacruz; 2010-08-26 at 22:50.
 
Posts: 232 | Thanked: 32 times | Joined on Jul 2009 @ Idaho
#603
maacruz, I have noticed that GPS does that too sometimes.
__________________
If my posts have a few misspellings or other errors, it's probably cause I'm pounding out words at the speed of insanity on my N810.
http://last.fm/mgamerz
http://twitter.com/mgamerz
http://youtube.com/mgamerz
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#604
So I have been following gpsdriver's memleak for a few days more and here is what I've found:
gpsdriver leaks no matter if the gps is in use or not, in fact using it didn't seem to have any effect in memory usage; smaps confirms that the leak happens in the heap as expected. It is swappable, and it will swap out causing speed issues when the leak has grown big, only to return shortly afterwards back entirely to resident memory the next time a leak happens, causing more issues by swap trashing when the tablet is in use.
The leak doesn't seem to have a clear pattern in time or size, the vmHWM/vmRSS seems to grow a few KB every few minutes while wmData remains constant, then about every hour, give or take half an hour, vmData/vmHWM/vmRSS will jump anywhere from 132 KB (usually) to a few hundred KB.
I'm going to set ulimit and see what happens.
 

The Following 6 Users Say Thank You to maacruz For This Useful Post:
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#605
So I did set ulimit and it didn't work at all.
Why? It seemed like dsmetool modified the ulimits, so a google search was in order to find the dsmetool source if possible. Well, I found it soon enough (http://www.freemoe.org/users/jebba/s...til/dsmetool.c) and what dsmetool does is to signal dsme, again closed source, through dbus to load the process, so the process will inherit dsme ulimits and not the rc.d script's.
The workaround, to try next, could be little ash script daemon to poll every few minutes the gpsdriver vmData size and kill it when it grows more than a given size.
 

The Following User Says Thank You to maacruz For This Useful Post:
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#606
Originally Posted by maacruz View Post
what dsmetool does is to signal dsme, again closed source, through dbus to load the process, so the process will inherit dsme ulimits and not the rc.d script's.
Argh, yeah that'll break it :-(

The workaround, to try next, could be little ash script daemon to poll every few minutes the gpsdriver vmData size and kill it when it grows more than a given size.
Perhaps a simpler option would be to wrap a shell script around gpsdriver that just sets limits and execs it, and tell dsme to start that from the init script.
 

The Following User Says Thank You to lma For This Useful Post:
Posts: 232 | Thanked: 32 times | Joined on Jul 2009 @ Idaho
#607
If only minigpsd could replace gpsd...
Edit: totally forgot why I was here in the first place. Is it possible to make an option for the rss rfeader to 'lock links'? Scrolling is a serious pain with links.
Or perhaps make it not refresh when in offline mode? Another annoying thing.
I like the widget on the home screen.
I know all I make is feature requests... wish I could do more
__________________
If my posts have a few misspellings or other errors, it's probably cause I'm pounding out words at the speed of insanity on my N810.
http://last.fm/mgamerz
http://twitter.com/mgamerz
http://youtube.com/mgamerz

Last edited by Mgamerz; 2010-09-02 at 04:16.
 
Posts: 21 | Thanked: 7 times | Joined on Feb 2008
#608
Actually, I'm using gps pretty much with a bluetooth gps mouse and navit and/or navicore and I dont see any memory leak. My uptimes are on the order of weeks and the numbers are pretty much constant.

Could it be that there is some other program interfering
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#609
We are talking here about the N810 internal gps driver
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#610
I've been fighting with gpsdriver the whole week to see how the sollution suggested by lma would work.
What I've found is that gpsdriver is terribly unstable: reboots, segfaults, erratic behaviour. All of this running in a xterm to see how the ulimit works. It doesn't, when the max vmSize is reached, it will complain with malloc failures and behave erratically instead of exiting or being killed.
So, the only sollution seems what I suggested before, a script mini daemon to kill gpsdriver when it reaches a given size. I'm actually running a similar minidaemon to notify with a led pattern when the battery is low (and turn the device in low battery profile mode, I was tired of the battery being completely drained without noticing).
Once a bit more polished, we could add that to the SSU too, providing a battery protection new feature
 

The Following 5 Users Say Thank You to maacruz For This Useful Post:
Reply

Tags
backintime, diablo cssu, diablo turbo

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:56.