battor
battor copied to clipboard
Timeout on download
We sometimes experience an event where the reading a saved trace from the sd card errors in a timeout.
The agent shows the following on stderr:
[1022/083320:FATAL:battor_agent_bin.cc(88)]` Fatal error when communicating with the BattOr: TIMEOUT
#0 0x0000000d8bb2 base::debug::StackTrace::StackTrace()
#1 0x000000070a6a logging::LogMessage::~LogMessage()
#2 0x000000023152 battor::(anonymous namespace)::HandleError()
#3 0x000000023762 battor::BattOrAgentBin::OnStopTracingComplete()
#4 0x00000002cac8 _ZN4base8internal13FunctorTraitsIMN6battor11BattOrAgent8ListenerEFvRKSsNS2_11BattOrErrorEEvE6InvokeIPS4_JS6_RKS7_EEEvS9_OT_DpOT0_
#5 0x00000002ca08 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN6battor11BattOrAgent8ListenerEFvRKSsNS4_11BattOrErrorEEJPS6_S8_RKS9_EEEvOT_DpOT0_
#6 0x00000002c99c _ZN4base8internal7InvokerINS0_9BindStateIMN6battor11BattOrAgent8ListenerEFvRKSsNS3_11BattOrErrorEEJNS0_17UnretainedWrapperIS5_EESsS8_EEEFvvEE7RunImplIRKSA_RKSt5tupleIJSC_SsS8_EEJLj0ELj1ELj2EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
#7 0x00000002c8bc _ZN4base8internal7InvokerINS0_9BindStateIMN6battor11BattOrAgent8ListenerEFvRKSsNS3_11BattOrErrorEEJNS0_17UnretainedWrapperIS5_EESsS8_EEEFvvEE3RunEPNS0_13BindStateBaseE
#8 0x0000000da3a2 _ZNO4base8internal8RunMixinINS_8CallbackIFvvELNS0_8CopyModeE0ELNS0_10RepeatModeE0EEEE3RunEv
#9 0x0000000da040 base::debug::TaskAnnotator::RunTask()
#10 0x000000073b16 base::MessageLoop::RunTask()
#11 0x000000073cbe base::MessageLoop::DeferOrRunPendingTask()
#12 0x000000073e9c base::MessageLoop::DoWork()
#13 0x00000007c730 base::MessagePumpLibevent::Run()
#14 0x000000073884 base::MessageLoop::RunHandler()
#15 0x00000007f3f2 base::RunLoop::Run()
#16 0x0000000abbd2 base::Thread::Run()
#17 0x0000000ac144 base::Thread::ThreadMain()
#18 0x00000009f108 base::(anonymous namespace)::ThreadFunc()
And the end of the serial log shows the following was the last sent command:
Bytes sent: 0x00 0x03 0x07 0x02 0x00 0x02 0x00 0x02 0x00 0x02 0x00 0x01.
This is the command to start streaming the saved samples on the sd card over the usb-uart interface to the host.
Next, we see that the init command from a battor -b -v returns:
ack ret:2 type:0 value:6
which is ERROR_DMA_CH2_OVERFLOW
We suspect that this is related to timing for how the battor fw may still be blocking on reading the full command; though we thought we fixed it. For now it looks to be happening < 0.01% of the time so we're putting this on the backlog.