This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
Hello,
Is there some incompatibility for SYSBIOS 6.37 when using 7.2.24 and 8.3.35 CGT compilers? My project uses the libraries below but if I compile with 7.2.24 the project runs fine (has been used for 5 years already) but when compiled with 8.3.35 randomly crashes after anywhere between few minutes to few hours.
UIAPATH := /ti/uia_1_03_01_08
XDCPATH := /ti/xdctools_3_25_06_96
EDMA3 := /ti/edma3_lld_02_11_11_13
DSPLIB := /ti/dsplib_c674x_3_1_1_1
MATHLIB := /ti/mathlib_c674x_3_0_1_1
SYSBIOS := /ti/bios_6_37_05_35
XDAIS := /ti/xdais_7_21_01_07
Most common exceptions are:
ti.sysbios.heaps.HeapMem: line 371: assertion failure: A_invalidFree: Invalid free
xdc.runtime.Error.raise: terminating execution
or:
A0=0x1 A1=0x0
A2=0xc0a760a8 A3=0xc29a99d4
A4=0xc29d6a38 A5=0xc0a7933c
A6=0x8e A7=0xc282c5d8
A8=0x2 A9=0x20
A10=0x90 A11=0xc29d6a38
A12=0x5101920 A13=0xc29a9a2c
A14=0xc2987f78 A15=0x0
A16=0xc0a761c0 A17=0x0
A18=0x0 A19=0x0
A20=0x0 A21=0x0
A22=0xc09ac254 A23=0x0
A24=0x95 A25=0xff
A26=0xc A27=0x100
A28=0x100 A29=0x0
A30=0x5 A31=0x20
B0=0xa480010 B1=0x0
B2=0x1 B3=0xc2987f78
B4=0x0 B5=0xc29a5de6
B6=0xa480010 B7=0xc0a1cebc
B8=0xc B9=0xc2930180
B10=0x90 B11=0x83421160
B12=0xc0a79334 B13=0xc29a7e2c
B14=0xc29e19f8 B15=0xc0a1ce68
B16=0x1 B17=0x7e4
B18=0x51eb851f B19=0x7e6
B20=0x7e8 B21=0x7e7
B22=0xf B23=0x0
B24=0x0 B25=0x6b
B26=0xca B27=0x38
B28=0x91 B29=0x70
B30=0xc0a15170 B31=0xffef
NTSR=0x1820f
ITSR=0x20f
IRP=0xc28eab94
SSR=0x0
AMR=0x0
RILC=0x0
ILC=0x0
Exception at 0xc2924c1c
EFR=0x40000002 NRP=0xc2924c1c
Internal exception: IERR=0x8
Opcode exception
DMC Exception MPFAR=0x83421160 MPFSR=0x120
Security violation, Local L1/L2 cache memory Fault
Supervisor Read violation, Fault ID=0x0
ti.sysbios.family.c64p.Exception: line 256: E_exceptionMax: pc = 0xc2924c1c, sp = 0xc0a1ce68.
xdc.runtime.Error.raise: terminating execution
I was looking with ROV and Exception module returns these:
Exception call stack,
0 ti_sysbios_heaps_HeapTrack_free__F(struct ti_sysbios_heaps_HeapTrack_Object *, void *, unsigned int) at HeapTrack.c:145,PC = 0xC2924C1C FP = 0xC0A1CE68
1 xdc_runtime_Memory_free__F(struct xdc_runtime_IHeap___Object *, void *, unsigned int) at Memory.c:90,PC = 0xC2987F78 FP = 0xC0A1CE90
2 [local to vla_alloc_c]::free_dead_allocations(void *) at vla_alloc.c:177,PC = 0xC294EEE8 FP = 0xC0A1CE98
3 __vla_alloc(void *) at vla_alloc.c:245,PC = 0xC2913140 FP = 0xC0A1CEB8
4 std::__2::num_put<char, std::__2::ostreambuf_iterator<char, std::__2::char_traits<char>>>::do_put(std::__2::ostreambuf_iterator<char, std::__2::char_traits<char>>, std::__2::ios_base &, char, unsigned long) const(unsigned int) at locale:1514,PC = 0xC294C014 FP = 0xC0A1CEE0
5 std::__2::basic_ostream<char, std::__2::char_traits<char>>::operator <<(unsigned short) at ostream:1292,PC = 0xC2933CF0 FP = 0xC0A1CF28
Apparently ROV reports on BIOS module: "All ROV views have been run and no errors were encountered. In BIOS, this includes a check of the System stack usage and all Task stacks."
Best regards,
David.
Hi David,
I'd recommend you try using HeapTrack to isolate the issue. Take a look at https://training.ti.com/debugging-common-application-issues-ti-rtos to get more details on HeapTrack.
Todd
Hi Todd,
I followed the instructions in TIRTOS_CCSDebugging.pdf, enabled HeapTrack which says I have 1564 objects, is there a quick way to see which one is overflowing or do I have to check manually each one? This is the latest error:
A0=0xc0a7d810 A1=0x0
A2=0x1 A3=0x0
A4=0xc0a7d7e0 A5=0xc29d10e8
A6=0xc29d0bf8 A7=0xa5a5a5a5
A8=0xc0a244d8 A9=0x0
A10=0xc0a7d7e7 A11=0xc0a7d818
A12=0xc0a7d7e0 A13=0xc2938070
A14=0xc29a56d0 A15=0x0
A16=0xc0a24478 A17=0x10
A18=0x0 A19=0x0
A20=0x0 A21=0x0
A22=0x1e5c A23=0x1e4c
A24=0x1e3c A25=0x1e2c
A26=0x93 A27=0xfffffff3
A28=0x1c4 A29=0x3
A30=0xc29a480c A31=0xc0a7d82c
B0=0xc0a7d808 B1=0x1
B2=0x1 B3=0xc294e104
B4=0x21 B5=0xc0a244d8
B6=0xc0a7d810 B7=0xc0a244e0
B8=0x14000103 B9=0xa87ea4
B10=0xc B11=0xc0a7d7e4
B12=0x20 B13=0xc28afd9a
B14=0xc29dc860 B15=0xc0a244b8
B16=0x1 B17=0x676f6c2f
B18=0x0 B19=0x0
B20=0x7e8 B21=0x7e7
B22=0x20f B23=0x0
B24=0x2e B25=0x0
B26=0x0 B27=0x10
B28=0x91 B29=0x70
B30=0xc0a7d808 B31=0xffef
NTSR=0x1020f
ITSR=0x20f
IRP=0xc28f3b10
SSR=0x0
AMR=0x0
RILC=0x0
ILC=0x0
Exception at 0xc294e10e
EFR=0x40000000 NRP=0xc294e10e
DMC Exception MPFAR=0x24 MPFSR=0x120
Security violation, Local L1/L2 cache memory Fault
Supervisor Read violation, Fault ID=0x0
UMC Exception MPFAR=0x24 MPFSR=0x110
Security violation, Local L1/L2 cache memory Fault
Supervisor Write violation, Fault ID=0x0
XMC Exception MPFAR=0xc28e64d0 MPFSR=0x184a008
Supervisor Excecute violation, Fault ID=0x50
ti.sysbios.family.c64p.Exception: line 265: E_exceptionMax: pc = 0xc294e10e, sp = 0xc0a244b8.
xdc.runtime.Error.raise: terminating execution
Any suggestions are welcomed.
Best regards,
David.
I tried debugging these exceptions and seem to be happening around std::ostringstream, the code does in various threads:
std::ostringstream *p = new std::ostringstream;
(*p) << "some random length text";
This p is passed to one central thread using a mailbox for logging that calls:
std::cout << p->str() << std::endl;
delete p;
Seems that when using 8.3.6 compiler the mailbox sometimes pends an incorrect message resulting in exceptions above.
I already spent lots of time on this issue and I doubt is easy to reproduce it so I've downgraded back to 7.4.24 and I don't see anymore firmware crashes. As I've said, this project run fine for years until I decided to dockerize the environment but 7.4.24 compiler seems to fail in Linux environment (see https://e2e.ti.com/support/tools/ccs/f/81/t/861916).
Best regards,
David.
Hi David,
is there a simpler project that replicates the issue? It could be possible that the bug has existed and the new compiler has exposed it.
-Kevin
Follow up:
if you do find a project, can you provide the source code so we could recreate the problem? Thanks.
-Kevin