[Pkg-raspi-maintainers] Bug#972386: python3-rpi.gpio: segmentation fault on Raspberry Pi Zero
Kipp Cannon
kipp at resceu.s.u-tokyo.ac.jp
Sat Oct 17 12:55:46 BST 2020
Package: python3-rpi.gpio
Version: 0.6.5-1
Severity: important
Dear Maintainer,
On a Raspberry Pi Zero, the following python script segfaults in the .setup() function:
from RPi import GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(20, GPIO.OUT)
I have tried other pins and the behaviour is the same. I do not have easy access to any other versions of the hardware to check if the problem is unique to the Pi Zero, but if what I am seeing is the same as described in this thread here
https://stackoverflow.com/questions/30442719/getting-segmentation-fault-when-using-rpi-gpio-setup-on-raspberry-pi-2
then it might be a problem that only affects some hardware versions. The comment that seems most useful in that thread is
"The segfault went away and my C program worked. RPi.GPIO defines BCM2708_PERI_BASE_DEFAULT to 0x20000000 (Pi 1) instead of 0x3f000000 (Pi 2). It tries to adjust it reading /proc/device-tree/soc/ranges but this kernel didn't have device tree enabled. ..."
I don't know if that rings any bells.
-- System Information:
Debian Release: 10.6
APT prefers stable
APT policy: (500, 'stable')
Architecture: armel (armv6l)
Kernel: Linux 4.19.0-11-rpi
Kernel taint flags: TAINT_CRAP
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages python3-rpi.gpio depends on:
ii libc6 2.28-10
ii python3 3.7.3-1
ii rpi.gpio-common 0.6.5-1
python3-rpi.gpio recommends no packages.
python3-rpi.gpio suggests no packages.
-- no debconf information
More information about the Pkg-raspi-maintainers
mailing list