[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SOLVED] Re: dovecot auth failure due to panic in libpam_fscrypt



On 04/12/2023 23:41, Max Nikulin wrote:
Installing of libpam-fscrypt caused authentication failures:

dovecot[72165]: auth-worker: Error: fatal error: failed to reserve page summary memory
dovecot[72165]: auth-worker: Error:
dovecot[72165]: auth-worker: Error: runtime stack:
dovecot[72165]: auth-worker: Error: runtime.throw({0x7f552c418194?, 0x7f552c1feb10?}) dovecot[72165]: auth-worker: Error:         runtime/panic.go:1047 +0x5f fp=0x7f552c1feac0 sp=0x7f552c1fea90 pc=0x7f552c28a53f

It happens even for an invalid user or password

curl -v 'imap://bad:bad@localhost/'

From strace of a dovecot auth process:

4468 14:27:49 mmap(NULL, 536870912, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 <unfinished ...>
4468  14:27:49 <... mmap resumed>)      = -1 ENOMEM (Cannot allocate memory)

prlimit --pid 4608
RESOURCE   DESCRIPTION                             SOFT      HARD UNITS
AS         address space limit                268435456 268435456 bytes

/etc/dovecot/conf.d/99-auth-worker-fscrypt-vsz.conf
file with the following content prevents the issue with Go runtime,
however fscrypt developers may document amount of memory required for the plugin:

service auth-worker {
  # Go language runtime in pam_fscrypt.so requires enough memory
  # default is 256M
  #vsz_limit = $default_vsz_limit
  # still crash, but later
  # vsz_limit = 800M
  vsz_limit = 1024M
}




Reply to: