Package: rtl-sdr
Version: 0.6.0-4
Severity: normal
X-Debbugs-Cc: offri...@gmail.com

Dear Maintainer,

On ARM/ARM64 systems, according to (1), the Linux kernel has a bug that causes
the zerocopy system using mmap to fail. Rtl-sdr contains a workaround that
determines whether this bug exists by verifying whether the mapping returned by
mmap is zeroed out.

Recently, this workaround fails to identify the bug on my hardware most of the
times, leading to the rtl tools to fail. The result is that rtl_tcp outputs
only zeros without any error. rtl_test does output lost bytes. My assumption is
that the memory map returned accidentally is zero while trying to detect the
bug. I'm running this on an Odroid N2+.

The rtl tools report whether the bug is detected, by outputting:
Detected Kernel usbfs mmap() bug, falling back to buffers in userspace

If the rtl tools report this detection, they will consequently work fine, but
most of the times this message is not reported and the tools fail.

rtl-sdr has a cmake option to disable zerocopy. After compiling the tool myself
with zerocopy off, they consistently work. Maybe it is therefore a good idea to
disable this option on ARM/ARM64 platforms?

I also can't really find what happend with this kernel bug. The bug is already
reported in 2018 here: (2), and reading the threads it looks like there is a
solution, as far as I can understand. I'm not sure where to raise this -- what
would be a good place to raise this?

Finally, I can't find where I can report this upstream. There are several
repositories for rtl-sdr, but the seemingly most active one on (3) does not
allow me to register an account to report it.

(1) https://sources.debian.org/patches/rtl-sdr/0.6-1/0002-lib-Add-workaround-
for-Linux-usbfs-mmap-bug.patch/
(2) https://www.spinics.net/lists/arm-kernel/msg685598.html
(3) https://gitea.osmocom.org/sdr/rtl-sdr

Regards,
André


-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy-updates
  APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), 
(100, 'jammy-backports')
Architecture: arm64 (aarch64)

Kernel: Linux 4.9.337-132 (SMP w/6 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages rtl-sdr depends on:
ii  libc6       2.35-0ubuntu3.1
ii  librtlsdr0  0.6.0-4

rtl-sdr recommends no packages.

rtl-sdr suggests no packages.

-- no debconf information

Reply via email to