From owner-freebsd-usb@freebsd.org Fri Sep 28 13:42:33 2018 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53C4710B128D for ; Fri, 28 Sep 2018 13:42:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E4FD373AB8 for ; Fri, 28 Sep 2018 13:42:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id A67B510B128B; Fri, 28 Sep 2018 13:42:32 +0000 (UTC) Delivered-To: usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8479B10B128A for ; Fri, 28 Sep 2018 13:42:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2397073AB5 for ; Fri, 28 Sep 2018 13:42:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 570B94E76 for ; Fri, 28 Sep 2018 13:42:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w8SDgVAf077089 for ; Fri, 28 Sep 2018 13:42:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w8SDgV4F077088 for usb@FreeBSD.org; Fri, 28 Sep 2018 13:42: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: usb@FreeBSD.org Subject: [Bug 231782] a USB frame from an interrupt endpoint may be missed Date: Fri, 28 Sep 2018 13:42:31 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 10.4-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: ludovic.rousseau+freebsd@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@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-usb@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Sep 2018 13:42:33 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231782 Bug ID: 231782 Summary: a USB frame from an interrupt endpoint may be missed Product: Base System Version: 10.4-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: usb Assignee: usb@FreeBSD.org Reporter: ludovic.rousseau+freebsd@gmail.com Hello, I have another issue. I can reproduce it easily using 1 USB device and 2 threads using the same libUSB context. I know a sequence to always reproduce the problem but I have no idea where = the problem comes from. Maybe it is not in libUSB but in a lower layer. The USB interrupt end point is used to wait for an event from the USB devic= e. In my case then event is a card removal from the smart card reader. In that case 2 bytes are sent on the interrupt end point. I note that in a given condition the event is *never* received by my application. I also see *no* log activity from libUSB. So maybe libUSB does not receive = the USB frame. When this happens I have 1 thread waiting in libusb_handle_events_completed= () (waiting on the interrupt end point) and the other thread is not doing any libUSB activity. The card removal event is not received. But the card insertion event (also 2 bytes sent on the interrupt end point) has no problem and is received by li= bUSB and my program. It looks like in some cases a USB frame is lost. I can send you libUSB logs if you want. But I was not able to find any prob= lem in them. I was also not able to find why in some cases I have the problem a= nd why in other cases my program works fine. Is there an equivalent of the Linux usbmon kernel facility to see all the U= SB activity in FreeBSD? https://www.kernel.org/doc/Documentation/usb/usbmon.txt Thanks --=20 You are receiving this mail because: You are the assignee for the bug.=