Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 20 Mar 2024 07:00:14 +0100
From: Matthias Apitz <guru@...xarea.de>
To: yescrypt@...ts.openwall.com
Subject: Re: yescrypt && mmap(,,,,MAP_HUGETLB) && oom-kill

El día martes, marzo 19, 2024 a las 07:57:13 +0100, Solar Designer escribió:

> Hello Matthias,
> 
> On Tue, Mar 19, 2024 at 02:25:35PM +0100, Matthias Apitz wrote:
> > 11:24:13.136472 mmap(NULL, 1075838976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_HUGETLB, -1, 0) = -1 ENOMEM (Cannot allocate memory) <0.000053>
> > 11:24:13.136579 mmap(NULL, 1073766464, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fadab8ad000 <0.000016>
> > 11:24:14.607035 +++ killed by SIGKILL +++
> 
> > What does this mean exactly and how this can be avoided to crash our
> > servers in production?
> 
> It appears that you use yescrypt settings such that 1+ GiB of memory is
> needed per hash computation.  That's extreme, but if it works for your
> use case in terms of latency and throughput, it's great.  You also need
> to take care not to run out of available RAM.

Hello Alexander,

Thanks for your kind reply. As background: each of these application
server run for a webbased user application which decrypts the patron PIN
on login, i.e. yescrypt is carried out once at login. It seems now that
the stress test execution called maybe in parallel such logins and in
any case on very underpowered machine with only 3 GByte of memory.
Normal production server have 32++ GByte of memory.

Said that, and as you say "you use yescrypt settings such that 1+ GiB",
and as the strace shows that yescrypt is asking for 1075838976 bytes
which is more than 1 GByte:

printf "0x%02x\n" 1075838976
0x40200000

where can the to be used memory be configured?

Thanks

	matthias

-- 
Matthias Apitz, ✉ guru@...xarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.