[Dovecot] Panic: Trying to allocate 2147483648 bytes

David Halik dhalik at jla.rutgers.edu
Fri Mar 20 19:57:31 EET 2009


Timo Sirainen wrote:
> On Thu, 2009-03-19 at 15:25 -0400, David Halik wrote:
>   
>> So far 
>> everything is working smoothly, but when someone does a search through 
>> directory with a large number of emails, dovecot dies and prints the 
>> following message:
>>
>> [ID 107833 mail.crit] Panic: Trying to allocate 2147483648 bytes
>>     
>
> So you can easily reproduce this?
>   

Everytime and on different systems with a similar setup. Since I can't 
do debugging on the production server, I'm using a server with a similar 
setup. The only difference is probably physical memory and swap size. 
I'm now getting a different size in the panic error, but you get the idea:

Mar 20 13:32:10 er0.rutgers.edu IMAP(dhalik): : [ID 107833 mail.crit] 
Panic: Trying to allocate 2147483648 bytes

Also, I've been keeping an eye on top while this was running and it 
seems that Dovecot is growing at an amazing rate, which is why it runs 
out of room I guess:

  8081 dhalik     1  58    0 1030M  871M run      0:33  53.29% imap

This was while doing a full Pine text search for a word in a folder with 
about 1300 emails. Shortly after it died. Keep in mind that I am only 
able to reproduce this problem with the homedir on NFS and INDEX=MEMORY 
on. The same setup on local disk had no issues.

>   
>> I grabbed a backtrace if it is helpful:
>>     
>
> Yes, very helpful! Is it possible to also examine variable values?
>   

I'd love to, but it seems that is all the I can get out of Sun Studio 
unless you know some tricks. I verified that I am building with full 
debug symbols (-g -xs) and that there is no optimization.

> Could you try applying this patch:
> http://hg.dovecot.org/dovecot-1.1/rev/98a59fd61d7f
>
> and also the attached patch. What error does it fail in?
>   

I applied both patches, rebuilt dovecot 1.1.12 with full debug, and I'm 
not seeing anything different. Was there supposed to be a new error? It 
still exhibits the same behavior and eventually core dumps when it runs 
out of room, same as before.

Here's the most recent traceback:

http://pastebin.com/f4deddc23

I appreciate the help Timo.

-- 
================================
David Halik
System Administrator
OIT-CSS Rutgers University
dhalik at jla.rutgers.edu
================================



More information about the dovecot mailing list