(In reply to Vlastimil Babka from comment #16) > (In reply to Jiri Slaby from comment #15) > > (In reply to Jiri Slaby from comment #14) > > > And that does pwrite(), mmap() and mremap() internally. > > > > And the winner is: > > [ 30s] error: remapslot (223): mapmem(old=0xffffffffffffffff, osz=1056768, > > nsz=1060864, fl=3, fd=4, off=868352) failed 12 > > How exactly is that log related to mremap() syscall and its parameters? Can > I assume the address and old/new sizes are 1:1 parameters? No, sorry for being misleading. The source is: https://github.com/rpm-software-management/rpm/blob/master/lib/backend/ndb/rpmxdb.c#L111 so it's in fact: mremap(MAP_FAILED, 1056768, 1060864, MREMAP_MAYMOVE); > if 'fl=3' are flags of mremap() then going by Those fl, fd and off are used as prot, fd and off resp. for mmap() -- i.e. not in this case. > At least old=0xffffffffffffffff looks quite wrong, but it should result in > EINVAL rather than ENOMEM. Ugh, right. So apparently some previous mmap() failed, i.e. returned -1 == MAP_FAILED. > In general 6.1 includes the maple tree, so that would be my first suspect to > look, but we should make sure what the mremap() parameters exactly are and > ideally get a /proc/pid/smaps snapshot upon the failure. Let me catch also the *previous* mmap() giving MAP_FAILED which is put to oldaddr.