Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1008870: openocd: segfault when using stm32f1x config

37 views
Skip to first unread message

Matsievskiy S.V.

unread,
Apr 3, 2022, 5:30:03 AM4/3/22
to
Package: openocd
Version: 0.11.0-1
Severity: important
X-Debbugs-Cc: seregax...@gmail.com

Dear Maintainer,

OpenOCD segfaults when using target/stm32f1x.cfg configuration. I do not
experience this issue with newer version built from source (Open On-Chip
Debugger 0.11.0+dev-02226-gf6ffede8b).

dmesg entry:
[ 7388.531636] openocd[36055]: segfault at 14 ip 00007f64e097b12d sp
00007ffdde27a090 error 4 in libusb-1.0.so.0.3.0[7f64e0974000+f000]

Way to reproduce:
1. Connect STLinkV2
2. Run command openocd -f openocd.cfg (file is attached)


-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (900, 'testing'), (580, 'stable-security'), (550, 'stable-updates'), (500, 'stable'), (200, 'unstable'), (60, 'testing-debug'), (50, 'stable-debug'), (40, 'unstable-debug'), (20, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)

Kernel: Linux 5.16.0-5-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages openocd depends on:
ii libc6 2.33-7
ii libcapstone4 4.0.2-5
ii libftdi1-2 1.5-5+b2
ii libgpiod2 1.6.3-1+b1
ii libhidapi-hidraw0 0.11.2-1
ii libjaylink0 0.2.0-1
ii libjim0.79 0.79+dfsg0-3
ii libusb-0.1-4 2:0.1.12-32
ii libusb-1.0-0 2:1.0.25-1

openocd recommends no packages.

openocd suggests no packages.

-- no debconf information
openocd.cfg

Jonathan McDowell

unread,
Apr 20, 2022, 5:20:03 AM4/20/22
to
On Sun, Apr 03, 2022 at 12:26:05PM +0300, Matsievskiy S.V. wrote:
> Package: openocd
> Version: 0.11.0-1
> Severity: important
> X-Debbugs-Cc: seregax...@gmail.com
>
> Dear Maintainer,
>
> OpenOCD segfaults when using target/stm32f1x.cfg configuration. I do not
> experience this issue with newer version built from source (Open On-Chip
> Debugger 0.11.0+dev-02226-gf6ffede8b).
>
> dmesg entry:
> [ 7388.531636] openocd[36055]: segfault at 14 ip 00007f64e097b12d sp
> 00007ffdde27a090 error 4 in libusb-1.0.so.0.3.0[7f64e0974000+f000]
>
> Way to reproduce:
> 1. Connect STLinkV2
> 2. Run command openocd -f openocd.cfg (file is attached)

I don't have STLinkV2 hardware so am unable to reproduce. Can you
confirm the upstream git version you're using - I don't see "f6ffede8b"
in the usptream git tree.

Also, if you're able to, can you try recompiling the 0.11.0 Debian
package on your system just to narrow down that it's a fix upstream
we're looking for rather than a build issue? I *think* it's going to be
cff0e417da58adef1ceef9a63a99412c2cc87ff3 that's the issue, which means
the problem won't exist in bullseye (libusb-1.0 is at 1.0.24).

J.

--
"Time for bed" said Zebedee. "Yours or mine" said Florence.

Matsievskiy S.V.

unread,
Apr 20, 2022, 10:20:04 AM4/20/22
to
I used RISCV's fork https://github.com/riscv-mcu/riscv-openocd.

--
Best regards,
Sergey Matsievskiy
signature.asc

Matsievskiy S.V.

unread,
Apr 20, 2022, 11:00:04 AM4/20/22
to
I guess the problem was with some underlying library. I had openocd
segfault on two machines (both on testing) and now everything works.
I've also openocd from 0.11.0-1 source and it works too.

The issue may be closed now.
signature.asc
0 new messages