You are not logged in.

#1 2011-09-22 15:39:27

nathan28
Member
Registered: 2011-05-18
Posts: 61

Memory leak (in Conky/python/curl?)

I'm showing ~35% mem usage on 4GB RAM with only one Firefox tab and two urxvt windows open. I'm getting conflicting information.

It looks like conky and firefox have both grabbed about half a gig together--even when I kill both and restart.

# archey says RAM: 1120 MB / 3020 MB
$ conky | dzen says 36%
# top (by mem) puts firefox at 5%, X at 1.4% and conky at .1%

# ps_mem:

[...snip]860.0 KiB + 298.5 KiB =   1.1 MiB	polkitd
952.0 KiB + 208.5 KiB =   1.1 MiB	gvfs-fuse-daemon
840.0 KiB + 360.0 KiB =   1.2 MiB	dbus-daemon (2)
920.0 KiB + 329.0 KiB =   1.2 MiB	gconfd-2
980.0 KiB + 303.0 KiB =   1.3 MiB	gvfs-gdu-volume-monitor
  1.3 MiB + 432.5 KiB =   1.7 MiB	conky
  1.2 MiB + 596.0 KiB =   1.8 MiB	udisks-daemon (2)
  1.3 MiB + 516.5 KiB =   1.8 MiB	syslog-ng (2)
  1.9 MiB + 222.5 KiB =   2.1 MiB	vim
  2.0 MiB + 308.5 KiB =   2.3 MiB	cupsd
  2.1 MiB +   1.0 MiB =   3.0 MiB	bash (3)
  3.1 MiB + 368.5 KiB =   3.5 MiB	console-kit-daemon
  5.1 MiB + 398.5 KiB =   5.5 MiB	urxvt
  6.8 MiB + 784.5 KiB =   7.6 MiB	wicd-monitor
  8.0 MiB + 473.0 KiB =   8.5 MiB	wicd
  6.7 MiB +   2.9 MiB =   9.6 MiB	sakura
 10.0 MiB +   1.0 MiB =  11.0 MiB	slim
 40.4 MiB + 746.0 KiB =  41.1 MiB	Xorg
143.6 MiB +   3.5 MiB = 147.1 MiB	firefox-bin

# memstat is a bit more revealing.

[root@thimkingpad nathan]# memstat | grep 25346
[b] 164544k: PID 25346 (/usr/bin/conky)[/b]
   6568k(    340k): /usr/lib/libssl.so.1.0.0 1409 2075 25346 1409 2075 25346...
   2208k(    152k): /usr/lib/libssh2.so.1 25346
  10280k(     20k): /usr/lib/libXfixes.so.3.1.0 2344 4402 6957 25346 26764 2...
   6152k(      8k): /usr/lib/libXdamage.so 4402 25346 26764 4402 25346 26764...
  18464k(     32k): /usr/lib/libXrandr.so 1591 2344 4402 6957 6958 25346 253...
  18524k(     56k): /usr/lib/libXi.so.6.1.0 1591 2344 4402 6957 6958 25346 2...
  18488k(     20k): /usr/lib/libXtst.so.6 1591 2344 4402 6957 6958 25346 253...
  15104k(    600k): /usr/lib/libfreetype.so.6.7.1 1831 1833 4402 6957 25346 ...
  12536k(    200k): /usr/lib/libfontconfig.so.1.4.4 1831 4402 6957 25346 253...
  16392k(      8k): /usr/lib/libswmhack.so.0 1591 4402 6957 6958 25346 25347...
   7568k(   1316k): /usr/lib/libxml2.so.2.7.8 4402 25346 26764 4402 25346 26...
   8272k(     80k): /usr/lib/libXft.so.2 1831 6957 25346 25347 1831 6957 253...
   2396k(    340k): /usr/lib/libImlib2.so.1 25346
   2432k(    372k): /usr/lib/libcurl.so.4 25346
   2076k(     28k): /usr/lib/libiw.so 25346
    356k(    348k): /usr/bin/conky 25346
  10668k(    348k): /lib/libncursesw.so.5.9 1591 5213 6958 25346 26764 1591 ...
  14424k(     60k): /lib/libbz2.so.1 1831 1833 4402 6957 25346 25347 26764 1...

But here conky isn't calling on that much by itself. Conky updates every 2 seconds and my config is:

${execpi 300 ~/Scripts/mail_counter.py} email(s)  |  ${addr wlan0}  |  BATT:${battery_short}  |  RAM:$memperc%  |  CPU: ${cpu cpu1}% ${cpu cpu2}%  |  FREE root ${fs_free /} home ${fs_free /home}

mail_counter.py is from the wiki IIRC. I didn't see python eating that much in memstat. There's that 2MB of curl but that's about it.

Lastly gmemusage portrays Firefox at ~300MB, Conky at 164MB, console-kit at 87MB, polkitd at 82MB, and udisks at 83MB.

Where's my RAM going? I had forgotten to plug my battery in and had to boot up just 15 hours ago X(


EDIT: Just rebooted, got to POST and GRUB and then got a black screen and bunch of beeping after selecting the regular kernel, which IIRC means RAM hardware issue. Able to boot into the fallback kernel fine, and into the regular one again after that. going to do a memtest.

Last edited by nathan28 (2011-09-22 15:54:25)


in the beginning was the switch operator

Offline

#2 2011-09-22 15:54:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Memory leak (in Conky/python/curl?)

Post the output of 'free -m'.

Offline

#3 2011-09-22 16:59:27

nathan28
Member
Registered: 2011-05-18
Posts: 61

Re: Memory leak (in Conky/python/curl?)

I just ran memtest, so this is probably not helpful but this is what it looks like after a reboot running the same applications:

total       used       free     shared    buffers     cached
Mem:          3020        421       2598          0         23        131
-/+ buffers/cache:        266       2754
Swap:         4095          0       4095

I am going to attempt to replicate this by ensuring that firefox & conky stay up for a few hours.


in the beginning was the switch operator

Offline

#4 2011-09-22 17:26:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Memory leak (in Conky/python/curl?)

The apps are using just 266 MB of RAM https://wiki.archlinux.org/index.php/FA … _my_RAM.3F

Offline

#5 2011-09-22 17:37:33

nathan28
Member
Registered: 2011-05-18
Posts: 61

Re: Memory leak (in Conky/python/curl?)

No, this is after reboot--earlier free was showing closer to 1GB by the apps after 15 hours uptime


in the beginning was the switch operator

Offline

#6 2011-09-22 17:44:58

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,001
Website

Re: Memory leak (in Conky/python/curl?)

Is that whole conky config? Are you using LUA scripts by any chance?

Offline

#7 2011-09-22 18:56:33

nathan28
Member
Registered: 2011-05-18
Posts: 61

Re: Memory leak (in Conky/python/curl?)

That's the whole config, piped into dzen2. Only script running is the one in that conky config:

#! /usr/bin/python

import os

username=[foo]
password=[foo]
com="wget -q -O - https://"+username+":"+password+"@mail.google.com/mail/feed/atom --no-check-certificate"

temp=os.popen(com)
msg=temp.read()
index=msg.find("<fullcount>")
index2=msg.find("</fullcount>")
fc=int(msg[index+11:index2])

if fc==0:
   print ("0 new")
else:
   print (str(fc)+" new")

Daemons running should have been:  alsa, crond, cupsd, dbus, iptables, netfs, ntpd, sensors, syslog-ng, thinkfan, wicd.


in the beginning was the switch operator

Offline

Board footer

Powered by FluxBB