Skip to content

Conversation

@sjanc
Copy link
Contributor

@sjanc sjanc commented Nov 6, 2025

PA sync can be terminated before BIG sync is stopped. This results in ps_sync being NULL and thus crash in stop callback. Simply store address needed by BTP events and don't rely on pa_sync.

fixes #99045

PA sync can be terminated before BIG sync is stopped. This results
in ps_sync being NULL and thus crash in stop callback. Simply store
address needed by BTP events and don't rely on pa_sync.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
@sjanc
Copy link
Contributor Author

sjanc commented Nov 6, 2025

==73468==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000 (pc 0xf75dff96 bp 0xf27ff0c8 sp 0xf27ff0a8 T7)
==73468==The signal is caused by a READ memory access.
==73468==Hint: address points to the zero page.
    #0 0xf75dff96 in memcpy ../sysdeps/i386/i686/memcpy.S:71
    #1 0x0804e0f1 in iso_sync_receiver_big_stopped_cb zephyr/zephyr/tests/bluetooth/tester/src/btp_gap.c:2542
    #2 0x080cfef9 in big_disconnect zephyr/zephyr/subsys/bluetooth/host/iso.c:2734
    #3 0x0807d5dc in hci_event zephyr/zephyr/subsys/bluetooth/host/hci_core.c:3174
    #4 0x0807d5dc in rx_work_handler zephyr/zephyr/subsys/bluetooth/host/hci_core.c:4528
    #5 0x080ea118 in work_queue_main zephyr/zephyr/kernel/work.c:737
    #6 0x08065e5c in z_thread_entry zephyr/zephyr/lib/os/thread_entry.c:48
    #7 0x080779fb in posix_arch_thread_entry zephyr/zephyr/arch/posix/core/thread.c:96
    #8 0x080f5a9a in nct_thread_starter zephyr/zephyr/scripts/native_simulator//common/src/nct.c:291
    #9 0xf785b8fd in asan_thread_start(void*) (/lib/libasan.so.8+0x248fd) (BuildId: 05fd1dd2e1b8ee070f2edf186addec05ce469278)

@zephyrbot zephyrbot added area: Bluetooth area: Bluetooth Qualification Bluetooth Qualification -related issues and pull requests area: Tests Issues related to a particular existing or missing test labels Nov 6, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@jhedberg
Copy link
Member

jhedberg commented Nov 6, 2025

Linked bug report, please, so we can still get this in

@jhedberg jhedberg added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Nov 6, 2025
@Thalley
Copy link
Contributor

Thalley commented Nov 6, 2025

Linked bug report, please, so we can still get this in

It doesn't really fix a bug per se IMO; it simply changes the error from a segmentation fault (NULL pointer access) to an assert. The issue of why the pointer is NULL is still there

@sjanc
Copy link
Contributor Author

sjanc commented Nov 7, 2025

Linked bug report, please, so we can still get this in

It doesn't really fix a bug per se IMO; it simply changes the error from a segmentation fault (NULL pointer access) to an assert. The issue of why the pointer is NULL is still there

I think you confused PRs :-) #99020

This one fix crash in tester :)

@jhedberg
Copy link
Member

jhedberg commented Nov 7, 2025

This one fix crash in tester :)

Still needs a bug report, though :)

@sjanc
Copy link
Contributor Author

sjanc commented Nov 7, 2025

#99045

@Thalley
Copy link
Contributor

Thalley commented Nov 7, 2025

I think you confused PRs :-) #99020

Indeed I did :D

@jhedberg jhedberg added this to the v4.3.0 milestone Nov 7, 2025
@cfriedt cfriedt merged commit 184f053 into zephyrproject-rtos:main Nov 7, 2025
33 checks passed
@sjanc sjanc deleted the tester_pa_big_sync branch November 7, 2025 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Bluetooth Qualification Bluetooth Qualification -related issues and pull requests area: Bluetooth area: Tests Issues related to a particular existing or missing test Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash in bluetooth tester when executing BAP/BSRC/SCC/BV-21-C qualification test

5 participants