SIGABRT under load (tracked to vm_map_find() returning KERN_NO_SPACE)

Kris Kennaway kris at FreeBSD.org
Tue Mar 8 11:48:32 PST 2005


I finally found a good way to reproduce the SIGABRT errors I've been
seeing off and on for a long time (buildworld -j18 on a 12-processor
sparc64 running RELENG_5).

The error is originating here in kern/imgact_elf.c in the __CONCAT()
function:

                        if ((error = __elfN(load_section)(imgp->proc, vmspace,
                            imgp->vp, imgp->object, phdr[i].p_offset,
                            (caddr_t)(uintptr_t)phdr[i].p_vaddr,
                            phdr[i].p_memsz, phdr[i].p_filesz, prot,
                            sv->sv_pagesize)) != 0) {
                                printf("__elfN(load_section) %d\n",error);
                                goto fail;
                        }

On the console:

__elfN(load_section) 22
*(execsw[i]->ex_imgact)(imgp) error 22
Fell through to exec_fail
Process cc received SIGABRT
__elfN(load_section) 22
*(execsw[i]->ex_imgact)(imgp) error 22
Fell through to exec_fail
Process make received SIGABRT

i.e. __elfN(load_section) is returning EINVAL.

I instrumented the three places this is possible in
__elfN(load_section) and found the failure occurs here:

                rv = vm_map_find(exec_map,
                                 object,
                                 trunc_page(offset + filsz),
                                 &data_buf,
                                 PAGE_SIZE,
                                 TRUE,
                                 VM_PROT_READ,
                                 VM_PROT_ALL,
                                 MAP_COPY_ON_WRITE | MAP_PREFAULT_PARTIAL);
                if (rv != KERN_SUCCESS) {
                        vm_object_deallocate(object);
                        printf("rv != KERN_SUCCESS 3\n");
                        return (EINVAL);
                }

Pushing up into vm_map_find() shows that it's returning KERN_NO_SPACE:

        if (find_space) {
                if (vm_map_findspace(map, start, length, addr)) {
                        vm_map_unlock(map);
                        printf("KERN_NO_SPACE\n");
                        return (KERN_NO_SPACE);
                }
                start = *addr;
        }
 
Kris

--
In God we Trust -- all others must submit an X.509 certificate.
    -- Charles Forsythe <forsythe at alum.mit.edu>



More information about the freebsd-current mailing list