From owner-freebsd-wireless@freebsd.org Thu Feb 18 01:13:31 2021 Return-Path: Delivered-To: freebsd-wireless@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98A81541277 for ; Thu, 18 Feb 2021 01:13:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4DgxY73m0Gz4Xcj for ; Thu, 18 Feb 2021 01:13:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 80FBE541276; Thu, 18 Feb 2021 01:13:31 +0000 (UTC) Delivered-To: wireless@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80C0A541608 for ; Thu, 18 Feb 2021 01:13:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DgxY739wmz4XlZ for ; Thu, 18 Feb 2021 01:13:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 605BA7061 for ; Thu, 18 Feb 2021 01:13:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 11I1DVLU086950 for ; Thu, 18 Feb 2021 01:13:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 11I1DVr6086949 for wireless@FreeBSD.org; Thu, 18 Feb 2021 01:13:31 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: wireless@FreeBSD.org Subject: [Bug 253608] hostapd 100% CPU usage after WiFi device disappears Date: Thu, 18 Feb 2021 01:13:31 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: wireless X-Bugzilla-Version: 12.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: damjan.jov@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: wireless@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 01:13:31 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253608 Bug ID: 253608 Summary: hostapd 100% CPU usage after WiFi device disappears Product: Base System Version: 12.2-STABLE Hardware: arm64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: wireless Assignee: wireless@FreeBSD.org Reporter: damjan.jov@gmail.com Some other bug causes my USB bus to sporadically undergo some kind of reset, making all USB devices appear to disconnect and then reconnect. One of my USB devices is a WiFi dongle, which hostapd is running with. When= it disconnects, hostapd CPU usage jumps to 100%, and stays there until manually killed: # truss -s 1024 -f -p 34705 34705: read(5,0x80121f2c0,524288) ERR#6 'Device not configur= ed' 34705: select(7,{ 4 5 6 },{ },{ },{ 2.635212 }) =3D 1 (0x1) 34705: read(5,0x80121f2c0,524288) ERR#6 'Device not configur= ed' 34705: select(7,{ 4 5 6 },{ },{ },{ 2.635171 }) =3D 1 (0x1) 34705: read(5,0x80121f2c0,524288) ERR#6 'Device not configur= ed' 34705: select(7,{ 4 5 6 },{ },{ },{ 2.635120 }) =3D 1 (0x1) 34705: read(5,0x80121f2c0,524288) ERR#6 'Device not configur= ed' 34705: select(7,{ 4 5 6 },{ },{ },{ 2.635069 }) =3D 1 (0x1) 34705: read(5,0x80121f2c0,524288) ERR#6 'Device not configur= ed' 34705: select(7,{ 4 5 6 },{ },{ },{ 2.635001 }) =3D 1 (0x1) # lsof -n |grep hostapd hostapd 34705 root cwd VDIR 2669942718,3349274250=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 36 4 / hostapd 34705 root rtd VDIR 2669942718,3349274250=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 36 4 / hostapd 34705 root 0u VCHR 0,16=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 0t0 16 /dev/null hostapd 34705 root 1u VCHR 0,16=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 0t0 16 /dev/null hostapd 34705 root 2u VCHR 0,16=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 0t0 16 /dev/null hostapd 34705 root 3u IPv4 0xfffff80016a2b040=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 0t0 UDP *:* hostapd 34705 root 4u rte 0xfffff8001334b1e0=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 0t0=20=20=20=20=20=20=20=20=20 hostapd 34705 root 5u VCHR 0,40=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 0t0 40 /dev/bpf hostapd 34705 root 6u unix 0xfffff8011139e000=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 0t0 /var/run/hostapd/wlan0 hostapd 34705 root 7r VDIR 2669942718,3349274250=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 43 712 /var/run hostapd 34705 root 8w VREG 2669942718,3349274250=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 5 262304 /var/run/hostapd.pid I consider this a hostapd bug, because the WiFi dongle could also get unplu= gged manually to reproduce it. When a WiFi device disappears, hostapd should do something better than get stuck in an infinite loop. --=20 You are receiving this mail because: You are the assignee for the bug.=