Re: MM bug

Alexey Yakovlev (jack@catalysis.nsk.su)
Fri, 31 May 1996 14:27:01 +0700 (GMT+0700)


On Thu, 30 May 1996, David Schwartz aka Joel Katz wrote:

>
> Err, it's neither. If you want process resource limits, set them.
> Lshell does this very nicely automatically upon login.

That's OK if it works. But I set the datasize limit in tcsh to 16M and it
hangs again. I checked from within the program itself that its RLIMIT_DATA
is set to 16M.
Then I looked at the kernel code (binfmt_aout.c and
binfmt_elf.c) and noticed that in the binfmt_aout.c there is a check for
data and bss segments size upon loading but there is no in binfmt_elf.c.
My system is ELF-based. gcc, kernel and almost everything else is ELF.
I have no aout libraries. Otherwise, I would check if RLIMIT_DATA does
work for aout.
So, the question is how to limit data+bss size for elf binaries.

Alexey
>
> JK
>
> On Thu, 30 May 1996, Alexey Yakovlev wrote:
>
> > On Wed, 29 May 1996, Regis DUCHESNE wrote:
> >
> > > > You can simply crash the system by issuing "grep any_string /dev/zero".
> > > > As the lines in /dev/zero have infinite length, grep tries to allocate still more
> > > > memory for its line buffer until the memory is exhausted. But no out of memory
> > > > message appear and the system gets frozen (interrupts work, but normal processes
> > >
> > > Yes, my system crashes too.
> > >
> > > Is this a kernel or a grep problem?
>

================================================================
Alexey Yakovlev, Quantum Chemistry lab.
Boreskov Institute of Catalysis, Russian Academy of Sciences
pr. Lavrentieva 5, 630090 Novosibirsk, Russia
phone: +7-(3832)-350264, fax: +7-(3832)-355766
e-mail: jack@catalysis.nsk.su
================================================================