[DragonFlyBSD - Bug #3226] Xorg freezes in vm: thread stuck in "objtrm1"

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Sat Mar 21 05:50:21 PDT 2020


Issue #3226 has been updated by peeter.


Looking at frame 6: 

---
(kgdb) frame 6
#6  0xffffffff8098eed5 in vm_object_deallocate (object=0xfffff8057a331580) at /usr/src/sys/vm/vm_object.c:632
632				vm_object_deallocate_locked(object);

(kgdb) info locals
vp = <optimized out>
count = 1

(kgdb) p object->ref_count
$4 = 0

(kgdb) p count
$5 = 1

(kgdb) p object
$6 = (vm_object_t) 0xfffff8057a331580

(kgdb) p *object
$7 = {token = {t_count = 0, t_ref = 0x0, t_collisions = 0, t_desc = 0xffffffff80c4ba68 "vmobj"}, backing_lk = {
    lk_flags = 0, lk_timo = 0, lk_count = 536870912, lk_wmesg = 0xffffffff80c4ba62 "baclk", lk_lockholder = 0x0}, 
  object_entry = {tqe_next = 0xfffff804a79aee20, tqe_prev = 0xfffff80534f28b60}, backing_list = {tqh_first = 0x0, 
    tqh_last = 0xfffff8057a3315d0}, rb_memq = {rbh_root = 0x0, rbh_inprog = 0x0, rbh_spin = {lock = 0, update = 0}}, 
  generation = 3, size = 3600, ref_count = 0, memattr = 6 '\006', type = 4 '\004', flags = 8, pg_color = 16780, 
  paging_in_progress = 4294967295, resident_page_count = 0, pager_object_entry = {tqe_next = 0xfffff80571026960, 
    tqe_prev = 0xfffff8057292b680}, handle = 0xfffff8057a3442c0, hold_count = 1, un_pager = {devp = {devp_pglist = {
        tqh_first = 0x0, tqh_last = 0xfffff8057a331640}, ops = 0xffffffff83166420, dev = 0xfffff8057a3442c0}}, 
  swblock_root = {rbh_root = 0x0, rbh_inprog = 0x0, rbh_spin = {lock = 0, update = 0}}, swblock_count = 0, md = {
    dummy_unused = 0x0}}
(kgdb)
---

vm_object->ref_count is int and in frame 6, vm_object->ref_count = 0. It seems that when it arrives in frame 2, the value has been decreased to -1. In frame 2, _refcount_wait() assumes the reference count is u_int, hence the u_int value 4294967295. 






----------------------------------------
Bug #3226: Xorg freezes in vm: thread stuck in "objtrm1"
http://bugs.dragonflybsd.org/issues/3226#change-13867

* Author: peeter
* Status: New
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
Xorg freezes randomly, thread stuck in "objtrm1":

0   1064      1   1063   0 174   0 455496 258864 objtrm1  D5     ??    0:59.12      /usr/local/bin/X :0 -auth /home/

The machines otherwise functional, can ssh into it and start kgdb. Backtrace in kgdb shows this: 

---
(kgdb) thread 288
[Switching to thread 288 (pid 1064/1, Xorg)]
#0  0xffffffff8066bd17 in lwkt_switch () at /usr/src/sys/kern/lwkt_thread.c:807
807		lwkt_switch_return(td->td_switch(ntd));
(kgdb) back
#0  0xffffffff8066bd17 in lwkt_switch () at /usr/src/sys/kern/lwkt_thread.c:807
#1  0xffffffff806796b9 in tsleep (ident=ident at entry=0xfffff8057a331614, flags=flags at entry=1024, 
    wmesg=wmesg at entry=0xffffffff80c4ba77 "objtrm1", timo=1000) at /usr/src/sys/kern/kern_synch.c:711
#2  0xffffffff8066adc5 in _refcount_wait (countp=countp at entry=0xfffff8057a331614, 
    wstr=wstr at entry=0xffffffff80c4ba77 "objtrm1") at /usr/src/sys/kern/kern_refcount.c:81
#3  0xffffffff8098eaa3 in refcount_wait (wstr=0xffffffff80c4ba77 "objtrm1", countp=0xfffff8057a331614)
    at /usr/src/sys/sys/refcount.h:111
#4  vm_object_pip_wait (waitid=0xffffffff80c4ba77 "objtrm1", object=0xfffff8057a331580)
    at /usr/src/sys/vm/vm_object.h:299
#5  vm_object_terminate (object=0xfffff8057a331580) at /usr/src/sys/vm/vm_object.c:755
#6  0xffffffff8098eed5 in vm_object_deallocate (object=0xfffff8057a331580) at /usr/src/sys/vm/vm_object.c:632
#7  0xffffffff8098446f in vm_map_entry_dispose (entry=0xfffff80579cf5fa0, countp=0xfffff803960f98b4, 
    map=<optimized out>) at /usr/src/sys/vm/vm_map.c:1130
#8  0xffffffff80988333 in vm_map_entry_delete (countp=0xfffff803960f98b4, entry=0xfffff80579cf5fa0, 
    map=0xfffff801578f3880) at /usr/src/sys/vm/vm_map.c:3182
#9  vm_map_delete (map=0xfffff801578f3880, start=34760318976, end=34775064576, countp=0xfffff803960f98b4)
    at /usr/src/sys/vm/vm_map.c:3344
#10 0xffffffff80988baf in vm_map_remove (map=map at entry=0xfffff801578f3880, start=<optimized out>, 
    start at entry=34760318976, end=<optimized out>, end at entry=34775064576) at /usr/src/sys/vm/vm_map.c:3381
#11 0xffffffff8098b634 in sys_munmap (uap=<optimized out>) at /usr/src/sys/vm/vm_mmap.c:583
#12 0xffffffff80ba980b in syscall2 (frame=0xfffff803960f99f8) at /usr/src/sys/platform/pc64/x86_64/trap.c:1317
#13 0xffffffff80b839cd in ?? () at /usr/src/sys/platform/pc64/x86_64/exception.S:450
#14 0x0000000817e06000 in ?? ()
#15 0x0000000000e10000 in ?? ()
#16 0x0000000000000000 in ?? ()
(kgdb) 
---

I don't know where to look further.





-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list