Rock960 Randomly crashes

This is an odd one.

I am using the vendor provided ubuntu server build for this board, 20180115. This build has worked stably before for me, but recently I’ve seen random and frequent crashes all over the place.

The only difference is that I am running upstream u-boot.

For example, this usually occurs while running apt:
https://paste.ubuntu.com/p/9ZnSFnfkGY/

and this one occurs during source compilation, i’ve tried -j1 to -j6. This example is during actual compilation stage, but the same can also occur during ld :

root@rock960:~/temp/cmake-3.14.1# ./bootstrap
---------------------------------------------
CMake 3.14.1, Copyright 2000-2019 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc       
C++ compiler on this system is: g++  -std=gnu++17        
Makefile processor on this system is: make
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has stl wstring
g++ has <ext/stdio_filebuf.h>
---------------------------------------------
g++  -std=gnu++17            -I/root/temp/cmake-3.14.1/Bootstrap.cmk   -I/root/temp/cmake-3.14.1/Source   -I/root/temp/cmake-3.14.1/Source/LexerParser   -I/root/temp/cmake-3.14.1/Utilities  -c /root/temp/cmake-3.14.1/Source/cmAddCustomCommandCommand.cxx -o cmAddCustomCommandCommand.o
[ 1315.815005] Bad mode in Error handler detected, code 0xbf000000 -- SError
[ 1315.815609] Internal error: Oops - bad mode: 0 [#2] SMP
[ 1315.816067] Modules linked in:
[ 1315.816354] CPU: 5 PID: 24619 Comm: cc1plus Tainted: G      D         4.4.103 #2
[ 1315.816997] Hardware name: ROCK960 - 96boards based on Rockchip RK3399 (DT)
[ 1315.817605] task: ffffffc072bb4e00 task.stack: ffffffc078258000
[ 1315.818131] PC is at 0x7fb664aaf0
[ 1315.818425] LR is at 0xc2edc0
[ 1315.818694] pc : [<0000007fb664aaf0>] lr : [<0000000000c2edc0>] pstate: 00000000
[ 1315.819336] sp : 0000007fc605bfe0
[ 1315.819629] x29: 0000007fc605bfe0 x28: 00000000012c6bc0 
[ 1315.820110] x27: 0000000000000000 x26: 0000000000000000 
[ 1315.820591] x25: 0000000000000000 x24: 0000000000000001 
[ 1315.821071] x23: 0000000000000000 x22: 00000000000000a8 
[ 1315.821552] x21: 0000000000000011 x20: 0000007fb15c3f18 
[ 1315.822032] x19: 0000007fb15cf000 x18: 0000007fb63afcb8 
[ 1315.822511] x17: 0000007fb664aa40 x16: 00000000012ae050 
[ 1315.822991] x15: 726f746101002230 x14: 0000000000000001 
[ 1315.823471] x13: 0000000000000000 x12: 0000000000000002 
[ 1315.823951] x11: 000000000000000a x10: 0101010101010101 
[ 1315.824431] x9 : 0000000000000050 x8 : 0000000000000000 
[ 1315.824911] x7 : 0000000000000011 x6 : 0000007fb15cf000 
[ 1315.825391] x5 : 0000000000000000 x4 : 0000000000000008 
[ 1315.825871] x3 : 0000000025954270 x2 : 00000000000000a0 
[ 1315.826350] x1 : 0000007fb15c3f20 x0 : 0000007fb15cf000 
[ 1315.826830] 
[ 1315.826972] Process cc1plus (pid: 24619, stack limit = 0xffffffc078258000)
[ 1315.827618] ---[ end trace a3101f3b7d0715f3 ]---
g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
Makefile:4: recipe for target 'cmAddCustomCommandCommand.o' failed
make: *** [cmAddCustomCommandCommand.o] Error 4
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors: /root/temp/cmake-3.14.1/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
root@rock960:~/temp/cmake-3.14.1# 

The only difference is that I am running upstream u-boot.

It looks like a ram issue for me. For upstream u-boot, are you using the SPL loader from upstream or the pre-built binary ddr loader.

Using miniloader, option 2 in this guide: