This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

serialization s130 deadlock

I'm using the serialization code with pc-ble-driver for S130 (version 0.5.0). I randomly get a deadlock in the serialisation code. It can happen after a call to read, write, etc. Below is a typical log (I've added log lines to see what is going on). It shows the request on thread 3010 which returns OK but, as you can see at the bottom, reads are no longer responded to. I'm using this on an Android device that has a NRF51 chip. Thanks in advance.

Time               Threads
01-01 01:30:36.257 1690-3010 Line: 1485, Func: ser_phy_interrupts_enable, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.257 1690-3010 Line: 1491, Func: ser_phy_interrupts_enable, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.257 1690-3010 Line: 1502, Func: ser_phy_interrupts_enable, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.257 1690-3010 Line: 146, Func: app_mailbox_get_length, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/application/transport/app_mailbox.c
01-01 01:30:36.257 1690-3010 [Write] 0xC0
01-01 01:30:36.257 1690-3010 [Write] 0xF8
01-01 01:30:36.265 1690-3010 [Write] 0x0E
01-01 01:30:36.265 1690-3010 [Write] 0x01
01-01 01:30:36.265 1690-3010 [Write] 0xF9
01-01 01:30:36.265 1690-3010 [Write] 0x00
01-01 01:30:36.265 1690-3010 [Write] 0x97
01-01 01:30:36.265 1690-3010 [Write] 0x00
01-01 01:30:36.265 1690-3010 [Write] 0x00
01-01 01:30:36.265 1690-3010 [Write] 0x01
01-01 01:30:36.265 1690-3010 [Write] 0x01
01-01 01:30:36.265 1690-3010 [Write] 0x01
01-01 01:30:36.265 1690-3010 [Write] 0x10
01-01 01:30:36.273 1690-3010 [Write] 0x00
01-01 01:30:36.273 1690-3010 [Write] 0x00
01-01 01:30:36.273 1690-3010 [Write] 0x00
01-01 01:30:36.273 1690-3010 [Write] 0x02
01-01 01:30:36.273 1690-3010 [Write] 0x00
01-01 01:30:36.273 1690-3010 [Write] 0x01
01-01 01:30:36.273 1690-3010 [Write] 0x01
01-01 01:30:36.273 1690-3010 [Write] 0x00
01-01 01:30:36.273 1690-3010 [Write] 0x9A
01-01 01:30:36.273 1690-3010 [Write] 0x5D
01-01 01:30:36.273 1690-3010 [Write] 0xC0
01-01 01:30:36.281 1690-3040 [Read] 0xC0 0x08 0x00 0x00 0xF8 0xC0 0xC0 0xCF 0x6E 0x00 0xC3 0x01 0x97 0x00 0x00 0x00 0x00 0x9D 0x00 0xC0
01-01 01:30:36.281 1690-3040 hci_slip_event_handler event type 2
01-01 01:30:36.281 1690-3010 hci_slip_event_handler event type 0
01-01 01:30:36.281 1690-3040 hci_slip_event_handler event type 2
01-01 01:30:36.281 1690-3040 Line: 1349, Func: hci_rx_event_handler, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 1353, Func: hci_rx_event_handler, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 hci_rx_event_handler exec 1 idle 0
01-01 01:30:36.281 1690-3040 Line: 1370, Func: hci_rx_event_handler, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 1374, Func: hci_rx_event_handler, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 hci_rx_fsm_event_process state 1
01-01 01:30:36.281 1690-3040 Line: 649, Func: ser_phy_event_callback, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 ser_phy_event_callback event 1
01-01 01:30:36.281 1690-3040 phy_events_handler event 1
01-01 01:30:36.281 1690-3040 ser_sd_transport_hal_handler event 1
01-01 01:30:36.281 1690-3040 Line: 1349, Func: hci_rx_event_handler, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 1353, Func: hci_rx_event_handler, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 hci_rx_event_handler exec 0 idle 0
01-01 01:30:36.281 1690-3040 Line: 1370, Func: hci_rx_event_handler, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 hci_rx_fsm_event_process state 2
01-01 01:30:36.281 1690-3040 [Write] 0xC0
01-01 01:30:36.281 1690-3040 hci_slip_event_handler event type 1
01-01 01:30:36.281 1690-3040 Line: 1349, Func: hci_rx_event_handler, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 1353, Func: hci_rx_event_handler, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 hci_rx_event_handler exec 0 idle 0
01-01 01:30:36.281 1690-3040 Line: 1370, Func: hci_rx_event_handler, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 hci_rx_fsm_event_process state 3
01-01 01:30:36.281 1690-3040 Line: 1129, Func: hci_rx_fsm_event_process, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 677, Func: packet_received_callback, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 649, Func: ser_phy_event_callback, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 ser_phy_event_callback event 2
01-01 01:30:36.281 1690-3040 phy_events_handler event 2
01-01 01:30:36.281 1690-3040 ser_sd_transport_hal_handler event 2
01-01 01:30:36.281 1690-3040 ser_sd_transport_rx_packet_handler packet type 1
01-01 01:30:36.281 1690-3040 ser_sd_transport_rx_packet_handler RESP return value 0
01-01 01:30:36.281 1690-3040 Line: 1485, Func: ser_phy_interrupts_enable, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 1491, Func: ser_phy_interrupts_enable, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 1502, Func: ser_phy_interrupts_enable, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 146, Func: app_mailbox_get_length, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/application/transport/app_mailbox.c
01-01 01:30:36.281 1690-3040 Line: 1302, Func: hci_rx_reschedule, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 1310, Func: hci_rx_reschedule, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 146, Func: app_mailbox_get_length, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/application/transport/app_mailbox.c
01-01 01:30:36.281 1690-3040 hci_rx_reschedule idle 0 enable 1 len 0
01-01 01:30:36.281 1690-3040 hci_rx_reschedule exec 0 idle 0
01-01 01:30:36.281 1690-3040 Line: 1331, Func: hci_rx_reschedule, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 1509, Func: ser_phy_interrupts_enable, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3040 Line: 96, Func: ser_sd_transport_rx_packet_handler, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/application/transport/ser_sd_transport.c
01-01 01:30:36.281 1690-3040 [Write] 0x00 0x00 0x00 0x00 0xC0
01-01 01:30:36.281 1690-3010 Line: 649, Func: ser_phy_event_callback, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3010 ser_phy_event_callback event 0
01-01 01:30:36.281 1690-3010 phy_events_handler event 0
01-01 01:30:36.281 1690-3010 ser_sd_transport_hal_handler event 0
01-01 01:30:36.281 1690-3010 Line: 1302, Func: hci_rx_reschedule, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3010 Line: 1310, Func: hci_rx_reschedule, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3010 Line: 146, Func: app_mailbox_get_length, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/application/transport/app_mailbox.c
01-01 01:30:36.281 1690-3010 hci_rx_reschedule idle 1 enable 1 len 0
01-01 01:30:36.281 1690-3010 hci_rx_reschedule exec 0 idle 1
01-01 01:30:36.281 1690-3010 Line: 1331, Func: hci_rx_reschedule, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.281 1690-3010 Line: 1509, Func: ser_phy_interrupts_enable, File:/home/cellnovo/aladdin-android/hardware/nordic/pc-ble-driver/nRF51_SDK_8.1.0_b6ed55f/components/serialization/common/transport/ser_phy/ser_phy_hci.c
01-01 01:30:36.398 1690-3040 [Read] 0xC0 0xC8 0x6E 0x00 0xCA 0x02 0x1A 0x00 0x00 0x00 0xB9 0x13 0xCC 0xC0
01-01 01:30:36.570 1690-3040 [Read] 0xC0 0xC8 0x6E 0x00 0xCA 0x02 0x1A 0x00 0x00 0x00 0xB9 0x13 0xCC 0xC0
01-01 01:30:36.742 1690-3040 [Read] 0xC0 0xC8 0x6E 0x00 0xCA 0x02 0x1A 0x00 0x00 0x00 0xB9 0x13 0xCC 0xC0
01-01 01:30:36.914 1690-3040 [Read] 0xC0 0xC8 0x6E 0x00 0xCA 0x02 0x1A 0x00 0x00 0x00 0xB9 0x13 0xCC 0xC0
01-01 01:30:37.085 1690-3040 [Read] 0xC0 0xC8 0x6E 0x00 0xCA 0x02 0x1A 0x00 0x00 0x00 0xB9 0x13 0xCC 0xC0
01-01 01:30:37.289 1690-3010 
                                                                          [SD_CALL_ID]: 0x97, err_code= 0x0
Related