[Bug 210315] panic: destroying non-empty racct: 2113536 allocated for resource 4

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Dec 9 12:19:33 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210315

Andriy Gapon <avg at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kib at FreeBSD.org

--- Comment #1 from Andriy Gapon <avg at FreeBSD.org> ---
I've just got another of these panics.

I wonder if it could be caused by this code:

                        size = vmspace_resident_count(vm);
                        if (size >= limit) {
                                vm_pageout_map_deactivate_pages(
                                    &vm->vm_map, limit);
                        }
#ifdef RACCT
                        if (racct_enable) {
                                rsize = IDX_TO_OFF(size);
                                PROC_LOCK(p);
                                racct_set(p, RACCT_RSS, rsize);
                                ravailable = racct_get_available(p, RACCT_RSS);
                                PROC_UNLOCK(p);


Specifically, we calculate rsize from size, but the value of the latter could
be outdated if size was larger than limit and vm_pageout_map_deactivate_pages()
got called.

As a side note, I wonder why greater-than-or-equal is used for comparing size
and limit.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list