The RTT log crashes frequently

Dear:

  I am useing NCSv2.6.0 version.On the basis of my project, adding RTT printing of Bluetooth scan packet and scan response packet will frequently appear Log crash.

  The following is the crash information

  00> [00:07:11.561,035] <inf> app: Filters matched. Address: F6:17:78:AB:28:49 (random) connectable: 1
00>
00> [00:07:11.637,664] [1;31m<err> os: r0/a1: 0x00000004 r1/a2: 0x0000007d r2/a3: 0x00000000
00> [00:07:11.637,664] [1;31m<err> os: r3/a4: 0x000386d5 r12/ip: 0x0002c291 r14/lr: 0x00029bf9[0m
00> [00:07:11.637,695] [1;31m<err> os: xpsr: 0x61000000[0m
00> [00:07:11.637,695] [1;31m<err> os: Faulting instruction address (r15/pc): 0x00043422
00> [00:07:11.637,756] [1;31m<err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0[0m
00> [00:07:11.637,786] [1;31m<err> os: Current thread: 0x20002548 (logging)[0m
00> [00:07:21.406,677] [1;31m<err> fatal_error: Resetting system
00> [00:00:00.004,821] <inf> app: The resume reason: 0x00000004, 0x0

 Here is prj.conf

# Config logger
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_PRINTK=n
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=2048
CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=100
CONFIG_LOG_BUFFER_SIZE=4096
CONFIG_LOG_MODE_OVERFLOW=y
CONFIG_LOG_BACKEND_RTT_MODE_DROP=y
CONFIG_LOG_BACKEND_RTT_MODE_BLOCK=n
CONFIG_LOG_MODE_DEFERRED=y
CONFIG_LOG_BACKEND_SHOW_COLOR=y
CONFIG_LOG_TIMESTAMP_64BIT=y
CONFIG_LOG_MEM_UTILIZATION=y
Add LOG_INF("Filters matched. Address: %s connectable: %d ",addr, connectable); This line of code will cause frequent Log crashes,Delete and it won't crash.
static void scan_filter_match(struct bt_scan_device_info *device_info,
                struct bt_scan_filter_match *filter_match,
                bool connectable)
{
    char addr[BT_ADDR_LE_STR_LEN];

    bt_addr_le_to_str(device_info->recv_info->addr, addr, sizeof(addr));

    LOG_INF("Filters matched. Address: %s connectable: %d ",addr, connectable);

    if(device_info->recv_info->adv_type == BT_GAP_ADV_TYPE_ADV_SCAN_IND)
    {
        // LOG_HEXDUMP_INF(device_info->adv_data->data,device_info->adv_data->len,"scan:");
    }
}
While monitoring the log buf space with a period of one second, it crashes when the value of buf_use starts to increase from 0 and exceeds buf_size.The value of buf_use is always 0 in normal operation.
void ptint_log_buff_size()
{
    log_mem_get_usage(&buf_size,&buf_use);
    log_mem_get_max_usage(&max_buf);
    pf_log_raw(1,"log buf size==========>>>>>>>>>>>>(%d|%d|%d|%d)",buf_size,buf_use,max_buf,log_buffered_cnt());
}
Here's how I rewrote the print
#define NCS_LOG_FLUSH()         while(log_process())
#define pf_log_raw(onoff, ...) do {if (onoff) {LOG_INF(__VA_ARGS__);NCS_LOG_FLUSH();}} while (0);
Please help to solve this problem
Thanks
Parents
  • Hi,

    I do not immediately have an explaantion for this. Can you check the faulting address from the log with addr2line and see in which file and line number this is? (0x00043422 in this case but it will change if you make any modifications and re-build)

  • hello,

    Do you have any good suggestions?

    The project is about to be done, and it has been delayed for a long time by the log problem.

    looking forward to your reply.

    Thanks

  • Hi,

    Without Bluetooth, the pf_log_raw() function ran for three days without problems.

    Using LOG_INF() to print broadcast packets and BROADCAST RESPONSE packets causes frequent crashes when Bluetooth is on.

    static void scan_filter_match(struct bt_scan_device_info *device_info,
                    struct bt_scan_filter_match *filter_match,
                    bool connectable)
    {
        char addr[BT_ADDR_LE_STR_LEN];
    
        bt_addr_le_to_str(device_info->recv_info->addr, addr, sizeof(addr));
    
        LOG_INF("Filters matched. Address: %s connectable: %d ",addr, connectable);
    
        if(device_info->recv_info->adv_type == BT_GAP_ADV_TYPE_ADV_SCAN_IND)
        {
            // LOG_HEXDUMP_INF(device_info->adv_data->data,device_info->adv_data->len,"scan:");
        }
    }

    looking forward to your reply.

    Thanks

  • Hi,

    Do you have any good ways to circumvent this problem?

    When I use the pf_log_raw() function to print, each statement has a newline. Could it have something to do with that?

    Something like that.

    00> [00:00:13.221,008] <inf> app: CT75 Temp: tmpVar = 18c0, temp = 247
    00> 
    00> [00:00:13.221,466] <inf> app: AccWorkingMode(0) accWakeEventMask(0x0)
    00> 
    00> [00:00:13.221,923] <inf> app: Main(0x0:0 mv) Bat(0x578:4424 mv) isBatteryValid(1)
    00> 
    00> [00:00:13.222,473] <inf> app: Bat2(0x581:4452 mv) Select bat(1)
    00> 
    00> [00:00:13.222,900] <inf> app: vCheck(0:0 mv) Low(0) High(0).
    00> 
    00> [00:00:13.224,578] <inf> app: MCU Temperature: 23, ACC Temperature: 24
    00> 
    00> [00:00:13.259,887] <inf> app: Pressure (Pa) 10236
    00> 
    00> [00:00:13.317,993] <inf> app: IO_CMD(0xcf) len(1) Value:
    00> 
    00> [00:00:13.318,450] <inf> app: 07 
    00> 
    00> [00:00:13.318,786] <inf> app: .  
    00> 
    00> [00:00:13.319,305] <inf> app: 24 08 cf 07 f0 00 e6 00 f7 00 5c 0d 
    00> 
    00> [00:00:13.319,793] <inf> app: $  .  .  .  .  .  .  .  .  .  \  .  
    00> 
    00> [00:00:13.320,465] <inf> app: IO_CMD(0xba) len(0) Value:

    Thanks

  • Hi,

    I am not sure, to be honest. I have not been able to reproduce or understand exactly how this happens. However, I wonder if it could help to increase CONFIG_LOG_BACKEND_RTT_MESSAGE_SIZE a bit from the default value. Does that make a difference?

  • Hi,

    When I increase the value of CONFIG_LOG_BACKEND_RTT_MESSAGE_SIZE from 128 to 256, the running time is extended. There is no crash, but "messages droped" occurs.

    Here is log.

    00> [00:18:32.650,421] <inf> app: log buf size==========>>>>>>>>>>>>(4092|0|4068|0)
    00> [00:18:32.651,000] <inf> app: AccWorkingMode(5) accWakeEventMask(0x3)
    00> 
    00> [00:18:32.651,458] <inf> app: Motion(T4 M1 S2 D10 I(0:0x0))
    00> 
    00> [00:18:32.652,343] <inf> app: Main(0x0:0 mv) Bat(0xb:72 mv) isBatteryValid(0)
    00> 
    00> [00:18:32.652,862] <inf> app: vCheck(11:72 mv) Low(0) High(0).
    00> 
    00> [00:18:33.150,085] <inf> app: Filters matched. Address: E6:42:55:9E:CA:C8 (random) connectable: 0 
    00> [00:18:33.150,115] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 8a 23  04                      |.o.....# .       
    00> [00:18:33.653,594] <inf> app: timer_s: 1112 Intstat(0x0) Sleep(2) WD(6174) SAlarm(6114) NoTSetMotionFlag(0)
    00> 
    00> [00:18:33.657,043] <inf> app: IntExtstatus(0x0)
    00> 
    00> [00:18:33.657,379] <inf> app: APM onoff(1) state(0)
    00> 
    00> [00:18:33.657,775] <inf> app: log buf size==========>>>>>>>>>>>>(4092|0|4068|0)
    00> [00:18:33.658,691] <inf> app: AccWorkingMode(5) accWakeEventMask(0x3)
    00> 
    00> [00:18:33.659,149] <inf> app: Motion(T4 M1 S2 D10 I(0:0x0))
    00> 
    00> [00:18:33.659,606] <inf> app: Main(0x0:0 mv) Bat(0x7:59 mv) isBatteryValid(0)
    00> 
    00> [00:18:33.660,125] <inf> app: vCheck(7:59 mv) Low(0) High(0).
    00> 
    00> [00:18:33.971,893] <inf> app: Filters matched. Address: CF:EF:94:1D:32:20 (random) connectable: 0 
    00> [00:18:33.971,923] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 01 a1  05                      |.o...... .       
    00> [00:18:34.155,700] <inf> app: Filters matched. Address: E6:42:55:9E:CA:C8 (random) connectable: 0 
    00> [00:18:34.155,731] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 8a 23  04                      |.o.....# .       
    00> [00:18:34.660,919] <inf> app: timer_s: 1113 Intstat(0x0) Sleep(2) WD(6173) SAlarm(6113) NoTSetMotionFlag(0)
    00> 
    00> [00:18:34.666,625] <inf> app: IntExtstatus(0x0)
    00> 
    00> [00:18:34.667,297] <inf> app: Filters matched. Address: E6:42:55:9E:CA:C8 (random) connectable: 0 
    00> [00:18:34.667,358] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 8a 23  04                      |.o.....# .       
    00> [00:18:34.670,166] <inf> app: APM onoff(1) state(0)
    00> 
    00> [00:18:34.670,562] <inf> app: log buf size==========>>>>>>>>>>>>(4092|0|4068|0)
    00> [00:18:34.671,051] <inf> app: AccWorkingMode(5) accWakeEventMask(0x3)
    00> 
    00> [00:18:34.671,508] <inf> app: Motion(T4 M1 S2 D10 I(0:0x0))
    00> 
    00> [00:18:34.672,393] <inf> app: Main(0x0:0 mv) Bat(0x7:59 mv) isBatteryValid(0)
    00> 
    00> [00:18:34.672,912] <inf> app: vCheck(7:59 mv) Low(0) High(0).
    00> 
    00> [00:18:34.844,787] <inf> app: Filters matched. Address: E6:8F:DE:53:C2:3E (random) connectable: 0 
    00> [00:18:34.844,848] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 08 f6  00                      |.o...... .       
    00> [00:18:34.986,602] <inf> app: Filters matched. Address: CF:EF:94:1D:32:20 (random) connectable: 0 
    00> [00:18:34.986,633] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 01 a1  05                      |.o...... .       
    00> [00:18:35.168,518] <inf> app: Filters matched. Address: E6:42:55:9E:CA:C8 (random) coo[00:18:35.168,548] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 8a 23  04                      |.o.....# .       
    00> [00:18:35.348,236] <inf> app: Filters matched. Address: E6:8F:DE:53:C2:3E (random) connectable: 0 
    00> [00:18:35.348,266] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 08 f6  00                      |.o...... .       
    00> [00:18:35.667,327] <inf> app: Filters matched. Address: E6:42:55:9E:CA:C8 (random) connectable: 0 
    00> [00:18:35.667,358] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 8a 23  04                      |.o.....# .       
    00> [00:18:35.673,645] <inf> app: timer_s: 1114 Intstat(0x0) Sleep(2) WD(6172) SAlarm(6112) NoTSetMotionFlag(0)
    00> 
    00> [00:18:35.682,006] <inf> app: IntExtstatus(0x0)
    00> 
    00> [00:18:35.682,708] <inf> app: APM onoff(1) state(0)
    00> 
    00> [00:18:35.683,105] <inf> app: log buf size==========>>>>>>>>>>>>(4092|468|4068|0)
    00> [00:18:35.683,685] <inf> app: AccWorkingMode(5) accWakeEventMask(0x3)
    00> 
    00> [00:18:35.684,143] <inf> app: Motion(T4 M1 S2 D10 I(0:0x0))
    00> 
    00> [00:18:35.684,600] <inf> app: Main(0x0:0 mv) Bat(0xc:75 mv) isBatteryValid(0)
    00> 
    00> [00:18:35.685,119] <inf> app: vCheck(12:75 mv) Low(0) High(0).
    00> 
    00> nnectable: 0 
    00> [00:18:36.178,222] <inf> app: Filters matched. Address: E6:42:55:9E:CA:C8 (random) connectable: 0 
    00> [00:18:36.178,253] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 8a 23  04                      |.o.....# .       
    00> [00:18:36.680,328] <inf> app: Filters matched. Address: E6:42:55:9E:CA:C8 (random) connectable: 0 
    00> [00:18:36.680,358] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 8a 23  04                      |.o.....# .       
    00> [00:18:36.686,248] <inf> app: timer_s: 1115 Intstat(0x0) Sleep(2) WD(6171) SAlarm(6111) NoTSetMotionFlag(0)
    00> 
    00> [00:18:36.691,528] <inf> app: IntExtstatus(0x0)
    00> 
    00> [00:18:36.691,894] <inf> app: APM onoff(1) state(0)
    00> 
    00> [00:18:36.692,291] <inf> app: log buf size==========>>>>>>>>>>>>(4092|1028|4068|0)
    00> [00:18:36.692,779] <inf> app: AccWorkingMode(5) accWakeEventMask(0x3)
    00> 
    00> [00:18:36.693,237] <inf> app: Motion(T4 M1 S2 D10 I(0:0x0))
    00> 
    00> [00:18:36.693,695] <inf> app: Main(0x0:0 mv) Bat(0x8:63 mv) isBatteryValid(0)
    00> 
    00> [00:18:36.694,213] <inf> app: vCheck(8:63 mv) Low(0) High(0).
    00> 
    00> [00:18:36.864,776] <inf> app: Filters matched. Address: E6:8F:DE:53:C2:3E (random) connectable: 0 
    00> [00:18:36.864,807] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 08 f6  00                      |.o...... .       
    00> [00:18:36.939,331] <inf> app: Filters matched. Address: F2:5D:69:92:4B:65 (random) connectable: 0 
    00> [00:18:36.939,361] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 15 6e  05                      |.o.....n .       
    00> [00:18:37.369,781] <inf> app: Filters matched. Address: E6:8F:DE:53:C2:3E (random) connectable: 0 
    00> [00:18:37.369,812] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 08 f6  00                      |.o...... .       
    00> [00:18:37.694,946] <inf> app: timer_s: 1116 Intstat(0x0) Sleep(2) WD(6170) SAlarm(6110) NoTSetMotionFlag(0)
    00> 
    00> [00:18:37.702,392] <inf> app: IntExtstatus(0x0)
    00> 
    00> [00:18:37.702,728] <inf> app: APM onoff(1) state(0)
    00> 
    00> [00:18:37.703,125] <inf> app: log buf size==========>>>>>>>>>>>>(4092|1708|4068|0)
    00> [00:18:37.703,643] <inf> app: AccWorkingMode(5) accWakeEventMask(0x3)
    00> 
    00> [00:18:37.704,101] <inf> app: Motion(T4 M1 S2 D10 I(0:0x0))
    00> 
    00> [00:18:37.704,559] <inf> app: Main(0x0:0 mv) Bat(0xb:72 mv) isBatteryValid(0)
    00> 
    00> [00:18:37.705,078] <inf> app: vCheck(11:72 mv) Low(0) High(0).
    00> 
    00> [00:18:37.940,093] <inf> app: Filters matched. Address: FE:E7:5E:3E:59:F5 (random) connectable: 0 
    00> [00:18:37.940,124] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 00 a1  05                      |.o...... .       
    00> [00:18:37.955,505] <inf> app: Filters matched. Address: F2:5D:69:92:4B:65 (random) connectable: 0 
    00> [00:18:37.955,535] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 15 6e  05                      |.o.....n .       
    00> [00:18:38.376,403] <inf> app: Filters matched. Address: E6:8F:DE:53:C2:3E (random) connectable: 0 
    00> [00:18:38.376,434] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 08 f6  00                      |.o...... .       
    00> [00:18:38.705,810] <inf> app: timer_s: 1117 Intstat(0x0) Sleep(2) WD(6169) SAlarm(6109) NoTSetMotionFlag(0)
    00> 
    00> [00:18:38.713,256] <inf> app: IntExtstatus(0x0)
    00> 
    00> [00:18:38.713,592] <inf> app: APM onoff(1) state(0)
    00> 
    00> [00:18:38.713,989] <inf> app: log buf size==========>>>>>>>>>>>>(4092|2388|4068|0)
    00> [00:18:38.714,508] <inf> app: AccWorkingMode(5) accWakeEventMask(0x3)
    00> 
    00> [00:18:38.714,965] <inf> app: Motion(T4 M1 S2 D10 I(0:0x0))
    00> 
    00> [00:18:38.715,423] <inf> app: Main(0x0:0 mv) Bat(0xc:75 mv) isBatteryValid(0)
    00> 
    00> [00:18:38.715,942] <inf> app: vCheck(12:75 mv) Low(0) High(0).
    00> 
    00> [00:18:38.968,170] <inf> app: Filters matched. Address: F2:5D:69:92:4B:65 (random) connectable: 0 
    00> [00:18:38.968,231] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 15 6e  05                      |.o.....n .       
    00> [00:18:39.479,248] <inf> app: Filters matched. Address: F2:5D:69:92:4B:65 (random) connectable: 0 
    00> [00:18:39.479,278] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 15 6e  05                      |.o.....n .       
    00> [00:18:39.716,674] <inf> app: timer_s: 1118 Intstat(0x0) Sleep(2) WD(6168) SAlarm(6108) NoTSetMotionFlag(0)
    00> 
    00> [00:18:39.721,832] <inf> app: IntExtstatus(0x0)
    00> 
    00> [00:18:39.722,198] <inf> app: APM onoff(1) state(0)
    00> 
    00> [00:18:39.722,564] <inf> app: log buf size==========>>>>>>>>>>>>(4092|2948|4068|0)
    00> [00:18:39.723,083] <inf> app: AccWorkingMode(5) accWakeEventMask(0x3)
    00> 
    00> [00:18:39.723,541] <inf> app: Motion(T4 M1 S2 D10 I(0:0x0))
    00> 
    00> [00:18:39.723,999] <inf> app: Main(0x0:0 mv) Bat(0x6:56 mv) isBatteryValid(0)
    00> 
    00> [00:18:39.724,517] <inf> app: vCheck(6:56 mv) Low(0) High(0).
    00> 
    00> [00:18:39.956,604] <inf> app: Filters matched. Address: FE:E7:5E:3E:59:F5 (random) connectable: 0 
    00> [00:18:39.956,665] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 00 a1  05                      |.o...... .       
    00> [00:18:39.979,675] <inf> app: Filters matched. Address: F2:5D:69:92:4B:65 (random) connectable: 0 
    00> [00:18:39.979,705] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 15 6e  05                      |.o.....n .       
    00> [00:18:40.480,438] <inf> app: Filters matched. Address: F2:5D:69:92:4B:65 (random) connectable: 0 
    00> [00:18:40.480,468] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 15 6e  05                      |.o.....n .       
    00> [00:18:40.725,250] <inf> app: timer_s: 1119 Intstat(0x0) Sleep(2) WD(6167) SAlarm(6107) NoTSetMotionFlag(0)
    00> 
    00> [00:18:40.732,696] <inf> app: IntExtstatus(0x0)
    00> 
    00> [00:18:40.733,032] <inf> app: APM onoff(1) state(0)
    00> 
    00> [00:18:40.733,428] <inf> app: log buf size==========>>>>>>>>>>>>(4092|3628|4068|0)
    00> [00:18:40.733,947] <inf> app: AccWorkingMode(5) accWakeEventMask(0x3)
    00> 
    00> [00:18:40.734,405] <inf> app: Motion(T4 M1 S2 D10 I(0:0x0))
    00> 
    00> [00:18:40.734,863] <inf> app: Main(0x0:0 mv) Bat(0x7:59 mv) isBatteryValid(0)
    00> 
    00> [00:18:40.735,382] <inf> app: vCheck(7:59 mv) Low(0) High(0).
    00> 
    00> [00:18:40.970,092] <inf> app: Filters matched. Address: FE:E7:5E:3E:59:F5 (random) connectable: 0 
    00> --- 1 messages dropped ---
    00> [00:18:40.970,153] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 00 a1  05                      |.o...... .       
    00> [00:18:41.040,771] <inf> app: Filters matched. Address: CF:EF:94:1D:32:20 (random) connectable: 0 
    00> [00:18:41.040,802] <inf> app: scan:
    00>                               11 07 93 26 ce 8f 89 8f  57 72 14 1d 48 fc 01 00 |...&.... Wr..H...
    00>                               cd 6f 06 ff 00 11 01 a1  05                      |.o...... .       
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 7 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 7 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 3 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 3 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 7 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 9 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---
    00> --- 1 messages dropped ---

    Focus on the change to the second value

    "[00:18:40.733,428] <inf> app: log buf size==========>>>>>>>>>>>>(4092|3628|4068|0)"

    It works fine when buf_use is at 0, but problems start to occur when buf_use increases.

    I hope this finding helps.

    void ptint_log_buff_size()
    {
        log_mem_get_usage(&buf_size,&buf_use);
        log_mem_get_max_usage(&max_buf);
        pf_log_raw(1,"log buf size==========>>>>>>>>>>>>(%d|%d|%d|%d)",buf_size,buf_use,max_buf,log_buffered_cnt());
    }

    If you need to do any other experiments, please ask.

    looking forward to your reply.

    Thanks

  • HI,

    When I increase, run a few times, still will appear the crash problem.

    00> 
    00> [00:01:09.302,703] [1;31m<err> os: r0/a1:  0x00000004  r1/a2:  0x0000007d  r2/a3:  0x00000000
    00> [00:01:09.302,734] [1;31m<err> os: r3/a4:  0x0003871d r12/ip:  0x00000000 r14/lr:  0x00029c39
    00> [00:01:09.302,734] [1;31m<err> os:  xpsr:  0x61000000[0m
    00> [00:01:09.302,764] [1;31m<err> os: Faulting instruction address (r15/pc): 0x0004346a[0m
    00> [00:01:09.302,795] [1;31m<err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0[0m
    00> [00:01:09.302,856] [1;31m<err> os: Current thread: 0x20002548 (logging)[0m
    00> [00:01:14.634,674] [1;31m<err> fatal_error: Resetting system

    pc/r15 :v2.6.0/zephyr/lib/os/assert.c:44

    lr/r14 :  v2.6.0/zephyr/subsys/logging/backends/log_backend_rtt.c:128

    The crash site is the same as before.

    Thanks

Reply
  • HI,

    When I increase, run a few times, still will appear the crash problem.

    00> 
    00> [00:01:09.302,703] [1;31m<err> os: r0/a1:  0x00000004  r1/a2:  0x0000007d  r2/a3:  0x00000000
    00> [00:01:09.302,734] [1;31m<err> os: r3/a4:  0x0003871d r12/ip:  0x00000000 r14/lr:  0x00029c39
    00> [00:01:09.302,734] [1;31m<err> os:  xpsr:  0x61000000[0m
    00> [00:01:09.302,764] [1;31m<err> os: Faulting instruction address (r15/pc): 0x0004346a[0m
    00> [00:01:09.302,795] [1;31m<err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0[0m
    00> [00:01:09.302,856] [1;31m<err> os: Current thread: 0x20002548 (logging)[0m
    00> [00:01:14.634,674] [1;31m<err> fatal_error: Resetting system

    pc/r15 :v2.6.0/zephyr/lib/os/assert.c:44

    lr/r14 :  v2.6.0/zephyr/subsys/logging/backends/log_backend_rtt.c:128

    The crash site is the same as before.

    Thanks

Children
No Data
Related