Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: I run a daemon that reads atmospheric noise from an rtl2832 usb receiver, and feeds it into the kernel entropy pool. That was working fine until the latest update of libusb1. Now I get -sync read failed -4 errors. Version-Release number of selected component (if applicable): libusb-1.0.25-4.fc37 How reproducible: Every time Steps to Reproduce: 1. Have an rtl2832 installed and try to read data from it. 2. The actual function being used is libusb_bulk_transfer 3. It is called from rtlsdr_read_sync in librslsdr. Actual results: Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: WARNING: Failed to set gain Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: Reading samples in sync mode... Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: WARNING: Failed to set sample rate. Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: Setting New sample_rate to 2040000 Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: Setting New frequency to 97400000 Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: ERROR: sync read failed: -4 Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: WARNING: Failed to set sample rate. Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: Setting New sample_rate to 1380000 Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: Setting New frequency to 102600000 Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: ERROR: sync read failed: -4 Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: WARNING: Failed to set sample rate. Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: Setting New sample_rate to 1110000 Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: Setting New frequency to 88000000 Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: ERROR: sync read failed: -4 Feb 20 17:05:12 fedora rtl2832_entropyd[4440]: Library error 0, exiting... Expected results: These are reversed because I used journalctl -r. Feb 20 17:59:04 fedora rtl2832_entropyd[17127]: Entropy credit of 7776 bits made (4036 bits before, 4085 bits after) Feb 20 17:59:04 fedora rtl2832_entropyd[17127]: minimum level not reached: 4085 Feb 20 17:59:04 fedora rtl2832_entropyd[17127]: 4096 bits of data, 3888 bits usable were added, total 7776 added Feb 20 17:59:04 fedora rtl2832_entropyd[17127]: 4096 bits of data, 3888 bits usable were added, total 3888 added Feb 20 17:59:04 fedora rtl2832_entropyd[17127]: woke up due to low entropy state (4036 bits left) Feb 20 17:59:04 fedora rtl2832_entropyd[17127]: select return code rc 1 Additional info: The successful / expected results are after I downloaded the libusb1-1.0.25-3.fc37 and libusb1-devel-1.0.25-3.fc37 packages from koji and downgraded my system to them. Everything appears to be working properly now. I tried recompiling the package rtl-sdr from the src.rpm, installed it, and it did not work with the 1.0.25-4 version, but is working with the 1.0.25-3 version.
I use a separate program (rtl2832_entropyd), https://sourceforge.net/projects/rtl2832-entropyd/, that is not in the Fedora repositories, but the package rng-tools contains the daemon rngd, and it can also utilize the rtl2832 to push entropy into the kernel pool. That helps with debugging, but it doesn't get around the need for an rtl2832 tuner in order to test this. Maybe there are other USB devices that can be used with usblib_bulk_transfer function.
The libusb1-1.0.25-4 seems to break almost all libusb1 using apps, there already is a bug for this open, so I'm marking this one as a duplicate. *** This bug has been marked as a duplicate of bug 2056326 ***