OpenVZ Forum


Home » General » Support » *SOLVED* Cannot allocate memory
*SOLVED* Cannot allocate memory [message #27200] Mon, 11 February 2008 22:33
masood is currently offline  masood
Messages: 2
Registered: February 2008
Junior Member
This is a fresh install on CentOS 5 x86_64. Only one vps using minimal CentoOS 5 x86_64 template. This error comes up whenever an smtp connection is made to qmail:

/var/qmail/bin/qmail-smtpd: error while loading shared libraries: libresolv.so.2: failed to map segment from shared object: Cannot allocate memory


Here is strace on qmail-smtpd

@4000000047b0cbfb16b262fc rt_sigprocmask(SIG_UNBLOCK, [CHLD], NULL, 8) = 0
@4000000047b0cbfb16b2f76c accept(3, {sa_family=AF_INET, sin_port=htons(44100), sin_addr=inet_addr("127.0.0.1")}, [4948330099163267088]) = 0
@4000000047b0cc071e371d74 rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
@4000000047b0cc071e37f064 write(2, "tcpserver: status: 1/20\n", 24tcpserver: status: 1/20
@4000000047b0cc071e384a3c ) = 24
@4000000047b0cc071e38c73c clone(tcpserver: pid 9859 from 127.0.0.1
@4000000047b0cc071e3ca384 tcpserver: ok 9859 0:127.0.0.1:25 :127.0.0.1::44100
@4000000047b0cc071e42642c child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2aaaab016770) = 9859
@4000000047b0cc071e426814 close(0)                                = 0
@4000000047b0cc071e426bfc rt_sigprocmask(SIG_UNBLOCK, [CHLD], NULL, 8) = 0
@4000000047b0cc071e426bfc accept(3, /var/qmail/bin/qmail-smtpd: error while loading shared libraries: libresolv.so.2: failed to map segment from shared object: Cannot allocate memory
@4000000047b0cc071e484414 0x7fff4ccdf840, [16])         = ? ERESTARTSYS (To be restarted)
@4000000047b0cc071e48c114 --- SIGCHLD (Child exited) @ 0 (0) ---
@4000000047b0cc071e493a2c wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 127}], WNOHANG, NULL) = 9859
@4000000047b0cc071e4a1104 write(2, "tcpserver: end 9859 status 32512"..., 33tcpserver: end 9859 status 32512
@4000000047b0cc071e4a6ec4 ) = 33
@4000000047b0cc071e4ad83c write(2, "tcpserver: status: 0/20\n", 24tcpserver: status: 0/20
@4000000047b0cc071e4b3214 ) = 24
@4000000047b0cc071e4b8804 wait4(-1, 0x7fff4ccdf5b8, WNOHANG, NULL) = -1 ECHILD (No child processes)
@4000000047b0cc071e4c33e4 rt_sigreturn(0xffffffffffffffff)        = -1 EINTR (Interrupted system call)
@4000000047b0cc071e4cd7f4 rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
@4000000047b0cc071e4d7434 rt_sigprocmask(SIG_UNBLOCK, [CHLD], NULL, 8) = 0


# uname -rm
2.6.18-53.1.4.el5.028stab053.4 x86_64

# cat /proc/user_beancounters 
Version: 2.5
       uid  resource                     held              maxheld              barrier                limit              failcnt
      201:  kmemsize                  5301784             12394869             22980608             22980608                    0
            lockedpages                     0                    0                  256                  256                    0
            privvmpages                  5584                86101               524288               524288                    0
            shmpages                      640                 9616                21504                21504                    0
            dummy                           0                    0                    0                    0                    0
            numproc                        44                   78                  440                  440                    0
            physpages                    2385                58222                    0  9223372036854775807                    0
            vmguarpages                     0                    0               524288  9223372036854775807                    0
            oomguarpages                 2385                58222               524288  9223372036854775807                    0
            numtcpsock                      7                  147                  560                  560                    0
            numflock                       18                   25                  188                  206                    0
            numpty                          1                    3                   16                   16                    0
            numsiginfo                      0                   39                  256                  256                    0
            tcpsndbuf                   89680               636432              1433600              1433600                    0
            tcprcvbuf                   98304               375472              1433601              1433601                    0
            othersockbuf                 6960               382000              1433600              1433600                    0
            dgramrcvbuf                     0                 8464               262144               262144                    0
            numothersock                   11                   27                  560                  560                    0
            dcachesize                      0                    0              7415808              7415808                    0
            numfile                       752                 1475                19312                19312                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            numiptent                      10                   10                 1028                 1028                    0


SOLVED
It turns out the softlimit (http://cr.yp.to/daemontools/softlimit.html) setting was too low for qmail-smtpd. Increasing the value in /var/qmail/supervise/qmail-smtpd/run fixed the issue. Nothing to do with openvz :)

[Updated on: Tue, 12 February 2008 16:51]

Report message to a moderator

Previous Topic: Template for CPANEL
Next Topic: Backup Strategy for Multiple VEs
Goto Forum:
  


Current Time: Mon Sep 16 10:33:47 GMT 2024

Total time taken to generate the page: 0.04334 seconds