Copter-3.5.0-rc7 unexpected crash on ErleBrain

https://www.youtube.com/watch?v=yLjPHQXPwyk

The video is not that entertaining to watch :frowning:

Hardware setup: 3S battery powers the 2.25 A 3DR Power module,

Connected output: PWM and Receiver

Setup: New Erle Image 09-12-16 and apm 3.5.0 rc7

[ESC beeps when powered but no pwm signal received]

After indefinite time, leads to crash and ESC beeps for several seconds again.

Doesn’t happen with the older release 3.4-rc2!

Back then I didn’t look so carefully at the light I guess. I have this very interesting behavior, just starting arducopter it crashes consistantly, while in gdb in seems to run just fine. (same binary)

https://www.youtube.com/watch?v=0qRpY9q_2tY&t=3s

Very funny…

Yes it crashes in all conditions, but doesn’t in debug mode. Check my videos in the reply.

First time seg fault in debug mode:

[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/arm-linux-gnueabihf/libthread_db.so.1”.
Raspberry Pi 2/3 with BCM2709!
[New Thread 0x76ca3450 (LWP 1391)]
[New Thread 0x769ff450 (LWP 1392)]
[New Thread 0x768ff450 (LWP 1393)]
[New Thread 0x765ff450 (LWP 1394)]
[New Thread 0x764ff450 (LWP 1395)]
[New Thread 0x75b8e450 (LWP 1396)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x768ff450 (LWP 1393)]
0x000b6408 in Linux::RCInput_RPI::_timer_tick() ()

Yay! At least we now know it happens in debug!

Can your provide a backtrace?

Maybe thread apply bt all (or whatever that syntax is…)

Well I didn’t know what to do back then so I don’t have one.

But this seems to be known failure:
http://discuss.ardupilot.org/t/arductoper-3-5-not-working-on-pi-zero/17105

And the issue:
https://github.com/ArduPilot/ardupilot/issues/6233

Thanks to report by @ppoirier

The issue you are linking is fixed some time ago. What’s the exact version you are running? I don’t have a erlebrain 3. But I don’t see much difference from the others that would cause it on erlebrain3 and not on other rpi-based boards.

I’ll be back from vacations next week and can try to reproduce on some RPI boards

i can help you in something ?

But I don’t see much difference from the others that would cause it on erlebrain3 and not on other rpi-based boards.

The best guy to help with that is maybe @LanderU :slight_smile:

Hi @josepgomes,

I will create a new OS for our boards, and test it.

If you can debug the firmware, please do it. Run with gdb and when the firmware crashed, type bt.

Regards,

@LanderU

Hi @LanderU,

You think that we can just let the drone running without props in a desk and wait?

Hi @josepgomes,

yes, please. And run it with gdb, thank you!!!

Regards,

@LanderU

Hi @LanderU

Is this normal?

PS: i typed bt when the firmware crashed

Hi @josepgomes,

you need run the firmware like this:

sudo systemctl stop apm.service
sudo gdb --args ./arducopter -A udp:10.0.0.2:6000

When this message appears (gdb) type r+intro:

(gdb) r

When the firmware crash occurs, type bt.

Regards,

@LanderU

Hi @LanderU,

I was just going to check here the difference on erlebrain3… but there’s no erlebrain3 supported on upstream and checking the docs (http://docs.erlerobotics.com/brains/erle-brain-3/sofware/apm#compile-ardupilot-apm-from-its-s-…) it says to build for erlebrain2. This probably means I can test on my erlebrain2 when I’m back home.

@josepgomes, can you try this? https://github.com/lucasdemarchi/ardupilot/commits/test-stack

You have to wait first until it crashes and then type bt :slight_smile:

Be careful it barely ever crashes in debug mode, so be prepared for a long run. Use micro USB and connect no sensors

But i typed bt when the firmware crashed. In debug mode happens anyway with our copter.

@lucasdemarchi , i don’t know how to test it :neutral_face:

Read Lander instruction above