OS-6679: ABBA deadlock in vmm sdev plugin

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2018-03-02T16:30:03.736Z)

Fix Versions

2018-03-15 Nibelheim (Release Date: 2018-03-15)

Related Issues

Related Links

Description

I was testing my fix for OS-6617 when I hit this deadlock:

> ffffff0011558c40::findstack
stack pointer for thread ffffff0011558c40: ffffff00115585a0
[ ffffff00115585a0 _resume_from_idle+0x112() ]
  ffffff00115585d0 swtch+0x18a()
  ffffff0011558670 turnstile_block+0x2ea()
  ffffff00115586e0 rw_enter_sleep+0x1a9()
                rw_enter(&dv->sdev_contents,
  ffffff0011558730 sdev_dirdelete+0x55()
  ffffff0011558760 sdev_cache_delete+0x4f()
  ffffff00115587b0 sdev_cache_update+0x90()
  ffffff0011558800 sdev_plugin_unregister_cb+0x5c()
  ffffff0011558840 sdev_mnt_walk+0x4a()
  ffffff0011558880 sdev_plugin_unregister+0x72()
  ffffff00115588b0 vmm_detach+0x62()
               mutex_enter(&vmmdev_mtx);

> ffffff03e96e0020::findstack -v
stack pointer for thread ffffff03e96e0020: ffffff001081ea50
  ffffff001081eac0 param_preset()
  ffffff001081eb60 0xfffffffffbecd1b3()
  ffffff001081ebd0 mutex_vector_enter+0x3fd(ffffffffc014b030)
             mutex_enter(&vmmdev_mtx);
  ffffff001081ec20 vmm_sdev_validate+0x6e(ffffff04367ac968)
  ffffff001081ec70 sdev_plugin_validate+0x55(ffffff04367ac968)
  ffffff001081ecc0 sdev_plugin_validate_dir+0x94(ffffff04374ff038)
  ffffff001081ed50 sdev_plugin_vop_readdir+0xee(ffffff04904a8400, 
ffffff001081ee00, ffffff0428f0b110, ffffff001081ee4c, 0, 0)
        (takes sdev_contents lock)

The test load was three concurrent while loops:
1. modunload vmm
2. ls /dev/vmm/
3. vmadm start / stop -f

Comments

Comment by John Levon
Created at 2018-02-23T12:01:11.925Z
thoth upload at 9715b142cc93811434b05c09e3365b43 for posterity

Comment by Jira Bot
Created at 2018-03-02T16:14:24.076Z
illumos-joyent commit 7bb94c96d6b670e5ac129648edfd9d3734953514 (branch master, by John Levon)

OS-6617 remove forceload for viona and vmm from /etc/system
OS-6679 ABBA deadlock in vmm sdev plugin
Reviewed by: Mike Gerdts <mike.gerdts@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Patrick Mooney <patrick.mooney@joyent.com>