Bug #6292
closed
"static _thread" buffer crash of osmo-bts-sysmo on symoBTS 1002
Added by jolly 5 months ago.
Updated 5 months ago.
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
- 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.
- Related to Bug #4062: vty tests fails on arm (raspberry pi) added
- Related to Bug #5079: osmo_str_tolower() segfaults on sysmoBTS (arm-poky-linux-gnueabi) added
In fact #5079 is likely the solution. We are actually defining __thread to NULL when building on that platform - I wonder how you ended up with it enabled?
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.
- Status changed from New to Resolved
- Priority changed from High to Low
- % Done changed from 0 to 100
I resolved it by installing the nightly build libraries. But still I can't compile it without "--disable-detect-tls-gcc-arm-bug".
Yes, removing the __thread attributes works for me.
Also available in: Atom
PDF