Pixhawk: hangup while dumping large logs
Using a more or less recent master firmware (11ece6565), my Pixhawk hangs up while dumping a larger dataflash log, like the following one:
Log 10 in /fs/microsd/APM/LOGS/10.BIN of size 5986024 2014/1/27 14:48
I tried the following to fix/ work-around this problem:
- different power options, including USB and 3DR power module
- a freshly formatted SD card did not help.
- after copying the file from the card, mavlogdump.py is able to process the complete file, so I do not think its corrupted
- reconnect the terminal ( GNU screen) to make sure it is not hung - after reconnecting, there is still no sign of life on the ttyACM0. I also
- tried a Windows Laptop using putty, exactly the same behavior.
- changed the SD card - no effect.
I connected a debug terminal to UART4/5 and run a cp of the stuck logs on Pixhawk, to make sure there is no media read error - works without flaw. After adjusting LASTLOG.TXT manually, the copied log shows the same behavior. Tthe debug terminal remains responsive when even if the dump hangs.
Looking on top output, there seems to be a shift of CPU load towards the ArduCopter process (from 60 to 77%) after getting stuck, the idle is about 0% in both cases. The following top dumps are shot on idle (ArduCopter in cmd line mode), while dumping and after getting stuck:
Processes: 11 total, 4 running, 7 sleeping CPU usage: 26.67% tasks, 0.36% sched, 72.98% idle Uptime: 15.248s total, 9.747s idle
PID COMMAND CPU(ms) CPU(%) USED/STACK PRIO(BASE) STATE
0 Idle Task 9747 72.077 0/ 0 0 ( 0) READY
1 hpwork 297 2.022 612/ 3992 192 (192) w:sig
2 lpwork 81 0.044 396/ 3992 50 ( 50) READY
3 init 1253 0.000 1252/ 4088 100 (100) w:sem
28
29 top 68 3.000 1300/ 2992 100 (100) RUN
Processes: 11 total, 5 running, 6 sleeping CPU usage: 97.69% tasks, 0.44% sched, 1.87% idle Uptime: 40.014s total, 26.438s idle
PID COMMAND CPU(ms) CPU(%) USED/STACK PRIO(BASE) STATE
0 Idle Task 26438 1.066 0/ 0 0 ( 0) READY
1 hpwork 811 2.044 612/ 3992 192 (192) w:sig
2 lpwork 241 0.022 396/ 3992 50 ( 50) READY
3 init 1253 0.000 1252/ 4088 100 (100) w:sem
28
29 top 866 3.011 1308/ 2992 100 (100) RUN
Processes: 11 total, 6 running, 5 sleeping CPU usage: 99.64% tasks, 0.36% sched, 0.00% idle Uptime: 58.026s total, 26.590s idle
PID COMMAND CPU(ms) CPU(%) USED/STACK PRIO(BASE) STATE
0 Idle Task 26590 0.000 0/ 0 0 ( 0) READY
1 hpwork 1179 1.055 612/ 3992 192 (192) w:sig
2 lpwork 356 0.022 396/ 3992 50 ( 50) READY
3 init 1253 0.000 1252/ 4088 100 (100) w:sem
28
29 top 1446 3.011 1308/ 2992 100 (100) RUN
I dont know if this is relevant but I can not download logs through telemetry with my PX4, sometimes they stop at some point and they are always heavily corrupted. I manage by USB in the meantime :P Good luck tho!
I also noticed a hang up when getting logs via telemetry, but I think I saw that there is a message to only get logs via USB in that section of MP.
I have to add that as of MP1.2.95 1.1.5150.11972 I cannot download logs via Mavlink. In Terminal/Log Download the selected log starts to download, the values counting the download change for a while then stop. There is then no more response. In Flight Data/Dataflash Logs/Download via Mavlink the message 'cannot get log list' comes up and that is all. APM 2.5+ FW 3.1 Have tried on 2 different APM boards MP running on Mac under Fusion Win 7 MP running on Toughbook under XP
Seems to be fixed in between on master - I am now able to dump logs larger than 30MB using MP2 and via terminal using an USB cable.
excellent, news, thanks! I'll close this issue.