maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   dbus-daemon memory leak with batterypatch-non-kp? (https://talk.maemo.org/showthread.php?t=85960)

int_ua 2012-08-08 21:47

dbus-daemon memory leak with batterypatch-non-kp?
 
Looks like I've found the reason of my N900's reboots every 6 days of uptime: dbus-daemon takes more and more RAM.
It's only 3Mb on the start but doubles every 24 hours.
I'm going to file a bug report, you can help by checking yours with
Code:

uptime
sudo pmap $(pidof dbus-daemon) | grep total

How can I restart dbus-daemon? Even when I tried it from user 30000 it just reboots the phone.

Update: it looks like it was recaller's fault.

Update: no, it was batterypatch-non-kp

joerg_rw 2012-08-08 22:50

Re: dbus-daemon memory leak?
 
since dbus is of paramount importance to whole system, I think you hardly can restart it without system reboot


btw you must have something special there, I had uptimes of >150 days.

/j

int_ua 2012-08-09 03:56

Re: dbus-daemon memory leak?
 
Code:

$ sudo /etc/init.d/dbus restart
sort: unrecognized option `--reverse'
BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) multi-call binary

Looks like it was never tested.
Update: I've replaced the sort with a GNU sort and the script worked but it just spawns third dbus-daemon without closing the first one.

conred 2012-08-09 12:23

Re: dbus-daemon memory leak?
 
I have no experience handling dbus, but this may help to debug it.

No leak in my case:
Code:

date >> dbus.log; ps avx | grep dbus-daemon >> dbus.log
Code:

Thu Aug  9 05:11:07 CEST 2012
 1198 messageb  3380 S <  /usr/bin/dbus-daemon --system --nofork
 1559 user      3008 S <  /usr/bin/dbus-daemon --fork --print-pid 5 --print-add
 2205 user      2092 S    grep dbus-daemon
Thu Aug  9 05:15:17 CEST 2012
 1198 messageb  3380 S <  /usr/bin/dbus-daemon --system --nofork
 1559 user      3008 S <  /usr/bin/dbus-daemon --fork --print-pid 5 --print-add
 2209 user      2092 S    grep dbus-daemon
Thu Aug  9 11:56:09 CEST 2012
 1198 messageb  3380 S <  /usr/bin/dbus-daemon --system --nofork
 1559 user      3008 S <  /usr/bin/dbus-daemon --fork --print-pid 5 --print-add
 2213 user      2092 S    grep dbus-daemon
Thu Aug  9 13:21:36 CEST 2012
 1198 messageb  3380 S <  /usr/bin/dbus-daemon --system --nofork
 1559 user      3008 S <  /usr/bin/dbus-daemon --fork --print-pid 5 --print-add
 2217 user      2092 S    grep dbus-daemon
Thu Aug  9 13:53:17 CEST 2012
 1198 messageb  3380 S <  /usr/bin/dbus-daemon --system --nofork
 1559 user      3008 S <  /usr/bin/dbus-daemon --fork --print-pid 5 --print-add
 2220 user      2092 S    grep dbus-daemon


reinob 2012-08-10 09:49

Re: dbus-daemon memory leak?
 
uptime 18+ days

dbus-daemon (session): 3160K
dbus-daemon (system): 3556K

I wouldn't call that a leak (at least in my case).

int_ua 2012-08-11 04:49

Re: dbus-daemon memory leak?
 
So I started deleting all suspicious packages one by one and it looks like it was recaller's fault. Memory stays at 3552K for ~10 hours.

int_ua 2012-10-03 19:23

Re: dbus-daemon memory leak with batterypatch-non-kp?
 
Actually it stopped only after removing batterypatch-non-kp

mr_pingu 2012-10-03 19:46

Re: dbus-daemon memory leak with batterypatch-non-kp?
 
Another example of how great these "patches" are :P

reinob 2012-10-04 08:10

Re: dbus-daemon memory leak with batterypatch-non-kp?
 
Quote:

Originally Posted by mr_pingu (Post 1276009)
Another example of how great these "patches" are :P

Indeed. But it seems to be even too much for batterypatch.

Batterypatch uses dbus-scripts, which could (maybe) responsible for the leak.

The scripts run by batterypatch, which are invoked by dbus-scripts, also execute dbus commands (to know whether a call is active or not).

So perhaps this provoke-dbus-event while handle-dbus-event may trigger a bug in dbus itself. (Maybe, this is not really a re-entrancy issue, and in any case one must assume that dbus, however crappy it is, and it is, has to be re-entrant, otherwise it would be just way too crappy).

Is somebody using frequently-run dbus-activated scripts *and* also having this memory leak?

If so, is this using dbus-scripts, dbuscron, or some other means?


All times are GMT. The time now is 01:33.

vBulletin® Version 3.8.8