[xmonad] Prompt: Keys not working

Andrea Rossato mailing_list at istitutocolli.org
Sun Dec 2 06:41:51 EST 2007


On Fri, Nov 30, 2007 at 05:51:48PM -0800, Stefan O'Rear wrote:
> On Fri, Nov 30, 2007 at 07:46:41AM -0500, David Roundy wrote:
> > (Obviously) sounds like a memory leak.  Presumably we're allocating X
> > resources and never freeing them.  But since they're unused, they get
> > swapped out.  I suppose this means carefully auditing all X calls.  I wish
> > we had *slightly* higher-level X calls that did GC for us (i.e. had
> > finalizers to destroy objects when they're no longer in use).  It'd be
> > slightly problematic, since finalizers aren't guaranteed to be called at
> > exit, so we might leak something when we restart, but that seems like a
> > small danger relative to that of leaking while we run.
> 
> Not a problem.  The X connection file descriptor, if memory serves, is
> marked as FD_CLOEXEC, so when xmonad execs itself, the connection is
> closed.  Then the X server reads an EOF on the connection and deletes
> all resources, same as it does when an X program crashes.

I must confess I cannot relate to this description. I'm using very few
X applications: firefox, urxvt and xpdf, at the present moment. Plus
xmonad and xmobar.

This is the output of xrestop and top with and without firefox and
xpdf. I must confess I don't understand: I don't think xmonad and
xmobar may be leaking so much (I'm quite careful in freeing all
resource). Anyway before tonight I will have to restart X, since *all*
my swap memory is almost gone.

In xmonad only tabbed creates a GC, pixmaps and a FontStruct.

Or it must be the server itself.

Andrea


With Firefox and XPdf
=====================

xrestop - Display: localhost:0
          Monitoring 23 clients. XErrors: 0
          Pixmaps:   33497K total, Other:     253K total, All:   33751K total

res-base Wins  GCs Fnts Pxms Misc   Pxm mem  Other   Total   PID Identifier    
1400000   687   45    1  690  338    30417K     26K  30443K  2397 Firefox
0a00000     0    0    0    1    1     1536K     24B   1536K   ?   <unknown>
0600000     1   12    1   12    2      672K      1K    673K   ?   <unknown>
2600000    65   24    7   89    8      510K      9K    519K   ?   xpdf
2800000    65   22    7   52    8      357K      9K    366K   ?   xpdf
0c00000     0    1    0    0 4166        0B     97K     97K   ?   <unknown>
0e00000     8    1   13    0  452        0B     23K     23K   ?   <unknown>
0800000     1    2    1    0  888        0B     21K     21K   ?   screensaver
1000000     2    5   17    1   50        3K     18K     21K  2235 urxvt
1c00000     2    5    6    1   36      156B      7K      7K 26141 urxvt
3000000    59    8    1    0  138        0B      5K      5K   ?   <unknown>
1200000     2    5    4    1   27      624B      4K      5K  2298 urxvt
1600000     2    5    3    1   25      156B      3K      3K  2436 mc - /tmp
1a00000     2    5    3    0   23        0B      3K      3K 16418 mc - ~/devel/haskell/src/ghc/ghc/compiler/rename
1800000     2    5    3    0   23        0B      3K      3K  2500 mc - ~/devel/haskell/src/xmonad-lib/XMonadContrib
2e00000     2    5    3    0    6        0B      3K      3K 22313 ssh
2a00000     2    5    3    0    6        0B      3K      3K  5504 urxvt
2000000     2    5    3    0    6        0B      3K      3K 20716 arossato at haskell.org: /srv/code/XMonadContrib
1e00000     2    5    3    0    6        0B      3K      3K  2697 urxvt
0400000     0    2    3    0    2        0B      3K      3K   ?   <unknown>
0200000     0    1    1    0    0        0B      1K      1K   ?   <unknown>
2c00000     1    1    0    0    0        0B     48B     48B   ?   xrestop
2400000     1    0    0    0    0        0B     24B     24B   ?   <unknown>

top - 12:18:33 up 18 days,  4:24, 18 users,  load average: 0.42, 0.47, 0.25
Tasks: 169 total,   1 running, 165 sleeping,   3 stopped,   0 zombie
Cpu(s):  1.7%us,  0.7%sy,  0.0%ni, 86.1%id, 11.3%wa,  0.3%hi,  0.0%si,  0.0%st
Mem:    515900k total,   502000k used,    13900k free,    18712k buffers
Swap:   987988k total,   837844k used,   150144k free,    63904k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2397 andrea    15   0  282m 149m  14m S  0.0 29.8 141:15.99 firefox-bin
21804 andrea    16   0 86732  79m 2368 S  0.0 15.8 249:11.65 emacs-21.4-no-x
 2009 root      15   0  704m  63m 2440 S  1.0 12.7 211:45.85 X
 1985 root      15   0 19004  16m 1388 S  0.0  3.2  17:14.57 tor
23166 andrea    15   0 42432  13m 8712 S  0.0  2.7   0:01.53 ghc-6.6.1
15071 andrea    15   0 15168  11m 1584 S  0.0  2.3   0:37.14 mutt
28932 apache    15   0 50604 5332 2732 S  0.0  1.0   0:05.53 httpd
 1650 apache    15   0 49280 4600 2732 S  0.0  0.9   0:07.02 httpd
 1652 apache    15   0 49284 4600 2732 S  0.0  0.9   0:08.19 httpd
 1648 apache    15   0 49284 4592 2732 S  0.0  0.9   0:07.65 httpd
 1651 apache    15   0 49280 4592 2732 S  0.0  0.9   0:06.96 httpd
 1649 apache    15   0 49280 4536 2684 S  0.0  0.9   0:07.30 httpd
 2186 andrea    15   0 19892 4492 1228 S  0.0  0.9   0:15.68 xpdf
28935 apache    15   0 49280 4488 2668 S  0.0  0.9   0:04.68 httpd
 1756 apache    15   0 49284 4348 2732 S  0.0  0.8   0:06.40 httpd
19565 andrea    15   0 32356 3540 1640 S  0.3  0.7 129:21.36 xmobar
15056 mysql     16   0  101m 3536 1992 S  0.0  0.7   0:03.07 mysqld
16418 andrea    15   0 10004 3164 1144 S  0.0  0.6   0:03.09 urxvt
19566 andrea    15   0  9564 2740 1676 S  0.0  0.5   3:07.43 xmonad
31730 andrea    17   0  7332 2508 1856 S  0.0  0.5   0:00.21 aspell


Without Firefox and Xpdf
========================

xrestop - Display: localhost:0
          Monitoring 19 clients. XErrors: 0
          Pixmaps:    2212K total, Other:     181K total, All:    2394K total

res-base Wins  GCs Fnts Pxms Misc   Pxm mem  Other   Total   PID Identifier    
0a00000     0    0    0    1    1     1536K     24B   1536K   ?   <unknown>
0600000     1   12    1   12    2      672K      1K    673K   ?   <unknown>
0c00000     0    1    0    0 4191        0B     98K     98K   ?   <unknown>
0e00000     5    1   13    0  367        0B     21K     21K   ?   <unknown>
1000000     2    5   17    1   50        3K     18K     21K  2235 urxvt
1c00000     2    5    6    1   36      156B      7K      7K 26141 urxvt
1200000     2    5    4    1   27      624B      4K      5K  2298 urxvt
1600000     2    5    3    1   25      156B      3K      3K  2436 mc - /tmp
1a00000     2    5    3    0   23        0B      3K      3K 16418 mc - ~/devel/haskell/src/ghc/ghc/compiler/rename
1800000     2    5    3    0   23        0B      3K      3K  2500 mc - ~/devel/haskell/src/xmonad-lib/XMonadContrib
2e00000     2    5    3    0    6        0B      3K      3K 22313 ssh
2a00000     2    5    3    0    6        0B      3K      3K  5504 urxvt
2000000     2    5    3    0    6        0B      3K      3K 20716 arossato at haskell.org: /srv/code/XMonadContrib
1e00000     2    5    3    0    6        0B      3K      3K  2697 urxvt
0400000     0    2    3    0    2        0B      3K      3K   ?   <unknown>
0800000     1    2    1    0   30        0B      1K      1K   ?   screensaver
0200000     0    1    1    0    0        0B      1K      1K   ?   <unknown>
1400000     1    1    0    0    0        0B     48B     48B   ?   xrestop
2400000     1    0    0    0    0        0B     24B     24B   ?   <unknown>


top - 12:29:45 up 18 days,  4:35, 18 users,  load average: 0.29, 0.19, 0.18
Tasks: 165 total,   1 running, 161 sleeping,   3 stopped,   0 zombie
Cpu(s): 15.9%us,  1.3%sy,  0.0%ni, 82.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    515900k total,   363248k used,   152652k free,    21152k buffers
Swap:   987988k total,   781384k used,   206604k free,    71600k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
21804 andrea    15   0 86884  79m 2412 S 14.6 15.8 249:20.64 emacs-21.4-no-x
 2009 root      15   0  677m  53m 1820 S  1.0 10.6 211:54.85 X
 1985 root      15   0 19004  16m 1388 S  0.0  3.2  17:14.77 tor
15071 andrea    16   0 15296  11m 1640 S  0.0  2.3   0:37.65 mutt
23166 andrea    15   0 42432  10m 5864 S  0.0  2.2   0:01.53 ghc-6.6.1
28932 apache    15   0 50604 5332 2732 S  0.0  1.0   0:05.53 httpd
 1650 apache    15   0 49280 4600 2732 S  0.0  0.9   0:07.02 httpd
 1652 apache    15   0 49284 4600 2732 S  0.0  0.9   0:08.19 httpd
 1648 apache    15   0 49284 4592 2732 S  0.0  0.9   0:07.65 httpd
 1651 apache    15   0 49280 4592 2732 S  0.0  0.9   0:06.96 httpd
 1649 apache    15   0 49280 4536 2684 S  0.0  0.9   0:07.30 httpd
28935 apache    15   0 49280 4488 2668 S  0.0  0.9   0:04.68 httpd
31730 andrea    16   0  7332 4452 3752 S  0.0  0.9   0:00.32 aspell
 1756 apache    15   0 49284 4348 2732 S  0.0  0.8   0:06.40 httpd
15056 mysql     16   0  101m 3536 1992 S  0.0  0.7   0:03.08 mysqld
19565 andrea    15   0 32356 3528 1640 S  0.7  0.7 129:24.95 xmobar
16418 andrea    15   0 10004 3152 1144 S  0.0  0.6   0:03.09 urxvt
19566 andrea    15   0  9564 2764 1676 S  0.0  0.5   3:07.69 xmonad



More information about the xmonad mailing list