Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a custom PAM module that works fine on our i386 development machines but when we try and use it in production on our x64 production servers with vsftpd it fails. The PAM module has been recompiled for x64.


Nov 12 18:29:06 [removed] vsftpd: PAM unable to dlopen(/lib/x86_64-linux-gnu/security/ failed to map segment from shared object: Cannot allocate memory

(n.b We have a huge amount of free memory)


Nov 12 18:29:06 [removed]  kernel: [13831373.215161] vsftpd[6955]: segfault at 968 ip 00007fc50dabc8f0 sp 00007fff755e1a30 error 4 in[7fc50dab6000+18000]

However, using the pamtester tool it works fine:

[removed]:~/pamtester-0.1.2/src$ ./pamtester vsftpd.databowl <removed> authenticate
pamtester: successfully authenticated

We are unsure what is causing this error. Does anyone know how to solve this or have any suggestions on how we could further debug it?

share|improve this question
up vote 3 down vote accepted

Just after I posted this I managed to solve it. It turns out vsftpd limits the amount of virtual memory available using setrlimit(RLIMIT_AS, limit) I guess this was fine on 32bit but it was exhausting this on 64bit. I've not bothered to find an exact limit where this problem occurs but recompiling vsftpd and altering VSFTP_AS_LIMIT in vsftpd's defs.h to triple the limit has removed the problem and the PAM module is working great.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.