Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Aug 1998 21:01:00 +0300 (EEST)
From:      Alexander Litvin <archer@lucky.net>
To:        current@FreeBSD.ORG
Subject:   Re: Reminder : can't fork
Message-ID:  <199808101801.VAA07767@grape.carrier.kiev.ua>
In-Reply-To: <199808100729.AAA03741@rah.star-gate.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <199808100729.AAA03741@rah.star-gate.com> you wrote:
AH> Hi,

AH> Your bug description sounds very similar to what I am experiencing
AH> however I can't reproduce the problem so far. Wrote a short program
AH> which allocates memory then touches every page -- repeated the
AH> same procedure till I ran out of swap space and the system kills
AH> my process which is okay. 

Have a simple way to reproduce the problem.

For me it is like that. I have 32M RAM + 128M swap. I have
a simple prog which just allocs 32M of mem and "touches" it:

----------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>

#define MEMSIZE 33554432

int
main()
        {
        int i;
        char* buf;

        buf=malloc(MEMSIZE);

        if(buf==NULL)
                {
                printf("Can't alloc mem\n");
                exit(1);
                }
        else
                for(i=0;i<MEMSIZE;i++)
                        buf[i]='a';

        free(buf);

        }
----------------------------------------------------------

For my memory configuration I need to run only 5 or 6 of them (just
'for i in 1 2 3 4 5; do ./mxhst & done', 'ulimit -d unlimited' needed
for mxhst to be able to alloc 32M of memory) to get:
"swap_pager: out of swap space". After that I have:

Aug 10 20:54:14 grape /kernel: swap_pager: out of swap space
Aug 10 20:54:19 grape /kernel: pid 7587 (mxhst), uid 0, was killed: out of swap
space
Aug 10 20:55:03 grape /kernel: pid 7615 (sendmail), uid 0: exited on signal 11
Aug 10 20:56:03 grape /kernel: pid 7617 (sendmail), uid 0: exited on signal 11
Aug 10 20:57:03 grape /kernel: pid 7619 (sendmail), uid 0: exited on signal 11
Aug 10 20:58:03 grape /kernel: pid 7620 (sendmail), uid 0: exited on signal 11

If I don't restart sendmail, it will continue the same forever.

AH> Daemons seems to stay up so I am going to have to wait till 
AH> I can reproduce the problem .

AH> 	Regards,
AH> 	Amancio

--- 
Misfortune, n.:
        The kind of fortune that never misses.
                -- Ambrose Bierce, "The Devil's Dictionary"

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808101801.VAA07767>