PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.31k stars 13.43k forks source link

Hardfault after attitude PID tuning flight #8913

Closed deksprime closed 4 years ago

deksprime commented 6 years ago

I have come across a hardfault as shared in this fault log. Before this log, I have been extensively tuning the rollrate PID's. I was changing the MC_ROLLRATE_P parameter while the copter was on flight but I got this hard fault after the flight was done. I suspect that the issue might be related to changing parameters around 10 times or so during the flight but I haven't got any direct proof of this. I'm using Pixhawk the Cube as the flight controller and testing on 1.7.3 stable.

[hardfault_log] -- 2018-02-18-10:39:20 Begin Fault Log --
System fault Occurred on: 2018-02-18-10:39:20
 Type:Hard Fault in file:semaphore/sem_post.c at line: 118 running task: mc_att_control
 FW git-hash: 50bd148f53f1aeca6f1bd4a1caabcc18e4f2888b
 Build datetime: Jan  6 2018 11:32:25
 Build url: localhost 
 Processor registers: from 0x2001ab28
 r0:0x00000002 r1:0x2001ab28  r2:0x20008278  r3:0x00000000  r4:0x20020f94  r5:0x00000010 r6:0x2001aab0 r7:0x00000000
 r8:0x20020f94 r9:0x20003174 r10:0x00000064 r11:0x00000000 r12:0x0801fca5  sp:0x20020f50 lr:0x0800741f pc:0x08011188
 xpsr:0x21000000 basepri:0x00000010 control:0x00000004
 exe return:0xffffffe9
 IRQ stack: 
  top:    0x200028f0
  sp:     0x20002870 Valid
  bottom: 0x20002604
  size:   0x000002ec
  used:   000000c8
 User stack: 
  top:    0x20021068
  sp:     0x20020f50 Valid
  bottom: 0x200209dc
  size:   0x0000068c
  used:   0000068c
Interrupt sp memory region, stack pointer lies within stack
0x20002921 0x200132c0
0x20002920 0x000000b1
0x2000291f 0x2000d2b0
0x2000291e 0x0000ffff
0x2000291d 0x00000000
0x2000291c 0x0000ffff
0x2000291b 0x00000000
0x2000291a 0x0000ffff
0x20002919 0x00000000
0x20002918 0x0000ffff
0x20002917 0x00000000
0x20002916 0x0000ffff
0x20002915 0x00000000
0x20002914 0x000000ab
0x20002913 0x2000f8e0
0x20002912 0x000000aa
0x20002911 0x10008490
0x20002910 0x00000149
0x2000290f 0x20022df0
0x2000290e 0x0000ffff
0x2000290d 0x00000000
0x2000290c 0x000000e7
0x2000290b 0x20014bd0
0x2000290a 0x000000e6
0x20002909 0x20014e60
0x20002908 0x0000ffff
0x20002907 0x00000000
0x20002906 0x00000144
0x20002905 0x20019840
0x20002904 0x00000003
0x20002903 0x10002620
0x20002902 0x00000002
0x20002901 0x10001740
0x20002900 0x00000001
0x200028ff 0x10000860
0x200028fe 0x00000000
0x200028fd 0x20002bcc
0x200028fc 0x2000aef0
0x200028fb 0x20008200
0x200028fa 0x00000000
0x200028f9 0x00000000
0x200028f8 0x00000000
0x200028f7 0x00000000
0x200028f6 0x00000000
0x200028f5 0x00000000
0x200028f4 0x00000000
0x200028f3 0x00000000
0x200028f2 0x00000000
0x200028f1 0x20002a58
0x200028f0 0x00000000<-- Interrupt sp top
0x200028ef 0x00000000
0x200028ee 0x00000000
0x200028ed 0x20002a48
0x200028ec 0x20002a68
0x200028eb 0x00000000
0x200028ea 0x00000000
0x200028e9 0x20002a38
0x200028e8 0x20002a58
0x200028e7 0x00000000
0x200028e6 0x00000000
0x200028e5 0x20002a28
0x200028e4 0x20002a48
0x200028e3 0x00000000
0x200028e2 0x00000000
0x200028e1 0x20002a18
0x200028e0 0x20002a38
0x200028df 0x00000000
0x200028de 0x00000000
0x200028dd 0x20002a08
0x200028dc 0x20002a28
0x200028db 0x00000000
0x200028da 0x00000000
0x200028d9 0x200029f8
0x200028d8 0x20002a18
0x200028d7 0x00000000
0x200028d6 0x00000000
0x200028d5 0x200293f8
0x200028d4 0x20002a08
0x200028d3 0x00000000
0x200028d2 0x00000000
0x200028d1 0x200029d8
0x200028d0 0x200293f8
0x200028cf 0x00000000
0x200028ce 0x00000000
0x200028cd 0x200029c8
0x200028cc 0x200029e8
0x200028cb 0x00000000
0x200028ca 0x00000000
0x200028c9 0x200156a8
0x200028c8 0x200029d8
0x200028c7 0x00000000
0x200028c6 0x00000000
0x200028c5 0x20019278
0x200028c4 0x200156a8
0x200028c3 0x00000000
0x200028c2 0x00000000
0x200028c1 0x20002998
0x200028c0 0x20007538
0x200028bf 0x00000000
0x200028be 0x00000000
0x200028bd 0x20002988
0x200028bc 0x200029a8
0x200028bb 0x00000000
0x200028ba 0x00000000
0x200028b9 0x20002978
0x200028b8 0x20002998
0x200028b7 0x00000000
0x200028b6 0x00000000
0x200028b5 0x20015168
0x200028b4 0x20002988
0x200028b3 0x00000000
0x200028b2 0x00000000
0x200028b1 0x20010fc8
0x200028b0 0x20015168
0x200028af 0x00000000
0x200028ae 0x00000000
0x200028ad 0x10004658
0x200028ac 0x20010fc8
0x200028ab 0x00000000
0x200028aa 0x00000000
0x200028a9 0x00000000
0x200028a8 0x20023a28
0x200028a7 0x00000000
0x200028a6 0x00000000
0x200028a5 0x00000002
0x200028a4 0x1000fff8
0x200028a3 0x2002fff8
0x200028a2 0x10000000
0x200028a1 0x20005d80
0x200028a0 0x0003a280
0x2000289f 0x00000000
0x2000289e 0x0000ffff
0x2000289d 0x00000000
0x2000289c 0x00000000
0x2000289b 0x00000000
0x2000289a 0x00000000
0x20002899 0x00000001
0x20002898 0x10000010
0x20002897 0x0000ffff
0x20002896 0x00000000
0x20002895 0x00000000
0x20002894 0x00000000
0x20002893 0x00000000
0x20002892 0x00000001
0x20002891 0x00000001
0x20002890 0x2001ab28
0x2000288f 0x08004f33
0x2000288e 0x00000000
0x2000288d 0x00000003
0x2000288c 0x20002bb0
0x2000288b 0x20005c8c
0x2000288a 0x00000000
0x20002889 0x080059bd
0x20002888 0x00000000
0x20002887 0x00000000
0x20002886 0x00000000
0x20002885 0x20002d18
0x20002884 0x0000003e
0x20002883 0x00000000
0x20002882 0x20005c8c
0x20002881 0x200028f0
0x20002880 0x08009d9d
0x2000287f 0x08009e21
0x2000287e 0x349cc0f3
0x2000287d 0x200035cc
0x2000287c 0x20018898
0x2000287b 0x080074db
0x2000287a 0x00000000
0x20002879 0x00000000
0x20002878 0x00000000
0x20002877 0x00000000
0x20002876 0x08011188
0x20002875 0x0800741f
0x20002874 0x20020f50
0x20002873 0x0801fca5
0x20002872 0x00000000
0x20002871 0x00000000
0x20002870 0x00000010<-- Interrupt sp
0x2000286f 0x08005939
0x2000286e 0x00000076
0x2000286d 0x080b7fa0
0x2000286c 0x20002ba8
0x2000286b 0x200028f0
0x2000286a 0x00000000
0x20002869 0x200028f0
0x20002868 0x00000076
0x20002867 0x08008f97
0x20002866 0x20000010
0x20002865 0x08005ac9
0x20002864 0x00000000
0x20002863 0x2001aab0
0x20002862 0x0800741f
0x20002861 0x2001ab28
0x20002860 0x200028f0
0x2000285f 0x20002870
0x2000285e 0x0000013c
0x2000285d 0x2001aab0
0x2000285c 0x20000000
0x2000285b 0x08005d49
0x2000285a 0x20002830
0x20002859 0x20002830
0x20002858 0x00000000
0x20002857 0x08005d2b
0x20002856 0x0000005f
0x20002855 0x10004b10
0x20002854 0x00000000
0x20002853 0x00000031
0x20002852 0x08013749
0x20002851 0x080069b5
0x20002850 0x08013749
0x2000284f 0x0800696f
0x2000284e 0x2001aab0
0x2000284d 0x0800741f
0x2000284c 0x00000076
0x2000284b 0x20002aa4
0x2000284a 0x00000000
0x20002849 0x08005765
0x20002848 0x20002814
0x20002847 0x080b7ca8
0x20002846 0x00000000
0x20002845 0x00000000
0x20002844 0x2000282c
0x20002843 0x00000004
0x20002842 0x08013749
0x20002841 0x08013729
0x20002840 0x0000000a
0x2000283f 0x08004665
0x2000283e 0x080bd301
0x2000283d 0x00000039
0x2000283c 0x00000004
0x2000283b 0x080133cf
0x2000283a 0x200027f4
0x20002839 0x00000020
0x20002838 0x080069b5
0x20002837 0x080069c1
0x20002836 0x200027f4
0x20002835 0x0000000a
0x20002834 0x0000000a
0x20002833 0x08004da5
0x20002832 0x0000000a
0x20002831 0x08004665
0x20002830 0x00000010
0x2000282f 0x08004da5
0x2000282e 0x00000038
0x2000282d 0x08004665
0x2000282c 0x00000010
0x2000282b 0x08004da5
0x2000282a 0x00000035
0x20002829 0x08004665
0x20002828 0x00000010
0x20002827 0x08004da5
0x20002826 0x00000031
0x20002825 0x08004665
0x20002824 0x00000010
0x20002823 0x00000000
0x20002822 0xbc83e2c1
0x20002821 0xbb45a334
0x20002820 0x3b45c5bc
0x2000281f 0x0808afdb
0x2000281e 0x200027f8
0x2000281d 0x1000d260
0x2000281c 0x1000d490
0x2000281b 0x08005ac9
0x2000281a 0x00000000
0x20002819 0x00000000
0x20002818 0x00000000
0x20002817 0x00000000
0x20002816 0x200027e0
0x20002815 0x00000000
0x20002814 0x00000000
0x20002813 0x00000002
0x20002812 0x1000d470
0x20002811 0xac1d72f4
0x20002810 0xa586f6df
0x2000280f 0x200026d8
0x2000280e 0x00000001
0x2000280d 0x00000003
0x2000280c 0x3512199a
0x2000280b 0xb51206be
0x2000280a 0xb60b4b0e
0x20002809 0x200026c0
0x20002808 0x00000001
0x20002807 0x00000003
0x20002806 0x3512199a
0x20002805 0xb51206be
0x20002804 0xb60b4b0e
0x20002803 0x200026a8
0x20002802 0x00000001
0x20002801 0x00000003
0x20002800 0x36bf2d9b
0x200027ff 0xb6bf113b
0x200027fe 0xb7d8c1c3
0x200027fd 0x080afa07
0x200027fc 0x349cc0de
0x200027fb 0x200027c8
0x200027fa 0x1000cfb8
0x200027f9 0xdeadbeef
0x200027f8 0xdeadbeef
0x200027f7 0xdeadbeef
0x200027f6 0xdeadbeef
0x200027f5 0xdeadbeef
0x200027f4 0xdeadbeef
0x200027f3 0xdeadbeef
0x200027f2 0xdeadbeef
0x200027f1 0xdeadbeef
0x200027f0 0xdeadbeef
0x200027ef 0xdeadbeef
0x200027ee 0xdeadbeef
0x200027ed 0xdeadbeef
0x200027ec 0xdeadbeef
0x200027eb 0xdeadbeef
0x200027ea 0xdeadbeef
0x200027e9 0xdeadbeef
0x200027e8 0xdeadbeef
0x200027e7 0xdeadbeef
0x200027e6 0xdeadbeef
0x200027e5 0xdeadbeef
0x200027e4 0xdeadbeef
0x200027e3 0xdeadbeef
0x200027e2 0xdeadbeef
0x200027e1 0xdeadbeef
0x200027e0 0xdeadbeef
0x200027df 0xdeadbeef
0x200027de 0xdeadbeef
0x200027dd 0xdeadbeef
0x200027dc 0xdeadbeef
0x200027db 0xdeadbeef
0x200027da 0xdeadbeef
0x200027d9 0xdeadbeef
0x200027d8 0xdeadbeef
0x200027d7 0xdeadbeef
0x200027d6 0xdeadbeef
0x200027d5 0xdeadbeef
0x200027d4 0xdeadbeef
0x200027d3 0x00000000
0x200027d2 0x00000000
0x200027d1 0x00000000
0x200027d0 0x00000000
0x200027cf 0x00000000
0x200027ce 0x00000000
0x200027cd 0x00000000
0x200027cc 0x00000000
0x200027cb 0x00000000
0x200027ca 0x00000000
0x200027c9 0x00000000
0x200027c8 0x00000000
0x200027c7 0x00000000
0x200027c6 0x00000000
0x200027c5 0x00000000
0x200027c4 0x00000000
0x200027c3 0x00000000
0x200027c2 0x00000000
0x200027c1 0x00000000
0x200027c0 0x00000000
0x200027bf 0x00000000
0x200027be 0x568c27c5
0x200027bd 0x00000000
0x200027bc 0x30736169
0x200027bb 0x625f726f
0x200027ba 0x736e6573
0x200027b9 0x20021190
0x200027b8 0x080bf25c
0x200027b7 0x00000004
0x200027b6 0x00000000
0x200027b5 0x1000f8c0
0x200027b4 0x80000060
0x200027b3 0x00000030
0x200027b2 0x0008a160
0x200027b1 0x00000004
0x200027b0 0x1f01014b
0x200027af 0x000350da
0x200027ae 0x00000000
0x200027ad 0x349cb621
0x200027ac 0x17c23ee6
0x200027ab 0x20016ce0
0x200027aa 0x080d7b2c
0x200027a9 0x00000000
0x200027a8 0x00040001
0x200027a7 0x20021170
0x200027a6 0xfa074f00
0x200027a5 0x4c3c0000
0x200027a4 0x00000000
0x200027a3 0xc5620000
0x200027a2 0x00000000
User sp memory region, stack pointer lies within stack
0x20021001 0x568c27c5
0x20021000 0x00000000
0x20020fff 0x30736169
0x20020ffe 0x625f726f
0x20020ffd 0x736e6573
0x20020ffc 0x20021190
0x20020ffb 0x080bf25c
0x20020ffa 0x00000004
0x20020ff9 0x00000000
0x20020ff8 0x1000f8c0
0x20020ff7 0x80000060
0x20020ff6 0x00000030
0x20020ff5 0x0008a160
0x20020ff4 0x00000004
0x20020ff3 0x1f01014b
0x20020ff2 0x000350da
0x20020ff1 0x00000000
0x20020ff0 0x349cb621
0x20020fef 0x17c23ee6
0x20020fee 0x20016ce0
0x20020fed 0x080d7b2c
0x20020fec 0x00000000
0x20020feb 0x00040001
0x20020fea 0x20021170
0x20020fe9 0xfa074f00
0x20020fe8 0x4c3c0000
0x20020fe7 0x00000000
0x20020fe6 0xc5620000
0x20020fe5 0x00000000
0x20020fe4 0x33000001
0x20020fe3 0x9fea9400
0x20020fe2 0x080d7b38
0x20020fe1 0x00000000
0x20020fe0 0x080bb9fc
0x20020fdf 0x80000020
0x20020fde 0x00000060
0x20020fdd 0xbe0ee78d
0x20020fdc 0x3a810030
0x20020fdb 0x73616962
0x20020fda 0x5f726f73
0x20020fd9 0x6e65732f
0x20020fd8 0x6a626f2f
0x20020fd7 0x80000020
0x20020fd6 0x00000020
0x20020fd5 0x0017f80c
0x20020fd4 0x5d49ad44
0x20020fd3 0xc1552d7f
0x20020fd2 0x00000000
0x20020fd1 0x0000004b
0x20020fd0 0x00000001
0x20020fcf 0x80000020
0x20020fce 0x00000020
0x20020fcd 0x256f5f28
0x20020fcc 0x41b5976d
0x20020fcb 0x6d85e886
0x20020fca 0x00000000
0x20020fc9 0x000000fe
0x20020fc8 0x000000d1
0x20020fc7 0x80000020
0x20020fc6 0x00000020
0x20020fc5 0x3df44e78
0x20020fc4 0x4d309a4a
0x20020fc3 0x3adb754f
0x20020fc2 0x00000000
0x20020fc1 0x0000004b
0x20020fc0 0x000000ce
0x20020fbf 0x80000020
0x20020fbe 0x00000020
0x20020fbd 0x5fcf45fa
0x20020fbc 0x0592f261
0x20020fbb 0x478ec4b9
0x20020fba 0x00000000
0x20020fb9 0x000000fe
0x20020fb8 0x00035705
0x20020fb7 0x80000020
0x20020fb6 0x00000020
0x20020fb5 0x5ceb5111
0x20020fb4 0xf24f5962
0x20020fb3 0x4c074b8a
0x20020fb2 0x00000000
0x20020fb1 0x0000004b
0x20020fb0 0x00011cfa
0x20020faf 0x80000020
0x20020fae 0x00000020
0x20020fad 0x1fff6dab
0x20020fac 0x9fc0b60f
0x20020fab 0xca38f7da
0x20020faa 0x00000000
0x20020fa9 0x0000004b
0x20020fa8 0x00009afb
0x20020fa7 0x80000020
0x20020fa6 0x00000020
0x20020fa5 0xf31b9a1c
0x20020fa4 0xa5fe69c8
0x20020fa3 0xe3317680
0x20020fa2 0x00000000
0x20020fa1 0x0000004b
0x20020fa0 0x00000ea9
0x20020f9f 0x800006b0
0x20020f9e 0x00000020
0x20020f9d 0xad9cf324
0x20020f9c 0xde006c6f
0x20020f9b 0x72746e6f
0x20020f9a 0x635f7474
0x20020f99 0x615f636d
0x20020f98 0x00000000
0x20020f97 0x20021074
0x20020f96 0xdeadbeef
0x20020f95 0x00000000
0x20020f94 0x00000000
0x20020f93 0x08007f35
0x20020f92 0x00000000
0x20020f91 0x00000000
0x20020f90 0x00000000
0x20020f8f 0x00000000
0x20020f8e 0x00000000
0x20020f8d 0x00000000
0x20020f8c 0x00000101
0x20020f8b 0x00000000
0x20020f8a 0x00000000
0x20020f89 0x00000000
0x20020f88 0x00000000
0x20020f87 0x00000000
0x20020f86 0x00000000
0x20020f85 0x00000000
0x20020f84 0x00000000
0x20020f83 0x01000000
0x20020f82 0x08007f10
0x20020f81 0x00000000
0x20020f80 0x00000000
0x20020f7f 0x00000000
0x20020f7e 0x00000000
0x20020f7d 0x00000000
0x20020f7c 0x00000000
0x20020f7b 0xdeadbeef
0x20020f7a 0xdeadbeef
0x20020f79 0x20020550
0x20020f78 0x00000101
0x20020f77 0x20020f94
0x20020f76 0x0000000c
0x20020f75 0xdeadbeef
0x20020f74 0xdeadbeef
0x20020f73 0xdeadbeef
0x20020f72 0xdeadbeef
0x20020f71 0xdeadbeef
0x20020f70 0xdeadbeef
0x20020f6f 0x0807d9c7
0x20020f6e 0x00000000
0x20020f6d 0x00000000
0x20020f6c 0x00000000
0x20020f6b 0x200059e8
0x20020f6a 0x20020048
0x20020f69 0x2001ffa8
0x20020f68 0x20020000
0x20020f67 0x2001fe60
0x20020f66 0x20020000
0x20020f65 0x20010000
0x20020f64 0x00000000
0x20020f63 0x20020000
0x20020f62 0x00000000
0x20020f61 0x10010000
0x20020f60 0x0801f885
0x20020f5f 0x08017e6d
0x20020f5e 0x00000001
0x20020f5d 0x00000001
0x20020f5c 0x20020f94
0x20020f5b 0x20020ff8
0x20020f5a 0x20020fe8
0x20020f59 0x00000000
0x20020f58 0x00000064
0x20020f57 0x000d7846
0x20020f56 0x0000013c
0x20020f55 0x0801df1f
0x20020f54 0x00000064
0x20020f53 0x000000f0
0x20020f52 0x2001aab0
0x20020f51 0x00000000
0x20020f50 0x00000001<-- User sp
0x20020f4f 0x0800741f
0x20020f4e 0x80000019
0x20020f4d 0x36b3d9db
0x20020f4c 0x39d9d10b
0x20020f4b 0xbe99999a
0x20020f4a 0x3c64ccad
0x20020f49 0x3d91e04a
0x20020f48 0x3e12c281
0x20020f47 0xbde45b9c
0x20020f46 0x3dbae049
0x20020f45 0xbd9e233f
0x20020f44 0x3d88efd0
0x20020f43 0xbd6fb3c4
0x20020f42 0x3d4c30fd
0x20020f41 0xbd15a221
0x20020f40 0x3c8569d7
0x20020f3f 0x3f800000
0x20020f3e 0x16d0acc4
0x20020f3d 0x21000000
0x20020f3c 0x08011188
0x20020f3b 0x0800741f
0x20020f3a 0x0801fca5
0x20020f39 0x00000000
0x20020f38 0x20008278
0x20020f37 0x2001ab28
0x20020f36 0x00000002
0x20020f35 0x00000000
0x20020f34 0x00000000
0x20020f33 0x00000000
0x20020f32 0x00000000
0x20020f31 0x00000000
0x20020f30 0x00000000
0x20020f2f 0x00000000
0x20020f2e 0x00000000
0x20020f2d 0x00000000
0x20020f2c 0x00000000
0x20020f2b 0x00000000
0x20020f2a 0x00000000
0x20020f29 0x00000000
0x20020f28 0x3b03126f
0x20020f27 0x358637bd
0x20020f26 0x3b82cf53
0x20020f25 0xffffffe9
0x20020f24 0x00000000
0x20020f23 0x00000064
0x20020f22 0x20003174
0x20020f21 0x20020f94
0x20020f20 0x00000000
0x20020f1f 0x2001aab0
0x20020f1e 0x00000010
0x20020f1d 0x20020f94
0x20020f1c 0x00000010
0x20020f1b 0x20020f50
0x20020f1a 0xbb298a60
0x20020f19 0x200201dc
0x20020f18 0x00000003
0x20020f17 0x0807c209
0x20020f16 0x20020308
0x20020f15 0x358637bd
0x20020f14 0x3b82cf53
0x20020f13 0x0807bf1d
0x20020f12 0x20020e90
0x20020f11 0x358637bd
0x20020f10 0x3f800000
0x20020f0f 0xbf7adb94
0x20020f0e 0xbe4c362f
0x20020f0d 0x20020e18
0x20020f0c 0x00000003
0x20020f0b 0x00000003
0x20020f0a 0x3f7ffaaf
0x20020f09 0x3c49caf7
0x20020f08 0xbb576c67
0x20020f07 0x3b269acd
0x20020f06 0xbee40491
0x20020f05 0xbf6535f3
0x20020f04 0xbc4ca91f
0x20020f03 0x3f6530a2
0x20020f02 0xbee403ea
0x20020f01 0x20020de8
0x20020f00 0x00000003
0x20020eff 0x00000003
0x20020efe 0x3f7fe4aa
0x20020efd 0xbc91ec48
0x20020efc 0xbcba4018
0x20020efb 0xbce7bd6a
0x20020efa 0xbee3d1b6
0x20020ef9 0xbf652588
0x20020ef8 0x3bbef836
0x20020ef7 0x3f653736
0x20020ef6 0xbee3fb6c
0x20020ef5 0x20020db8
0x20020ef4 0x00000003
0x20020ef3 0x00000003
0x20020ef2 0x3f7ffaac
0x20020ef1 0x3c50db1a
0x20020ef0 0xb02ae4e8
0x20020eef 0x3b269acc
0x20020eee 0xbe4c31ee
0x20020eed 0xbf7adb94
0x20020eec 0xbc4ca91c
0x20020eeb 0x3f7ad65c
0x20020eea 0xbe4c362f
0x20020ee9 0x20020d9c
0x20020ee8 0x00000001
0x20020ee7 0x00000004
0x20020ee6 0xbf5997dd
0x20020ee5 0x3c5e295c
0x20020ee4 0x3ba2f4a5
0x20020ee3 0x3f06d10f
0x20020ee2 0x20020d80
0x20020ee1 0x00000001
0x20020ee0 0x00000004
0x20020edf 0xbf463ec8
0x20020ede 0xbba1be5d
0x20020edd 0x3b842465
0x20020edc 0x3f21f6a5
0x20020edb 0x20020d68
0x20020eda 0x00000001
0x20020ed9 0x00000003
0x20020ed8 0x2e86090d
0x20020ed7 0xbf0ad615
0x20020ed6 0x3f571522
0x20020ed5 0x20020d50
0x20020ed4 0x00000001
0x20020ed3 0x00000003
0x20020ed2 0x3e855caa
0x20020ed1 0xbc9f5857
0x20020ed0 0x3cf6dabc
0x20020ecf 0x20020d38
0x20020ece 0x00000001
0x20020ecd 0x00000003
0x20020ecc 0x3f7ffaac
0x20020ecb 0x3b269acc
0x20020eca 0xbc4ca91c
0x20020ec9 0x20020d20
0x20020ec8 0x00000001
0x20020ec7 0x00000003
0x20020ec6 0x3f7fe4aa
0x20020ec5 0xbce7bd6a
0x20020ec4 0x3bbef836
0x20020ec3 0x0807d4f5
0x20020ec2 0x2001fe60
0x20020ec1 0x3f7757b5
0x20020ec0 0x2001fe60
0x20020ebf 0x080b3ea3
0x20020ebe 0xb02ae4e8
0x20020ebd 0x00000000
0x20020ebc 0x3e88a564
0x20020ebb 0xbee40491
0x20020eba 0xbf6535f3
0x20020eb9 0xbc4ca91f
0x20020eb8 0x3f6530a2
0x20020eb7 0xbee403ea
0x20020eb6 0x3f7fd5db
0x20020eb5 0x3cf6cd30
0x20020eb4 0x3c9f4f98
0x20020eb3 0xbcf6cd30
0x20020eb2 0x3f7fe240
0x20020eb1 0xb9999fc5
0x20020eb0 0xbc9f4f98
0x20020eaf 0xb9999fc5
0x20020eae 0x3f7ff39b
0x20020ead 0x3f7fe4aa
0x20020eac 0xbc91ec48
0x20020eab 0xbcba4018
0x20020eaa 0xbce7bd6a
0x20020ea9 0xbee3d1b6
0x20020ea8 0xbf652588
0x20020ea7 0x3bbef836
0x20020ea6 0x3f653736
0x20020ea5 0xbee3fb6c
0x20020ea4 0x00000000
0x20020ea3 0x0807c51b
0x20020ea2 0x3f06d10f
0x20020ea1 0x20020d38
0x20020ea0 0x2002024c
0x20020e9f 0x20020f64
0x20020e9e 0x00000000
0x20020e9d 0x00000000
0x20020e9c 0x00000000
0x20020e9b 0x00000000
[hardfault_log] -- 2018-02-18-10:39:20 END Fault Log --
M-Skelton commented 6 years ago

I saw the same hard fault in FW

image

Antiheavy commented 6 years ago

If it is any help getting to the bottom of this, here is a link to a fixed wing log with this same hard fault "type". Happened during normal "mission mode" flight as the vehicle was coming in for landing. No idea what happened, but we are very interested in finding out why: https://logs.px4.io/plot_app?log=fcb05575-9317-49d7-932a-31aaf9dccd7d

Antiheavy commented 6 years ago

Here is another fixed wing hard fault log, different hard fault "type" though. may or may-not be related to running into some trees... Chicken-or-egg? Not sure what happened first, the hard fault or the tree: https://review.px4.io/plot_app?log=5a04b85e-dac6-4404-885f-2aa7cb529482

dagar commented 6 years ago

Two of these, (@M-Skelton and one from @M-Skelton) are in the fmu module when running as a task.

@M-Skelton which board are you using?

M-Skelton commented 6 years ago

@dagar I was using an fmuV4 board.

bkueng commented 6 years ago

@deksprime did you flash the version via QGC? If not, can you provide the binary that you flashed?

The only log that points to a valid upstream commit comes from @deksprime. Nevetheless it helps of course collecting different incidents, but we need to make sure we're not chasing different things.

Here's how to debug hardfaults: https://dev.px4.io/en/debug/gdb_debugging.html#debugging-hard-faults-in-nuttx

deksprime commented 6 years ago

@bkueng The version was flashed through the QGC choosing the Stable firmware option

bkueng commented 6 years ago

Thanks. Can you provide the following:

bkueng commented 6 years ago

Let's collect what we know:

Looking only at the initial report (which runs stable w/o additional changes, but the other logs show the same hardfault):

The assertion failure can be due to 2 causes:

The only place matching this stacktrace is the logger, scheduling its main loop (there's a similar stack trace pattern in uORB, but there's a condition that excludes it as a candidate). The semaphore in the logger can indeed overflow, if the hrt keeps firing, but the logger's main loop is blocked for some reason (e.g. a higher-prio task running busy, or a problem in the logger itself). For the counter to overflow, the logger must be blocked for at least almost 2 minutes.

https://github.com/PX4/Firmware/pull/8979 fixes the semaphore counter overflow, but not the root cause here.


@dagar can we have the .elf file available on S3 right next to the .px4 file? This will help with debugging such cases, as we can be sure the binary matches the release (I had to download the same toolchain as CI uses for this now).


Did anyone of you notice if the QGC (mavlink) connection got lost about 2 minutes before the hardfault happened?

Antiheavy commented 6 years ago

Did anyone of you notice if the QGC (mavlink) connection got lost about 2 minutes before the hardfault happened?

I'm not the original poster, but interestingly in our flight the QGC MAVlink telemtry .TLOG went for some seconds longer than the SDcard. Screen shots below and .TLOG attached in the ZIP folder.

2018-01-25 15-26-01.zip .ULOG:

image image

deksprime commented 6 years ago

Unfortunately, I wasn't able to track what was happening on the QGC. I haven't been able to find the SD card of the copter in which this hardfault has happened so I didn't share a flight log. I will share a flight log right away if I find the SD card which I hope might eliminate some other possible causes.

bkueng commented 6 years ago

Thanks for the info. Based on this, it's more likely a memory corruption. And to narrow it down further, I will need to know which drivers & modules are/were running.

Can you provide me with the following:

Antiheavy commented 6 years ago

With regards to this log: https://logs.px4.io/plot_app?log=fcb05575-9317-49d7-932a-31aaf9dccd7d

Hardware:

We have custom init scripts to set parameters, load drivers, etc., I've attached a zip folder with our custom scripts that should show all that.
PX4-init-scripts-master.zip There might be some small differences in parameters between this zip folder and what was flown in the log, but I think nothing that would affect sensors, hardware, or logging.

Antiheavy commented 6 years ago

To add another datapoint to this investigation, we've been going through old SDcard logs and came across another semaphore/sem_post.c Hardfault on a different vehicle. This must have happened during ground handling, not a flight. Identical hardware setup to our other fixed wing hard fault logs. Should be the same init scripts as the ZIP folder I attached previously.

Log: https://review.px4.io/plot_app?log=21d2c119-3aa8-4881-96f3-d11d8b01e380 image

bkueng commented 6 years ago

Interesting, this is quite a while back (Jul 14 2017 20:37:28), and it shows the same pattern.

I did not see anything special from the startup scripts & params, the setup and configuration does not look out of the ordinary.

Antiheavy commented 6 years ago

Here is another semaphore hardfault we came across while going through old SDcards. Same configuration as the other logs I've post previously. This was from a while back. Just adding to the issue here in case someone ever finds something in the future.

Log: https://review.px4.io/plot_app?log=3d54eac4-996d-4590-89ad-708ab64bd2eb

image

LorenzMeier commented 6 years ago

@bkueng Could you have a look? @thomasgubler FYI

bkueng commented 6 years ago

It looks like the same issue. A noticeable difference is that there are no param changes in the latest report, whereas in most previous logs there were. And there is an airspeed sensor error: [cal] Airspeed sensor is reporting errors (260).

I still see the following potential causes:

davids5 commented 6 years ago

I was running a capture test.

fmu mode_pwm4cap1
fmu test

With 100Khz square wave on FMU_CH5

Under high load:

image

I would say the priorities are not correct. MPU9250 ISR is posting the semaphore higher then the poll thread rate of read.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

Closing as stale.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

julianoes commented 5 years ago

@davids5 does this still need following up?

davids5 commented 5 years ago

@julianoes - yes someone should repeat the test with capture and see if the problem still exists.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

julianoes commented 5 years ago

@dinomani is this something you could try at some point?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

bresch commented 4 years ago

We were not able to reproduce this issue in 2 years, closing.