Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2019 17:26:13 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        "O'Connor, Daniel" <darius@dons.net.au>
Cc:        Hans Petter Selasky <hps@selasky.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: USB stack getting confused
Message-ID:  <20190309152613.GM2492@kib.kiev.ua>
In-Reply-To: <3B29D870-41F9-46AF-B9F3-03106DEC417D@dons.net.au>
References:  <E0371188-FD0A-47E1-8378-40239F5C6622@dons.net.au> <f3e6e30b-8b62-546b-2b51-e841f2e645bd@selasky.org> <3B29D870-41F9-46AF-B9F3-03106DEC417D@dons.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 09, 2019 at 08:59:30PM +1030, O'Connor, Daniel wrote:
> 
> 
> > On 9 Mar 2019, at 19:30, Hans Petter Selasky <hps@selasky.org> wrote:
> > On 3/9/19 12:08 AM, O'Connor, Daniel wrote:
> >> My program normally runs continually doing acquisitions of data for N seconds, doing some checks and restarting. After a while (~30 1 minute acquisitions or ~8 30 minute ones) my program can't 'see' the device (it uses libusb10) any more (it reconnects each acquisition for $REASONS). Also pretty weirdly usbconfig can't see it either(!).
> > 
> > What is printed in dmesg? Maybe the device has a problem.
> 
> There is nothing in dmesg - no disconnect / reconnect etc.
> 
> If I hold the user space process in gdb 'forever' (eg over night) usbconfig doesn't see the device, but the moment I quit the user space process it can be seen again.

Does it mean that the file descriptor opened for ugen has a chance to
be closed ?

I suspect that usb subsystem tried to destroy the device but some internal
refcounting prevents it.  Proper use of destroy_dev(_cb)(9) avoids
the issue.



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