Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Apr 2022 16:58:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 252165] usb network and mii bus media status race condition
Message-ID:  <bug-252165-7501-3sS65Zs3In@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-252165-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-252165-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252165

--- Comment #19 from Ali Abdallah <ali.abdallah@suse.com> ---
(In reply to Hans Petter Selasky from comment #18)
Compiling the kernel with COPTFLAGS=3D-O0 and CFLAGS=3D-O0 resulted in non-=
working
dtrace... (dtrace: invalid probe specifier... "/usr/lib/dtrace/mbuf.d", lin=
e 1:
failed to copy type of 'm_data': Type information is in parent and
unavailable.) But anyway the problem occurs, with no particular dmesg from
witness or debug_lock.

On the other hand, on the standard generic kernel, when the issue is not
occurring, the following dtrace is shown

# dtrace -n
"fbt:kernel:mii_pollstat:*,fbt:uether:ue_tick_task:*,fbt:if_ure:ure_tick:*,=
fbt:if_ure:ure_ifmedia_sts:*,fbt:kernel:mii_tick:*"

  0  92491            ure_ifmedia_sts:entry=20
  0  35254               mii_pollstat:entry=20
  2  35255              mii_pollstat:return=20
  2  92492           ure_ifmedia_sts:return=20

  3  92425               ue_tick_task:entry=20
  3  92489                   ure_tick:entry=20
  3  35276                   mii_tick:entry=20
  3  35277                  mii_tick:return=20
  3  92490                  ure_tick:return=20

Which are the two "code-path" checking for link status. Now with the same
dtrace probes, when the link up/down problem occurs, I see=20

  3  92425               ue_tick_task:entry=20
  3  92489                   ure_tick:entry=20
  3  35276                   mii_tick:entry=20
  0  92491            ure_ifmedia_sts:entry  <----
  0  35254               mii_pollstat:entry  <----
  3  35277                  mii_tick:return=20
  3  92490                  ure_tick:return

How that is possible? ure_ifmedia_sts should acquire the same mutex lock as
ue_tick_task before calling mii_pollstat. And this is not happening apparen=
tly.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252165-7501-3sS65Zs3In>