[dovecot] Re: Using on AIX

Adam Lackorzynski adam at os.inf.tu-dresden.de
Wed Apr 23 18:03:22 EEST 2003


On Wed Apr 23, 2003 at 16:29:55 +0300, Timo Sirainen wrote:
> Linux and *BSD returns only EINVAL if address and/or length is invalid,
> but UNIX98 said ENOMEM can be returned too then. This is a bit annoying
> in that I can't now know if the mmap() failed because there's really no
> memory or because the address was just invalid. If it's because there's
> no memory, Dovecot will try a bit too long before failing. This should
> anyway fix:

Hmm, mmap seems broken somehow or something:

x select inbox
address=00002000 length=00002000
mmap: : Not enough space
address=04002000 length=00002000
mmap: : Not enough space
address=08002000 length=00002000
mmap: : Not enough space
address=0c002000 length=00002000
mmap: : Not enough space
address=10002000 length=00002000
mmap: : Not enough space
address=14002000 length=00002000
mmap: : Not enough space
address=18002000 length=00002000
mmap: : Not enough space
address=1c002000 length=00002000
mmap: : Not enough space
address=00002000 length=00002000
mmap: : Not enough space
....

address=1fed2000 length=00002000
mmap: : Not enough space
address=1fee2000 length=00002000
mmap: : Not enough space
address=1fef2000 length=00002000
mmap: : Not enough space
address=1ff02000 length=00002000
mmap: : Not enough space
address=1ff12000 length=00002000
mmap: : Not enough space

Program received signal SIGSEGV, Segmentation fault.
0xd017f528 in memset () from /usr/lib/libc.a(shr.o)
(gdb) bt
#0  0xd017f528 in memset () from /usr/lib/libc.a(shr.o)
#1  0x1001e64c in mail_index_init_header (index=0x2000f038, hdr=0xffffffff)
    at mail-index-open.c:231
#2  0x1001e8c8 in mail_index_create_memory (index=0x2000f038, flags=19)
    at mail-index-open.c:289
#3  0x1001eccc in mail_index_open (index=0x2000f038, flags=3)
    at mail-index-open.c:411
...

The output is from anon_mmap_fixed.

I don't have the return checks in yet, that's why the sigsegv.


Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/



More information about the dovecot mailing list