meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3.39k stars 828 forks source link

[Bug]: segmentation fault for armhf on pi zero #4978

Open tahnok opened 2 days ago

tahnok commented 2 days ago

Category

Other

Hardware

Linux Native

Firmware Version

2.5.5.e182a

Description

Launching meshtasticd on the pi zero w (rev 1.1) results in a segmentation fault. The issue also occurs on version 2.5.4.8d288d5

Relevant log output

gdb backtrace has 

(gdb) bt
#0  0x00000000 in ?? ()
#1  0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (this=0xb6fdb770 <call_init+148>) at /usr/include/c++/12/bits/stl_iterator.h:1159
#2  0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (this=0x0) at /usr/include/c++/12/bits/stl_iterator.h:1159
#3  0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (this=0xbefff554) at /usr/include/c++/12/bits/stl_iterator.h:1159
#4  0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (
    this=0x4664f5 <std::allocator_traits<std::allocator<graphics::Screen::ScreenCmd> >::max_size(std::allocator<graphics::Screen::ScreenCmd> const&)+14>) at /usr/include/c++/12/bits/stl_iterator.h:1159
#5  0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (this=0xbefff584) at /usr/include/c++/12/bits/stl_iterator.h:1159
#6  0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (this=0x0) at /usr/include/c++/12/bits/stl_iterator.h:1159
#7  0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (this=0xbefff564) at /usr/include/c++/12/bits/stl_iterator.h:1159
#8  0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (
    this=0x466277 <std::deque<graphics::Screen::ScreenCmd, std::allocator<graphics::Screen::ScreenCmd> >::_S_max_size(std::allocator<graphics::Screen::ScreenCmd> const&)+20>) at /usr/include/c++/12/bits/stl_iterator.h:1159
#9  0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (this=0x0) at /usr/include/c++/12/bits/stl_iterator.h:1159
#10 0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (this=0x0) at /usr/include/c++/12/bits/stl_iterator.h:1159
#11 0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (this=0x0) at /usr/include/c++/12/bits/stl_iterator.h:1159
#12 0x004d5d1a in __gnu_cxx::__normal_iterator<_meshtastic_Neighbor*, std::vector<_meshtastic_Neighbor, std::allocator<_meshtastic_Neighbor> > >::base (this=0x38) at /usr/include/c++/12/bits/stl_iterator.h:1159

(this appears to loop forever)

registers:

(gdb) info registers
r0             0xb6fdb770          3070080880
r1             0x1                 1
r2             0xbefff584          3204445572
r3             0xb6fdb770          3070080880
r4             0x27f50             163664
r5             0x0                 0
r6             0x416dc1            4287937
r7             0xb6fdb770          3070080880
r8             0x0                 0
r9             0x0                 0
r10            0xb6fff000          3070226432
r11            0x0                 0
r12            0xb6fc4d38          3069988152
sp             0xbefff54c          0xbefff54c
lr             0x4d5d1b            5070107
pc             0x0                 0x0
cpsr           0x80000010          -2147483632
fpscr          0x0                 0
jp-bennett commented 2 days ago

This is almost certainly a consequence of building 32 bit binaries in a 32 bit docker image on a 64 bit install. Just needs a 32 bit builder dedicated to the task.

rjbrown99 commented 2 days ago

This impacts me as well, including with the latest 2.5.5.e182ae7 release on an RPi Zero 2W. Latest Raspbian distro with 6.6.46-1+rpt1 kernel.