≡ Menu

Redhat Dovecot error while loading shared libraries: libsepol.so.1: failed to map segment from shared object: Cannot allocate memory

If you have recently updated your Red Hat Enterprise Linux Server release 5.1 (Tikanga) / CentOS 5.1, dovecot imap server might give out the following error:

Nov 5 13:21:13 p5ora1 dovecot: imap-login: imap-login: error while loading shared libraries: libsepol.so.1: failed to map segment from shared object: Cannot allocate memory
Nov 5 13:21:13 p5ora1 dovecot: pop3-login: pop3-login: error while loading shared libraries: libsepol.so.1: failed to map segment from shared object: Cannot allocate memory

This error is not related to shared libraries. You need to set maximum process size in megabytes. If you don't use login_process_per_connection you might need to grow this. Just open /etc/dovecot.conf file
# vi /etc/dovecot.conf
Find line read as follows:
login_process_size
Uncomment and set it to 64:
login_process_size = 64
Save and close the file. Restart dovecot imap server:
# /etc/init.d/dovecot restart

The Dovecot package on x86_64 (64 bit system) kernels requires the parameter "login_process_size = 64" to be added to /etc/dovecot.conf after an upgrade to RHEL / CentOS 5.1.

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

Comments on this entry are closed.

  • David Park November 12, 2007, 6:50 pm

    Hey Thank you for htis post. Saved us a days of work!!

  • Brian Christensen December 3, 2007, 4:58 pm

    Thank you for posting this information. Without it our mail server would have been down for much longer than it was.

  • Jason Williams December 4, 2007, 10:01 pm

    Thank you for this.

    Took me a little bit to figure out the error then popped right up to your site via google.

    Squirrelmail was just hanging, with no input then looked in the maillog to find this.

  • Gregg Lain December 5, 2007, 7:53 pm

    What really bugs/bothers is this:

    [root man1]# service dovecot restart
    Stopping Dovecot Imap: [ OK ]
    Starting Dovecot Imap: [ OK ]

    yet in /var/log/mail is....

    Dec 5 11:34:54 genesis dovecot: pop3-login: pop3-login: error while loading shared libraries: libsepol.so.1: failed to map segment from shared object: Cannot allocate memory
    Dec 5 11:34:54 genesis dovecot: child 9852 (login) returned error 127

    .. basically that dovecot can start "OK" yet its not really "ok"

    Thank you for the tip - this really helped ix things quickly!!

  • Oren December 8, 2007, 9:45 pm

    Thanks!!!!

  • ponda December 20, 2007, 5:58 am

    Thanks, saved me time too. Appreciated!

  • Sorb January 10, 2008, 6:40 pm

    Thanks a million!!

  • Clinton Goudie-Nice January 17, 2008, 8:09 pm

    Thanks for the tip. Got me back up right away!

  • Mike January 22, 2008, 6:22 pm

    Thanks a lot !

  • B. Tucker January 23, 2008, 10:57 am

    Awesome.. thanks – first hit on google search – wasn’t even down 3 minutes!

  • Fabien January 24, 2008, 10:18 am

    Thanks a lot :)

  • Alexey A. Astashov February 25, 2008, 11:24 am

    YEEESSSS!!!! THANKS!!!!

  • redhatcat March 12, 2008, 12:43 am

    That was easy. Thanks for the post.

  • jasonf March 12, 2008, 3:23 am

    more kudos here ;-)

    seconded gregg, ‘starting:ok’ followed by a down process is lame. sadly i’m still getting:

    Mar 11 17:20:54 rb8 dovecot: Auth process died too early – shutting down
    Mar 11 17:20:54 rb8 dovecot: child 5366 (auth) killed with signal 11
    Mar 11 17:20:54 rb8 dovecot: Temporary failure in creating login processes, slowing down for now

    after upgrading to 5.1…. i had hopes the upgrade would fix that not add a new error

  • Tracy Reed March 17, 2008, 9:09 am

    Let me add my thanks to this long list! I upgraded to Centos 5 and dovecot crapped out. A google search turned up your page. Awesome work!

  • Nick March 18, 2008, 9:34 pm

    Thanks a lot for this information. Like others, this solution saved me a lot of time.

    Thanks again

  • max March 24, 2008, 5:06 am

    saved me lots of time with this … thanks !!!

    (and thanks google for rating this page high)

  • vinod April 6, 2008, 3:00 pm

    Thanks a lot for putting it up.. it save me a lot of work.

  • Cristian April 20, 2008, 2:38 pm

    Thanks!

    It saved a lot of time here also!

  • Evan April 28, 2008, 2:03 am

    THANKS!

  • Sander May 2, 2008, 7:41 am

    Thanks, this was a very easy and fast fix. You’re the first hit on Google!

  • redhot May 27, 2008, 8:22 pm

    Thanks! This was just a great troubleshoot!

  • arthur June 7, 2008, 1:01 pm

    wow – thanks! that saved me heaps of time!!!

  • Christopher Murtagh June 8, 2008, 4:59 am

    Awesome! Thanks so much for posting this, definitely made my day otherwise I would have been banging against SELinux trying to figure what voodoo needed.

  • Adam June 12, 2008, 6:49 pm

    Thanks. Anyone know why this was needed though? What specifically was the change that required more memory for dovecot?

  • Jim OBrien June 20, 2008, 6:24 am

    Using ispconfig in a virtuozzo linux redhat/centos environment 64 bit. Glad I stumbled across this posting saved me alot of time. Thank you!

  • Kapila July 1, 2008, 3:37 am

    —————————–
    getting error is :
    —————————–
    [root@localhost linux-i386]# ./commsconfig
    ./commsconfig: error while loading shared libraries: libesmapi.so: cannot open shared object file: No such file or directory

    —————————-
    some my infomation of os
    —————————-
    [root@localhost ~]# uname -a
    Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 i686 i386 GNU/Linux

    [root@localhost ~]# rpm -qa |grep libstdc
    compat-libstdc++-33-3.2.3-61
    libstdc++-devel-4.1.1-52.el5
    libstdc++-4.1.1-52.el5
    compat-libstdc++-296-2.96-138

    —————————-
    I did your steps but broble still there
    my comment, this problem I can’t see in fedora 8.
    please help me
    best regards
    kapila
    email kapila_r@epiclanka.net

    —————————-

  • Jean-Francois D. [iWeb] June 12, 2009, 9:57 pm

    Thank you very much, it does work.