Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Sep 2020 16:35:47 +0300
From:      Michael Zhilin <mizhka@freebsd.org>
To:        Mark Johnston <markj@freebsd.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, freebsd-current@freebsd.org
Subject:   Re: Possible deadlock on IO / page fault
Message-ID:  <CAMyqa3MvrDNPYXCsshmJn6jWAjkW2KNYkLk_fm7y_hW0NoqL8g@mail.gmail.com>
In-Reply-To: <20200929133159.GA26914@raichu>
References:  <CAMyqa3ObWCKt5qQD9h4T2qOUB=khS1D61mVbwNqnAi_hYynOtw@mail.gmail.com> <20200929132026.GS2643@kib.kiev.ua> <20200929133159.GA26914@raichu>

next in thread | previous in thread | raw e-mail | index | archive | help
Thank you, Kostya and Mark!
I will update to head. :)

On Tue, Sep 29, 2020 at 4:32 PM Mark Johnston <markj@freebsd.org> wrote:

> On Tue, Sep 29, 2020 at 04:20:26PM +0300, Konstantin Belousov wrote:
> > On Tue, Sep 29, 2020 at 02:59:43PM +0300, Michael Zhilin wrote:
> > > Hi,
> > >
> > > I'm using FreeBSD 13-CURRENT (pre-ZoF, r359724) on my laptop with
> installed
> > > Gnome. Sometimes
> > > (once a week/month) gnome hangs and the system may be still responsible
> > > (may be not).
> > > This week it happened again and I've gathered information via
> ddb/textdump
> > > and rebooted laptop.
> > >
> > > gnome-shell is trying to get exclusive lock on some directory
> according to
> > > information
> > > from "show alllocks" and "bt":
> > >
> > > [...]
> > >     Tracing command evolution pid 4536 tid 101436 td 0xfffffe00bf484c00
> > >     sched_switch() at sched_switch+0x5b2/frame 0xfffffe00bfd446e0
> > >     mi_switch() at mi_switch+0x155/frame 0xfffffe00bfd44700
> > >     sleepq_switch() at sleepq_switch+0x11a/frame 0xfffffe00bfd44740
> > >     _cv_wait() at _cv_wait+0x15a/frame 0xfffffe00bfd447a0
> > >     rangelock_enter() at rangelock_enter+0x306/frame 0xfffffe00bfd447f0
> > This call to rangelock_enter() looks suspicious.  This is a call to ZFS
> > own rangelocks, not our rangelocks.  Still, if write took rangelock on
> the
> > same range, we get a deadlock due to LoR between rangelock and page busy.
>
> This was fixed by r361287.  In particular zfs_getpages() will no longer
> block on the ZFS range lock, exactly because of this deadlock.  So I
> would suggest updating to that revision or later.
>
> > >     zfs_freebsd_getpages() at zfs_freebsd_getpages+0x14f/frame
> > > 0xfffffe00bfd448a0
> > >     vnode_pager_getpages() at vnode_pager_getpages+0x37/frame
> > > 0xfffffe00bfd448e0
> > >     vm_pager_get_pages() at vm_pager_get_pages+0x4f/frame
> 0xfffffe00bfd44930
> > >     vm_fault() at vm_fault+0x780/frame 0xfffffe00bfd44a40
> > >     vm_fault_trap() at vm_fault_trap+0x6e/frame 0xfffffe00bfd44a80
> > >     trap_pfault() at trap_pfault+0x1ee/frame 0xfffffe00bfd44ae0
> > >     trap() at trap+0x44c/frame 0xfffffe00bfd44bf0
> > >     calltrap() at calltrap+0x8/frame 0xfffffe00bfd44bf0
> > >     --- trap 0xc, rip = 0x80a55de3f, rsp = 0x7fffffffcc60, rbp =
> > > 0x7fffffffcc60 ---
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMyqa3MvrDNPYXCsshmJn6jWAjkW2KNYkLk_fm7y_hW0NoqL8g>