Bug #6292
closed"static _thread" buffer crash of osmo-bts-sysmo on symoBTS 1002
100%
Description
osmo-bts running on Sysmo-BTS hardware causes a crash when executing osmo_str_tolower() from libosmocore.
osmo_str_tolower() stores the return value in a static string declared as this:
static __thread char capsbuf[128];
When removing "__thread" keyword and installing this changed libosmocore to Sysmo-BTS, the function above does not fail.
To reproduce this error, add "gsmtap-sapi enable-all" below "bts 0" in config file and execute "show run" at VTY.
Files
Related issues
Updated by laforge 5 months ago
- Subject changed from "static _thread" buffer crash on Sysmo-BTS to "static _thread" buffer crash of osmo-bts-sysmo on symoBTS 1002
- Assignee set to jolly
- Priority changed from Normal to High
See also https://gerrit.osmocom.org/c/libosmocore/+/15024 which introudced that capsbuf.
In case anyone has an idea what is happening here, and why all of a sudden we see that kind of problem with years without any gcc/binutils changes of our yocto for sysmobts, please provide feedback here.
Updated by jolly 5 months ago
- File segfault.txt segfault.txt added
When I cross compile without "--disable-detect-tls-gcc-arm-bug" at configure, linker gets a segmentation fault. That's why I always used that option. See attachment.
Updated by laforge 5 months ago
On Fri, Dec 08, 2023 at 10:56:38AM +0000, jolly wrote:
I resolved it by installing the nightly build libraries. But still I can't compile it without "--disable-detect-tls-gcc-arm-bug".
can you not do exactly what we do when we build the programs in the first place?
https://gitea.osmocom.org/cellular-infrastructure/meta-telephony/src/commit/4886ef55ea741a8ce8891702b2a620cae3e3d5cf/recipes-osmocom/libosmocore/libosmocore_git.bb#L29
points to
https://gitea.sysmocom.de/sysmo-bts/meta-sysmocom-bsp/src/branch/201705/recipes-sysmobts/libosmocore/libosmocore_git.bbappend