mount helper locks it's memory using mlockall(MCL_FUTURE) to prevent memory
containing secret data being swapped out. But non-privileged user is limited to
how much memory he/she can lock at most. man mlockall:
"If MCL_FUTURE has been specified, then a later system call (e.g., mmap(2),
sbrk(2), malloc(3)), may fail if it would cause the number of locked bytes to
exceed the permitted maximum."
OK, I've found the problem:
mount helper locks it's memory using mlockall( MCL_FUTURE) to prevent memory
containing secret data being swapped out. But non-privileged user is limited to
how much memory he/she can lock at most. man mlockall:
"If MCL_FUTURE has been specified, then a later system call (e.g., mmap(2),
sbrk(2), malloc(3)), may fail if it would cause the number of locked bytes to
exceed the permitted maximum."
Without locking memory, it works