Debugging randomly rebooting core. my hunch its likley TCPClient

I have having random rebooting issue, sometimes the core runs for days on end, other times it will reboot every 5 minuets.

Is there a best method to help debug why the core is rebooting.

The LED pattern goes

  • breathing cyan
  • blank LED (Split second)
  • Flashing cyan (On/Off patter for 10 seconds)
  • Breathing cyan (5 seconds)
  • Flashing Red ( 4 quick flashes, pause 3 quick flashes, pause 1 quick
    flash )
  • Reboot - Flash Green, Quick Flash green, Quick Flash cyan, Breathing
    Cyan

I’ll try and capture a video of its actions, as the red flashing pattern might be slightly off from what I describe above.

What I’m hoping for is some sort of routine I can add into my program that could spew out a bunch of low level memory allocation debugging information to the serial port. So what ever conditions cause the cores to crash, I assume most of this deals with memory issues.

I’m at the end of the line of where to even start to debug this random problem.

I was able to make a video, It starts at the “Breathing cyan (5 seconds)” step

Thank you,
Brian

Brian, your hunch is correct. A fix for network crashes was added to the firmware today by @mdma.

If you need the fix right away, you can compile locally from the develop branch of the firmware. If you can wait a bit, the fix will come to the cloud compiler shortly.

Amazing !

This photon is running firmware 4.03, is there no bin for the firmware currently ?

If you can’t build locally easily, but can run dfu-util to flash the device, @jvanier or I can probably sling you the 3 binaries to program your device and see if the latest fix (literally hot of the presses this morning US-time) will help. Flashing these 3 parts would get you back to tinker + the latest development firmware, you then reprogram with your sketch.

I can flash binaries, can't compile though. If you could send me a link to the bin files that would be awesome.

Try this and please report back.

1 Like

Alright we’re flashed and running…

Just for my reference
2015-08-13 13:52:13
NET_BOOT [01]
0
0
0:00:00
0
0
0

I’m impressed @mdma what ever you did seemed to fix my crashing issues with web commands.

I can call stop and start to my photon now with out it crashing. before that was a 95% crash. With the updated firmware it just took the web command and kept on running.

I might have spoke too soon. So it seems that the photon does not crash any more. But it did not do all the web communications. When I stop the photon, it should send a message to confirm it was stopped. But that message is never sent. Also when I start the photon it has the same behavior. The photon never starts back up again.

Though the photon does not crash, it does not send or receive the messages where it would crash before.

2 Likes

Can you share your code ?

It’s to large to share.

There could still be bugs in the start / stop routines. Although they worked fine on the core.

The photon while running from a fresh boot, has not crashed as it was on the firmware 4.3

Not crashing is always good, but if it’s still not working the way you need it, that’s not so good.

There are a few of us focusing on addressing tcp client/networking issues right now, if you can provide any stripped down test cases or other info that will help us triangulate on problems, the timing would be good.

I will a little later, running late for work at the moment.

Thanks !