
Hy, as mentioned before I use xmonad and xmonad-contrib from darcs. The Prompt-Plugin (the problem occurs both in ssh-prompt and append to file) got a bug imho: By looking into the code I found out that you can exit the prompt with a CTRL+c and move in the prompt like on Bash using CTRL+a and CTRL+e. All these command dont work at all, alle command which use a CTRL Modifier generate strange characters in the Commandprompt but dont do anything. For example the CTRL+c generates a strange chineese looking charakter, the CTRL+a produces a black dot. Perhaps its a problem with my setup: The whole system is UTF-8, but in all other applications (bash, urxvt for example) these shortcuts work so I think its a problem with xmonad. Can anybody help me with this? -- Dominik Bruhn mailto: dominik@dbruhn.de

On Thu, Nov 29, 2007 at 06:00:22PM +0100, Dominik Bruhn wrote:
Hy, as mentioned before I use xmonad and xmonad-contrib from darcs.
The Prompt-Plugin (the problem occurs both in ssh-prompt and append to file) got a bug imho: By looking into the code I found out that you can exit the prompt with a CTRL+c and move in the prompt like on Bash using CTRL+a and CTRL+e. All these command dont work at all, alle command which use a CTRL Modifier generate strange characters in the Commandprompt but dont do anything. For example the CTRL+c generates a strange chineese looking charakter, the CTRL+a produces a black dot.
Perhaps its a problem with my setup: The whole system is UTF-8, but in all other applications (bash, urxvt for example) these shortcuts work so I think its a problem with xmonad.
Can anybody help me with this?
Well, I'm using an utf-8 locale too but this is not an issue, since xmonad doesn't use the locale setting. Here I cannot reproduce your problem, but I can remember a couple of times when this problem appeared, but that was an X server problem and, upon an X server restart, the problem was gone. As far a I remember, xev reported strange key board events and that was the issue, but I'm not sure. Can you try to use "xev" to find out which key events you X server is producing? One more information: did you compile xmonad-contrib with XFT support? Thanks Andrea

Here I cannot reproduce your problem, but I can remember a couple of times when this problem appeared, but that was an X server problem and, upon an X server restart, the problem was gone. Your right, I didnt restart the X-Server for days but it helped. So
Hy, thanks a lot! Thanks -- Dominik Bruhn mailto: dominik@dbruhn.de

On Thu, Nov 29, 2007 at 06:27:37PM +0100, Dominik Bruhn wrote:
Your right, I didnt restart the X-Server for days but it helped. So thanks a lot!
As I said I'm suffering of a similar issue here and, as long as I can say, it all started when I upgraded to X.org (7.2 and now xorg-1.3). But what drives me mad is the fact the X virtual memory usage keeps growing at a reate of about 20/40 mega a day, and X will eventually eat all my swap space. The only way out is an X restart, something I really hate since it takes quite some time to restart all my applications. Right now this is what top is reporting: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2009 root 15 0 624m 60m 2636 S 1.0 12.0 191:17.24 X X has been running for not more than 16 days, a quite short period of time - if possible I never quit X and never reboot. Note that only the virtual memory usage grows: resident memory is quite constant. I tried to understand what the hell is going on, but I didn't find anything I could relate to this problem. If someone has some hints I would really appreciate. Andrea

On Fri, Nov 30, 2007 at 12:50:47PM +0100, Andrea Rossato wrote:
On Thu, Nov 29, 2007 at 06:27:37PM +0100, Dominik Bruhn wrote:
Your right, I didnt restart the X-Server for days but it helped. So thanks a lot!
As I said I'm suffering of a similar issue here and, as long as I can say, it all started when I upgraded to X.org (7.2 and now xorg-1.3).
But what drives me mad is the fact the X virtual memory usage keeps growing at a reate of about 20/40 mega a day, and X will eventually eat all my swap space. The only way out is an X restart, something I really hate since it takes quite some time to restart all my applications.
Right now this is what top is reporting:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2009 root 15 0 624m 60m 2636 S 1.0 12.0 191:17.24 X
X has been running for not more than 16 days, a quite short period of time - if possible I never quit X and never reboot.
Note that only the virtual memory usage grows: resident memory is quite constant.
I tried to understand what the hell is going on, but I didn't find anything I could relate to this problem.
If someone has some hints I would really appreciate.
(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. -- David Roundy Department of Physics Oregon State University

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.
I just want to make it clear that I suffer from this problem well *before* switching to xmonad, so I don't think this is related to xmonad. allbery_b once suggested it could be firefox, which is well know for allocating tons of pixmaps without freeing them... andrea

On Fri, Nov 30, 2007 at 06:31:57PM +0100, Andrea Rossato 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.
I just want to make it clear that I suffer from this problem well *before* switching to xmonad, so I don't think this is related to xmonad.
allbery_b once suggested it could be firefox, which is well know for allocating tons of pixmaps without freeing them...
Ah, I didn't catch this. That's a real bummer--it makes it far more challenging to catch bugs like this. :( -- David Roundy Department of Physics Oregon State University

On Fri, Nov 30, 2007 at 12:50:56PM -0500, David Roundy wrote:
On Fri, Nov 30, 2007 at 06:31:57PM +0100, Andrea Rossato 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.
I just want to make it clear that I suffer from this problem well *before* switching to xmonad, so I don't think this is related to xmonad.
allbery_b once suggested it could be firefox, which is well know for allocating tons of pixmaps without freeing them...
Ah, I didn't catch this. That's a real bummer--it makes it far more challenging to catch bugs like this. :(
(Install and) run 'xrestop' to remove all doubt. Stefan

On Fri, Nov 30, 2007 at 05:52:10PM -0800, Stefan O'Rear wrote:
On Fri, Nov 30, 2007 at 12:50:56PM -0500, David Roundy wrote:
On Fri, Nov 30, 2007 at 06:31:57PM +0100, Andrea Rossato 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.
I just want to make it clear that I suffer from this problem well *before* switching to xmonad, so I don't think this is related to xmonad.
allbery_b once suggested it could be firefox, which is well know for allocating tons of pixmaps without freeing them...
Ah, I didn't catch this. That's a real bummer--it makes it far more challenging to catch bugs like this. :(
(Install and) run 'xrestop' to remove all doubt.
Hmmmm. For some reason xrestop shows xmonad as "<unknown>". Is there something we could to to make this remove more doubt? I can identify xmonad in the list by restarting xmonad, but that seems like a poor trick for catching leaks... -- David Roundy Department of Physics Oregon State University

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. Stefan

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@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@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
participants (4)
-
Andrea Rossato
-
David Roundy
-
Dominik Bruhn
-
Stefan O'Rear