Thread View: news.software.nntp
10 messages
10 total messages
Started by Tom Ippolito
Tue, 26 Dec 2000 20:13
Expire failing can't malloc
Author: Tom Ippolito
Date: Tue, 26 Dec 2000 20:13
Date: Tue, 26 Dec 2000 20:13
21 lines
2064 bytes
2064 bytes
Hi all, and Happy Holidays, I've got a server running with just under a terabyte worth of spool. It's news daily has been failing, and unfortunately it went unnoticed. I now have a history file in excees of 3GB and need to run expire, or rebuild history, hopefully avoiding loosing what's in the spool. The error I get when expire runs is news> dbz.c:1297 Can't malloc 514893048 bytes: Not enough space The machine has 4GB of storage and about 2GB of paging, so I took a stab at raising the ulimits, to see if that would get me past it. No such luck (even after I remembered to log back in so the changes would take effect). Can anyone offer me a way out of this situation. I'll be forever in your debt ;-) If I have to byte the bullet and rebuild history, any tips before I proceed? -- Tom Ippolito Newsgroups System Administrator Prodigy Communications LP Email tom_ippolito@prodigy.net
Re: Expire failing can't malloc
Author: Russ Allbery
Date: Tue, 26 Dec 2000 20:38
Date: Tue, 26 Dec 2000 20:38
23 lines
1816 bytes
1816 bytes
Tom Ippolito <tommy@prodigy.com> writes: > I've got a server running with just under a terabyte worth of spool. > It's news daily has been failing, and unfortunately it went unnoticed. > I now have a history file in excees of 3GB and need to run expire, or > rebuild history, hopefully avoiding loosing what's in the spool. The > error I get when expire runs is > news> dbz.c:1297 Can't malloc 514893048 bytes: Not enough space > The machine has 4GB of storage and about 2GB of paging, so I took a stab > at raising the ulimits, to see if that would get me past it. No such > luck (even after I remembered to log back in so the changes would take > effect). Can anyone offer me a way out of this situation. I'll be > forever in your debt ;-) That's only 514MB... you should be able to malloc that much if you have 2GB of swap. Are you sure you got the limits successfully raised? What does ulimit -a say? -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: Expire failing can't malloc
Author: Tom Ippolito
Date: Tue, 26 Dec 2000 20:58
Date: Tue, 26 Dec 2000 20:58
36 lines
2402 bytes
2402 bytes
Russ, Thanks for your speedy reply. I set the limits back to what they were after they had no apparent effect. I'm pretty sure I tried setting data and memory to half this number first, that didn't work either. Doubled the numbers and tried again, output follows; svr05:news> dbz.c:1297 Can't malloc 514893048 bytes: Not enough space svr05:news> ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) 1048576 stack(kbytes) 32768 memory(kbytes) 1048576 coredump(blocks) 2097151 nofiles(descriptors) 2000 I misremebered the amount of swap, it's 4GB. It's been a practice here to double the physical memory and configure that much swap. It's totally uncalled for since we rarely use more than 10%. -- Tom Ippolito Newsgroups System Administrator Prodigy Communications LP Email tom_ippolito@prodigy.net Russ Allbery wrote: > That's only 514MB... you should be able to malloc that much if you have > 2GB of swap. Are you sure you got the limits successfully raised? What > does ulimit -a say? > > -- > Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: Expire failing can't malloc
Author: Russ Allbery
Date: Tue, 26 Dec 2000 21:40
Date: Tue, 26 Dec 2000 21:40
23 lines
1643 bytes
1643 bytes
Tom Ippolito <tommy@prodigy.com> writes:
> Thanks for your speedy reply. I set the limits back to what they were
> after they had no apparent effect. I'm pretty sure I tried setting data
> and memory to half this number first, that didn't work either. Doubled
> the numbers and tried again, output follows;
> svr05:news> dbz.c:1297 Can't malloc 514893048 bytes: Not enough space
> svr05:news> ulimit -a
> time(seconds) unlimited
> file(blocks) unlimited
> data(kbytes) 1048576
^^^^^^^
> stack(kbytes) 32768
> memory(kbytes) 1048576
^^^^^^^
Doesn't look like the limits were raised.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: Expire failing can't malloc
Author: Tom Ippolito
Date: Tue, 26 Dec 2000 22:21
Date: Tue, 26 Dec 2000 22:21
47 lines
2761 bytes
2761 bytes
Russ, Sorry, should have provided a before shot. The numbers you pointed out are in KB, a 1GB limit should be more than enough to allocate 0.5GB. I tried again just now, after having moved the users to another machine, figuring maybe some of the memory was tied up, still no go. svr05:news> ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) 131072 stack(kbytes) 32768 memory(kbytes) 32768 coredump(blocks) 2097151 nofiles(descriptors) 2000 Russ Allbery wrote: > > Tom Ippolito <tommy@prodigy.com> writes: > > > Thanks for your speedy reply. I set the limits back to what they were > > after they had no apparent effect. I'm pretty sure I tried setting data > > and memory to half this number first, that didn't work either. Doubled > > the numbers and tried again, output follows; > > > svr05:news> dbz.c:1297 Can't malloc 514893048 bytes: Not enough space > > > svr05:news> ulimit -a > > time(seconds) unlimited > > file(blocks) unlimited > > data(kbytes) 1048576 > ^^^^^^^ > > stack(kbytes) 32768 > > memory(kbytes) 1048576 > ^^^^^^^ > > Doesn't look like the limits were raised. > > -- > Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/> -- Tom Ippolito Newsgroups System Administrator Prodigy Communications LP Email tom_ippolito@prodigy.net
Re: Expire failing can't malloc
Author: Russ Allbery
Date: Tue, 26 Dec 2000 22:55
Date: Tue, 26 Dec 2000 22:55
18 lines
1627 bytes
1627 bytes
Tom Ippolito <tommy@prodigy.com> writes: > Sorry, should have provided a before shot. The numbers you pointed out > are in KB, a 1GB limit should be more than enough to allocate 0.5GB. I > tried again just now, after having moved the users to another machine, > figuring maybe some of the memory was tied up, still no go. > svr05:news> ulimit -a > time(seconds) unlimited > file(blocks) unlimited > data(kbytes) 131072 131,072 kbytes is about 131MB, considerably less than the 500MB that it's trying to allocate. -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: Expire failing can't malloc
Author: Tom Ippolito
Date: Wed, 27 Dec 2000 04:22
Date: Wed, 27 Dec 2000 04:22
42 lines
2837 bytes
2837 bytes
OK. The 131072KB was prior to my changing the ulimit, the number you underscored was..1048576KB, this was after changing the limit and running exec su - news, and before the last failure of "Can't malloc 514893048 bytes: Not enough space". The limit would not appear to be the problem. Any other suggestions? Thank you, -- Tom Ippolito Newsgroups System Administrator Prodigy Communications LP Email tom_ippolito@prodigy.net > > svr05:news> ulimit -a > > time(seconds) unlimited > > file(blocks) unlimited > > data(kbytes) 1048576 > ^^^^^^^ > > stack(kbytes) 32768 > > memory(kbytes) 1048576 > ^^^^^^^ Russ Allbery <rra@stanford.edu> wrote in message news:yl3dfa7pxj.fsf@windlord.stanford.edu... > Tom Ippolito <tommy@prodigy.com> writes: > > > Sorry, should have provided a before shot. The numbers you pointed out > > are in KB, a 1GB limit should be more than enough to allocate 0.5GB. I > > tried again just now, after having moved the users to another machine, > > figuring maybe some of the memory was tied up, still no go. > > > svr05:news> ulimit -a > > time(seconds) unlimited > > file(blocks) unlimited > > data(kbytes) 131072 > > 131,072 kbytes is about 131MB, considerably less than the 500MB that it's > trying to allocate. > > -- > Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: Expire failing can't malloc
Author: Russ Allbery
Date: Wed, 27 Dec 2000 11:21
Date: Wed, 27 Dec 2000 11:21
22 lines
1956 bytes
1956 bytes
Tom Ippolito <tom_ippolito@prodigy.net> writes: > The 131072KB was prior to my changing the ulimit, the number you > underscored was..1048576KB, this was after changing the limit and > running exec su - news, and before the last failure of "Can't malloc > 514893048 bytes: Not enough space". The limit would not appear to be > the problem. Any other suggestions? Ah, sorry, you're right; I just can't read. Hm. I think that expire needs to allocate twice the size of the hash, or at least mmap's half of it which could impact the same limit. So it *might* still be the limit. There just isn't that many things that cause that message. That message means that malloc failed and the operating system said the program couldn't allocate that much space. So something's preventing the program from allocating enough space. -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: Expire failing can't malloc
Author: Charlie Robot
Date: Wed, 27 Dec 2000 21:59
Date: Wed, 27 Dec 2000 21:59
47 lines
3552 bytes
3552 bytes
>OK. > The 131072KB was prior to my changing the ulimit, the number you underscored >was..1048576KB, this was after changing the limit and running exec su - news, >and before the last failure of "Can't malloc 514893048 bytes: >Not enough space". >The limit would not appear to be the problem. Any other suggestions? >Thank you, >-- > Tom Ippolito > Newsgroups System Administrator > Prodigy Communications LP > Email tom_ippolito@prodigy.net > >> > svr05:news> ulimit -a >> > time(seconds) unlimited >> > file(blocks) unlimited >> > data(kbytes) 1048576 >> ^^^^^^^ >> > stack(kbytes) 32768 >> > memory(kbytes) 1048576 >> ^^^^^^^ > >Russ Allbery <rra@stanford.edu> wrote in message >news:yl3dfa7pxj.fsf@windlord.stanford.edu... >> Tom Ippolito <tommy@prodigy.com> writes: >> >> > Sorry, should have provided a before shot. The numbers you pointed out >> > are in KB, a 1GB limit should be more than enough to allocate 0.5GB. I >> > tried again just now, after having moved the users to another machine, >> > figuring maybe some of the memory was tied up, still no go. >> >> > svr05:news> ulimit -a >> > time(seconds) unlimited >> > file(blocks) unlimited >> > data(kbytes) 131072 >> >> 131,072 kbytes is about 131MB, considerably less than the 500MB that it's >> trying to allocate. >> >> -- >> Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/> > >don't mind Russ, 'e's just overcome with christmas cheer ;) how do you invoke expire anyway if you run it from cron and you are using once of several OSen that have a login class capability, you may not gain from the ulimit changes if you have login.conf then note that cron is run with the class definition of daemon so you will need to change your login.conf definitions for both the news and daemon users in order for expire to use the higher value - i've set infinity or unlimited if you are attempting to run expire from the commandline after raising your limits but you do so by invoking su - news then you are losing the limits you set and using the default login.conf news values >
Re: Expire failing can't malloc
Author: Tom Ippolito
Date: Wed, 03 Jan 2001 16:38
Date: Wed, 03 Jan 2001 16:38
36 lines
3724 bytes
3724 bytes
Charlie, Russ,
Thanks so much for the advice! You were on the right track Russ, only I
couldn't see it. No login.conf, but the equivalent would be /etc/security/limits
in this case, which is where I was making the changes. The culprit turned out
to be the "&", running in the background uses different limits (that's
perfectly clear now in the rearview mirror). Anyway, I got desparate and
decided to rebuild the history file, it only took 8-9 hours :0) Got in trouble
again trying to run the mkdbz, that's when the problem with running it in the
backgroud was discovered (running the expire in the foreground, probably would
have worked too).
Here's some food for thought however, the makedbz complained about bad lines
in the history file and aborted. I ran some simple checks, and sure enough there
were corrupt lines in the freshly built history file. The form of corruption
was either truncated lines, decapitated lines (for lack of a better term) or
merged lines. Strange eh? Put together a checker to eliminate the bad lines,
there were only 30 or so, unless some of the corruption was merged lines that still
had the correct form. After getting rid of the bad lines the makedbz ran clean,
innd restarted cleanly, and everything was back to normal, except for catching
up after being down for 24 hours.
Happy New Year!
--
Tom Ippolito
Newsgroups System Administrator
Prodigy Communications LP
Email ippolitot@prodigy.net
P.S. The daily runs out of cron;
35 0 * * * ulimit -Sd 300000; /usr/local/news/bin/news.daily expireover lowmark
Charlie Robot wrote:
> >don't mind Russ, 'e's just overcome with christmas cheer ;) how do you invoke expire anyway if you run it from cron and you are using once of several OSen that have a login class capability, you may not gain from the ulimit changes
> if you have login.conf then note that cron is run with the class definition of daemon so you will need to change your login.conf definitions for both the news and daemon users in order for expire to use the higher value - i've set infinity or unlimited
> if you are attempting to run expire from the commandline after raising your limits but you do so by invoking su - news then you are losing the limits you set and using the default login.conf news values
> >
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