Thread View: news.software.nntp
18 messages
18 total messages
Started by Steve Crook
Sat, 05 Mar 2011 10:36
innd using excessive memory
Author: Steve Crook
Date: Sat, 05 Mar 2011 10:36
Date: Sat, 05 Mar 2011 10:36
47 lines
3093 bytes
3093 bytes
Hi all, Two days ago I upgraded to INN 2.6.0 (20110303 prerelease). Since then, each night the server has exhausted its memory and started killing processes, starting with innd. Mar 5 02:44:43 news kernel: [45680.742618] innd invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0 Mar 5 02:44:43 news kernel: [45680.742621] innd cpuset=/ mems_allowed=0 Mar 5 02:44:43 news kernel: [45680.742623] Pid: 2133, comm: innd Not tainted 2.6.32-5-amd64 #1 Mar 5 02:44:43 news kernel: [45680.742625] Call Trace: Mar 5 02:44:43 news kernel: [45680.742630] [<ffffffff810b5e98>] ? oom_kill_process+0x7f/0x23f Mar 5 02:44:43 news kernel: [45680.742633] [<ffffffff810b63bc>] ? __out_of_memory+0x12a/0x141 Mar 5 02:44:43 news kernel: [45680.742635] [<ffffffff810b6513>] ? out_of_memory+0x140/0x172 Mar 5 02:44:43 news kernel: [45680.742637] [<ffffffff810ba271>] ? __alloc_pages_nodemask+0x4e5/0x5f4 Mar 5 02:44:43 news kernel: [45680.742640] [<ffffffff810bc229>] ? ____pagevec_lru_add+0x160/0x176 Mar 5 02:44:43 news kernel: [45680.742643] [<ffffffff810cc725>] ? handle_mm_fault+0x27a/0x80f Mar 5 02:44:43 news kernel: [45680.742647] [<ffffffff812fe0b6>] ? do_page_fault+0x2e0/0x2fc Mar 5 02:44:43 news kernel: [45680.742650] [<ffffffff812fbf55>] ? page_fault+0x25/0x30 Although the process was killed, the memory doesn't appear to be released, but no more is consumed. The kernel then goes on to kill a few more heavy processes until a stable state is achieved. At the moment, top is showing: Mem: 8191300k total, 2439904k used, 5751396k free, 31804k buffers Swap: 4198928k total, 0k used, 4198928k free, 1837468k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2497 news 20 0 448m 244m 188m D 9 3.1 1:16.51 innd This is about 15 minutes after a reboot and it will continue rise at a steady rate until the server kills it again. If there's any more info I can provide to help locate the cause, please let me know. Server is configured with: ./configure --with-perl --with-openssl --with-sendmail=/usr/sbin/sendmail --enable-ipv6
Re: innd using excessive memory
Author: Julien ÉLIE
Date: Sat, 05 Mar 2011 12:33
Date: Sat, 05 Mar 2011 12:33
42 lines
2397 bytes
2397 bytes
Hi Steve, > Two days ago I upgraded to INN 2.6.0 (20110303 prerelease). Since then, > each night the server has exhausted its memory and started killing > processes, starting with innd. Is it innd that uses memory or another process? Does it happen during expire/expireover? > Although the process was killed, the memory doesn't appear to be > released, but no more is consumed. Memory consumption is therefore done by another process, isn't it? But why would the kernel kill innd first, and not the other process? > This is about 15 minutes after a reboot and it will continue rise > at a steady rate until the server kills it again. Memory leaking somewhere (?) But it would be released when a process is killed. > If there's any more > info I can provide to help locate the cause, please let me know. > > Server is configured with: > ../configure --with-perl --with-openssl > --with-sendmail=/usr/sbin/sendmail --enable-ipv6 Does it also happen when Perl filters are disabled? (via ctlinnd — no need to reconfigure) -- Julien ÉLIE « L'art de la médecine consiste à distraire le malade pendant que la nature le guérit. » (Voltaire)
Re: innd using excessive memory
Author: Julien ÉLIE
Date: Sat, 05 Mar 2011 19:19
Date: Sat, 05 Mar 2011 19:19
13 lines
1460 bytes
1460 bytes
Hi Steve, > Two days ago I upgraded to INN 2.6.0 (20110303 prerelease). What was the previous version? Another 2.6.0 (what date, approximatively?) or a 2.5.x? -- Julien ÉLIE « L'art de la médecine consiste à distraire le malade pendant que la nature le guérit. » (Voltaire)
Re: innd using excessive memory
Author: Steve Crook
Date: Sat, 05 Mar 2011 21:00
Date: Sat, 05 Mar 2011 21:00
45 lines
3065 bytes
3065 bytes
On Sat, 05 Mar 2011 13:33:12 +0100, Julien ÉLIE wrote in Message-Id: <8teos8F4l7U1@mid.individual.net>: > Is it innd that uses memory or another process? > Does it happen during expire/expireover? Hi Julien, So far I've failed to identify exactly what is happening. Running 'free' shows all the memory consumed, including 4GB of swap. Running 'top' though reveals no processes consuming memory. It isn't linked to expire/expireover times. >> Although the process was killed, the memory doesn't appear to be >> released, but no more is consumed. > > Memory consumption is therefore done by another process, isn't it? But > why would the kernel kill innd first, and not the other process? Actually today the kernel did kill other processes first (mysql and apache). I'm not sure how the oom-killer task sequences the order of killing. > Memory leaking somewhere (?) > But it would be released when a process is killed. I'm very suspcious that it might be a Perl Regex backtracking issue. There have been some complex articles coming out of Newsguy lately that have locked up filtering by having thousands of consecutive vertical whitespace characters. I'd have expected this to show up in tools like ps and top though. >> Server is configured with: >> ../configure --with-perl --with-openssl >> --with-sendmail=/usr/sbin/sendmail --enable-ipv6 > > Does it also happen when Perl filters are disabled? (via ctlinnd — no > need to reconfigure) I'm running it with 'ctlinnd perl no' at the moment. Memory usage is still creeping up but this might just be due to the spooled backlog of articles being processed. Mem: 8191300k total, 3986300k used, 4205000k free, 244248k buffers Swap: 4198928k total, 301052k used, 3897876k free, 2923916k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 6376 news 20 0 440m 316m 267m S 0 4.0 0:49.53 innd
Re: innd using excessive memory
Author: Steve Crook
Date: Sat, 05 Mar 2011 21:04
Date: Sat, 05 Mar 2011 21:04
10 lines
1453 bytes
1453 bytes
On Sat, 05 Mar 2011 20:19:16 +0100, Julien ÉLIE wrote in Message-Id: <8tfglkF58nU1@mid.individual.net>: >> Two days ago I upgraded to INN 2.6.0 (20110303 prerelease). > > What was the previous version? > > Another 2.6.0 (what date, approximatively?) or a 2.5.x? Another 2.6.0 from about mid January.
Re: innd using excessive memory
Author: John F. Morse
Date: Sat, 05 Mar 2011 23:29
Date: Sat, 05 Mar 2011 23:29
20 lines
2016 bytes
2016 bytes
Steve Crook wrote: > I'm very suspcious that it might be a Perl Regex backtracking issue. > There have been some complex articles coming out of Newsguy lately that > have locked up filtering by having thousands of consecutive vertical > whitespace characters. I'd have expected this to show up in tools like > ps and top though. After watching Newsguy for the past couple of years, I'm surprised they haven't been dealt the Usenet Death Penalty. Don't know how effective it would be though, since they are in bed with Highwinds. -- John When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Re: innd using excessive memory
Author: Julien ÉLIE
Date: Sun, 06 Mar 2011 20:21
Date: Sun, 06 Mar 2011 20:21
38 lines
2771 bytes
2771 bytes
Hi Steve, > It isn't linked to expire/expireover times. > > Actually today the kernel did kill other processes first (mysql and > apache). I'm not sure how the oom-killer task sequences the order of > killing. Did you change other things at the same time you upgraded from a CURRENT version dating back to January, to the last CURRENT version? I have just reviewed the changes made since January and do not see anything suspicious that could generate an increase in memory consumption. > I'm very suspcious that it might be a Perl Regex backtracking issue. > There have been some complex articles coming out of Newsguy lately that > have locked up filtering by having thousands of consecutive vertical > whitespace characters. I'd have expected this to show up in tools like > ps and top though. Reloading Perl filters with "ctlinnd reload filter.perl ''" does not do the trick because Perl is not closed. The interpreter is still here and the functions only re-evaluated. Only a ctlinnd xexec command will work, but that's overkill… Incidentally, what happens during regex backtracking issues? Is innd hanging until the filter has processed the article? I wonder whether a timeout could be put somewhere in Cleanfeed (or directly in innd and nnrpd?). I do not know if and how Perl handles a run that takes too much time… -- Julien ÉLIE « Quand on aime on ne compte pas… Ça tombe bien, je suis mauvaise en calcul ! »
Re: innd using excessive memory
Author: Steve Crook
Date: Mon, 07 Mar 2011 10:33
Date: Mon, 07 Mar 2011 10:33
33 lines
2916 bytes
2916 bytes
On Sun, 06 Mar 2011 21:21:12 +0100, Julien ÉLIE wrote in
Message-Id: <8ti8loFce0U1@mid.individual.net>:
> Did you change other things at the same time you upgraded from a CURRENT
> version dating back to January, to the last CURRENT version?
I upgraded the server from Debian Lenny to Squeeze about a week before.
It ran fine for that week but it's possible that something in Squeeze is
causing the problem.
> I have just reviewed the changes made since January and do not see
> anything suspicious that could generate an increase in memory consumption.
I'll do some more investigating and see what I can find. This morning
innd was still up and running following a restart at 2pm yesterday.
Memory usage is still high:
total used free
Mem: 8191300 8060992 130308
Swap: 4198928 138620 4060308
Nothing in 'top' shows what's consuming it all though.
> Incidentally, what happens during regex backtracking issues? Is innd
> hanging until the filter has processed the article?
Yes, I'd expect to see innd sat at 100% CPU and locked up until
processing of that article is completed.
> I wonder whether a timeout could be put somewhere in Cleanfeed (or
> directly in innd and nnrpd?). I do not know if and how Perl handles a
> run that takes too much time…
I'll ask the question in some of the Perl groups and see if there's a
way to terminate the process and return cleanly. The other option is to
come up with a completely alternative method of recognising binary
content in articles. It's a part of Cleanfeed I've never been happy
with as multiline regex's seem to frequently cause problems.
Re: innd using excessive memory
Author: Ray Banana
Date: Mon, 07 Mar 2011 11:13
Date: Mon, 07 Mar 2011 11:13
18 lines
2559 bytes
2559 bytes
Thus spake Steve Crook <steve@mixmin.net> > On Sun, 06 Mar 2011 21:21:12 +0100, Julien ÉLIE wrote in > Message-Id: <8ti8loFce0U1@mid.individual.net>: >> Did you change other things at the same time you upgraded from a CURRENT >> version dating back to January, to the last CURRENT version? > I upgraded the server from Debian Lenny to Squeeze about a week before. > It ran fine for that week but it's possible that something in Squeeze is > causing the problem. FWIW, I've been running INN 20110305 snapshot for more than 48 hours on a Squeeze system (full text feed) and there is nothing conspicuous or unusual as far as memory consumption is concerned. I recall seeing similar problems with a corrupt overview, however. -- Time flies like an arrow, fruit flies like a Banana. http://www.eternal-september.org
Re: innd using excessive memory
Author: Steve Crook
Date: Mon, 07 Mar 2011 14:02
Date: Mon, 07 Mar 2011 14:02
20 lines
2229 bytes
2229 bytes
On Mon, 07 Mar 2011 12:13:09 +0100, Ray Banana wrote in Message-Id: <86ei6j18vu.fsf@banana.shacknet.nu>: >> I upgraded the server from Debian Lenny to Squeeze about a week before. >> It ran fine for that week but it's possible that something in Squeeze is >> causing the problem. > > FWIW, I've been running INN 20110305 snapshot for more than 48 hours on > a Squeeze system (full text feed) and there is nothing conspicuous or > unusual as far as memory consumption is concerned. I recall seeing > similar problems with a corrupt overview, however. Thanks Ray. I've just restarted the server again after another oom-killer on innd. This time I had Perl filtering disabled (ctlinnd perl no) so I'm reasonably confident that isn't the cause. A corrupt overview is possible, certainly now as the server has been abruptly killed quite a few times. I'm not aware of any method of validating it without actually rebuilding it. Not a prospect I relish with 50GB of spool.
Re: innd using excessive memory
Author: Miquel van Smoorenburg
Date: Mon, 07 Mar 2011 22:54
Date: Mon, 07 Mar 2011 22:54
17 lines
1934 bytes
1934 bytes
In article <slrnin9d36.drg.steve@news.mixmin.net>, Steve Crook <steve@mixmin.net> wrote: >I'll do some more investigating and see what I can find. This morning >innd was still up and running following a restart at 2pm yesterday. >Memory usage is still high: > total used free >Mem: 8191300 8060992 130308 >Swap: 4198928 138620 4060308 > >Nothing in 'top' shows what's consuming it all though. You can press 'm' in top to sort by memory size. Do you have any ramfs or tmpfs filesystems in use ? Are the contents of those filesystems taking up the memory perchance ? Mike.
Re: innd using excessive memory
Author: Steve Crook
Date: Tue, 08 Mar 2011 10:06
Date: Tue, 08 Mar 2011 10:06
34 lines
3094 bytes
3094 bytes
On 07 Mar 2011 22:54:34 GMT, Miquel van Smoorenburg wrote in Message-Id: <4d75622a$0$81485$e4fe514c@news.xs4all.nl>: > You can press 'm' in top to sort by memory size. Hi Miquel, Yup. Currently innd is highest at 3.1. Mem: 8191300k total, 7944368k used, 246932k free, 146380k buffers Swap: 4198928k total, 165464k used, 4033464k free, 6999432k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 28777 news 20 0 439m 246m 199m S 0 3.1 3:51.01 innd 1664 root 20 0 122m 44m 2172 S 0 0.6 0:09.20 spamd 20269 www-data 20 0 209m 27m 3796 S 0 0.3 0:01.31 apache2 20242 www-data 20 0 209m 27m 3764 S 0 0.3 0:01.18 apache2 20264 www-data 20 0 208m 27m 3740 S 0 0.3 0:01.08 apache2 20268 www-data 20 0 208m 27m 3788 S 0 0.3 0:01.13 apache2 20271 www-data 20 0 208m 27m 3776 S 0 0.3 0:01.50 apache2 31785 www-data 20 0 209m 26m 3196 S 0 0.3 0:05.08 apache2 31768 www-data 20 0 207m 26m 3464 S 0 0.3 0:05.57 apache2 31783 www-data 20 0 207m 26m 3232 S 0 0.3 0:05.70 apache2 20270 www-data 20 0 206m 25m 3828 S 0 0.3 0:01.56 apache2 1562 bind 20 0 344m 24m 1656 S 0 0.3 2:27.22 named 1325 www-data 20 0 206m 23m 3200 S 0 0.3 0:06.30 apache2 1631 echolot 20 0 55244 14m 1128 S 0 0.2 3:14.18 pingd 2993 news 24 4 43980 11m 2140 S 0 0.1 0:00.12 controlchan 28818 news 20 0 36448 10m 2136 S 0 0.1 0:02.82 cnfsstat Total memory used (7944368k) agrees with that reported by 'free'. > Do you have any ramfs or tmpfs filesystems in use ? Are the > contents of those filesystems taking up the memory perchance ? No ram-based filesystems other than the initramfs used by Debian during boot.
Re: innd using excessive memory
Author: Wolfgang Schelongowski
Date: Thu, 10 Mar 2011 19:56
Date: Thu, 10 Mar 2011 19:56
20 lines
1996 bytes
1996 bytes
Steve Crook <steve@mixmin.net> writes: >I'll do some more investigating and see what I can find. This morning >innd was still up and running following a restart at 2pm yesterday. >Memory usage is still high: > total used free >Mem: 8191300 8060992 130308 >Swap: 4198928 138620 4060308 > >Nothing in 'top' shows what's consuming it all though. According to >User-Agent: slrn/pre1.0.0-26 (Linux) you seem to be running Linux. Are you aware that <used> includes buffers which could be reused immediately, if needed? More info is near the end of man 5 proc. Look for "sync". -- The first entry of Sin into the mind occurs when, out of cowardice or conformity or vanity, the Real is replaced by a comforting lie. -- Integritas, Consonantia, Claritas
Re: innd using excessive memory
Author: Miquel van Smoorenburg
Date: Mon, 14 Mar 2011 12:00
Date: Mon, 14 Mar 2011 12:00
40 lines
3050 bytes
3050 bytes
In article <slrninbvso.drg.steve@news.mixmin.net>, Steve Crook <steve@mixmin.net> wrote: >On 07 Mar 2011 22:54:34 GMT, Miquel van Smoorenburg wrote in >Message-Id: <4d75622a$0$81485$e4fe514c@news.xs4all.nl>: > >> You can press 'm' in top to sort by memory size. >Hi Miquel, >Yup. Currently innd is highest at 3.1. > >Mem: 8191300k total, 7944368k used, 246932k free, 146380k buffers >Swap: 4198928k total, 165464k used, 4033464k free, 6999432k cached > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND >28777 news 20 0 439m 246m 199m S 0 3.1 3:51.01 innd > 1664 root 20 0 122m 44m 2172 S 0 0.6 0:09.20 spamd >20269 www-data 20 0 209m 27m 3796 S 0 0.3 0:01.31 apache2 Well, from the looks of it it's not innd that is using all memory. I mean it uses just 3.1 % of memory. Where did the other 96.9% go ? Looks like either the kernel is leaking memory or the RAM is being used by POSIX/Sysv SHM or tmpfs/ramfs instances. >> Do you have any ramfs or tmpfs filesystems in use ? Are the >> contents of those filesystems taking up the memory perchance ? >No ram-based filesystems other than the initramfs used by Debian during >boot. Debian has more ram-based filesystems in normal operation. There's /dev/shm, /lib/init/rw, /dev, perhaps more. So see if those filesystems ( mount | egrep 'tmpfs|ramfs|shmfs' ) are filled up. Also check shared memory with 'ipcs'. Another thing to check is 'slabtop' , it will tell you the amount of kmalloc'ed memory the kernel is using and for what. If you still can't find the problem and you're running an old kernel I recommend upgrading. Mike.
Re: innd using excessive memory
Author: Miquel van Smoorenburg
Date: Mon, 14 Mar 2011 12:04
Date: Mon, 14 Mar 2011 12:04
34 lines
2582 bytes
2582 bytes
In article <ilbaea$ab$1@ID-102910.user.uni-berlin.de>,
Wolfgang Schelongowski <nospam+949ra7$h6e$1$94fljh$i3t$1$949ra7$h6e$1$94fljh$i3t$1@xivic.prima.de> wrote:
>Steve Crook <steve@mixmin.net> writes:
>
>>I'll do some more investigating and see what I can find. This morning
>>innd was still up and running following a restart at 2pm yesterday.
>>Memory usage is still high:
>> total used free
>>Mem: 8191300 8060992 130308
>>Swap: 4198928 138620 4060308
>>
>>Nothing in 'top' shows what's consuming it all though.
>
>According to
>>User-Agent: slrn/pre1.0.0-26 (Linux)
>you seem to be running Linux. Are you aware that <used> includes
>buffers which could be reused immediately, if needed? More info is
>near the end of man 5 proc. Look for "sync".
Good point. The output pasted from 'free' is incomplete. There
should be a +/- buffers/cache line, and that is the one you
should be looking at.
On my system:
$ free
total used free shared buffers cached
Mem: 4465152 1768512 2696640 0 5208 1457096
-/+ buffers/cache: 306208 4158944
Swap: 3903784 8300 3895484
The amount of available memory is 4158944, not 2696640 .
Mike.
Re: innd using excessive memory
Author: Steve Crook
Date: Wed, 16 Mar 2011 16:38
Date: Wed, 16 Mar 2011 16:38
28 lines
2523 bytes
2523 bytes
On 14 Mar 2011 12:00:55 GMT, Miquel van Smoorenburg wrote in Message-Id: <4d7e0377$0$41113$e4fe514c@news.xs4all.nl>: > Well, from the looks of it it's not innd that is using all memory. > I mean it uses just 3.1 % of memory. Where did the other 96.9% go ? > Looks like either the kernel is leaking memory or the RAM is being used > by POSIX/Sysv SHM or tmpfs/ramfs instances. Hi Mike, Thanks for your feedback. There appear to be two tempfs filesystems:- Filesystem Size Used Avail Use% Mounted on tmpfs 4.0G 0 4.0G 0% /lib/init/rw tmpfs 4.0G 0 4.0G 0% /dev/shm I'm pretty convinced that this is a problem of some kind with Perl filtering in inn. Although I'd previously stated that the problem was still occuring with filtering disabled, I think the constant crashes and restarts were clouding the issue. At the moment I've got a stable system with Perl filtering disabled and I'm trying to reintroduce the filters in a gradual manner to isolate what's causing the memory drain. It's taking a long time as only specifically crafted news articles trigger the problem. It doesn't help that I upgraded Lenny to Squeeze, compiled a new INN and updated Cleanfeed all within a short period. Bad planning!
Re: innd using excessive memory
Author: Ralf Döblitz
Date: Wed, 16 Mar 2011 22:02
Date: Wed, 16 Mar 2011 22:02
16 lines
2372 bytes
2372 bytes
Steve Crook <steve@mixmin.net> wrote: [...] > Thanks for your feedback. There appear to be two tempfs filesystems:- > > Filesystem Size Used Avail Use% Mounted on > tmpfs 4.0G 0 4.0G 0% /lib/init/rw > tmpfs 4.0G 0 4.0G 0% /dev/shm As they do not use any memory they cannot be the source of your problem. A tmpfs only allocates RAM when you actually store data on it Ralf -- Eine GABELN heißt im Fido nämlich "Echo", weil da reingegatete Artikel öfters mit anderer Message-ID wieder rauskommen.  – Oliver B. Warzecha
Re: innd using excessive memory
Author: Robert Nichols
Date: Fri, 18 Mar 2011 17:46
Date: Fri, 18 Mar 2011 17:46
24 lines
2414 bytes
2414 bytes
On 03/08/2011 04:06 AM, Steve Crook wrote: > On 07 Mar 2011 22:54:34 GMT, Miquel van Smoorenburg wrote in > Message-Id:<4d75622a$0$81485$e4fe514c@news.xs4all.nl>: > >> You can press 'm' in top to sort by memory size. > Hi Miquel, > Yup. Currently innd is highest at 3.1. > > Mem: 8191300k total, 7944368k used, 246932k free, 146380k buffers > Swap: 4198928k total, 165464k used, 4033464k free, 6999432k cached You do not have any problem with excessive memory usage. You have huge amounts of memory available, and memory management is doing exactly what it should. Look at that "6999432k cached". That is nearly 7GB of memory that is instantly available to any process that asks for it. The present content is a cache of recent file activity and is being left there simply because nothing else has asked for that space. This link is a must read for you: http://www.linuxhowtos.org/System/Linux%20Memory%20Management.htm -- Bob Nichols AT comcast.net I am "RNichols42"
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads