ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Pixhawk: hangup while dumping large logs

Open hsteinhaus opened this issue 12 years ago • 5 comments

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 362 2.055 700/ 2040 59 ( 59) w:sem 8 px4io 200 1.011 948/ 2040 240 (240) w:sem 11 fmuservo 73 0.033 868/ 2040 100 (100) w:sem 25 ArduCopter 683 4.000 1412/ 8184 10 ( 10) w:sem 26 724 5.077 692/ 2040 181 (181) w:sem 27 852 6.022 468/ 2040 60 ( 60) READY

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 1063 2.044 700/ 2040 59 ( 59) w:sem 8 px4io 577 1.011 948/ 2040 240 (240) w:sem 11 fmuservo 217 0.033 868/ 2040 100 (100) w:sem 25 ArduCopter 2890 62.088 1444/ 8184 10 ( 10) READY 26 2114 5.088 692/ 2040 181 (181) w:sem 27 2656 18.044 476/ 2040 60 ( 60) w:sem

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 1575 2.066 700/ 2040 59 ( 59) w:sem 8 px4io 845 1.011 948/ 2040 240 (240) w:sem 11 fmuservo 319 0.044 868/ 2040 100 (100) w:sem 25 ArduCopter 15658 77.011 1444/ 8184 10 ( 10) READY 26 3129 5.088 692/ 2040 181 (181) w:sem 27 4784 6.033 476/ 2040 60 ( 60) w:sem

29 top 1446 3.011 1308/ 2992 100 (100) RUN

hsteinhaus avatar Jan 31 '14 16:01 hsteinhaus

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!

totaltmega avatar Jan 31 '14 22:01 totaltmega

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.

britdavis avatar Feb 03 '14 16:02 britdavis

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

mboland avatar Feb 20 '14 20:02 mboland

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.

hsteinhaus avatar Mar 13 '14 19:03 hsteinhaus

excellent, news, thanks! I'll close this issue.

rmackay9 avatar Mar 17 '14 01:03 rmackay9