Skip to content

Conversation

@RobertGalatNordic
Copy link
Contributor

No description provided.

…oved

fixed memory leak on multiple bt init/disable calls.

Signed-off-by: Robert Gałat <robert.galat@nordicsemi.no>
@RobertGalatNordic RobertGalatNordic requested review from a team as code owners November 28, 2025 12:48
@NordicBuilder NordicBuilder added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 28, 2025
@NordicBuilder NordicBuilder requested a review from a team November 28, 2025 12:48
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Nov 28, 2025

CI Information

To view the history of this post, click the 'edited' button above
Build number: 7

Inputs:

Sources:

sdk-nrf: PR head: 0cd7729dafed8671839af522bf77c9d1ca978371

more details

sdk-nrf:

PR head: 0cd7729dafed8671839af522bf77c9d1ca978371
merge base: 9fb34cc3d3cf8afc6d63ce47a09397101858e5e5
target head (main): 2f953501a364ec71d3b1ef6e6fae418d8f3269f7
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (9)
subsys
│  ├── bluetooth
│  │  ├── rpc
│  │  │  ├── common
│  │  │  │  │ bt_rpc_gatt_common.c
│  │  │  ├── host
│  │  │  │  │ bt_rpc_gatt_host.c
tests
│  ├── subsys
│  │  ├── bluetooth
│  │  │  ├── rpc_gatt_service
│  │  │  │  ├── CMakeLists.txt
│  │  │  │  ├── prj.conf
│  │  │  │  ├── src
│  │  │  │  │  ├── log_stub.c
│  │  │  │  │  ├── main.c
│  │  │  │  │  ├── nrf_rpc_cbor.h
│  │  │  │  │  │ test_config.h
│  │  │  │  │ testcase.yaml

Outputs:

Toolchain

Version: 43683a87ea
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:43683a87ea_5ea73affbf

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 909
  • ❌ Integration tests
    • ❌ test-fw-nrfconnect-ble_samples
    • ✅ test-sdk-find-my
    • ✅ test-fw-nrfconnect-ps-main
    • ⚠️ test_ble_nrf_config
Disabled integration tests
    • test-fw-nrfconnect-nrf_lrcs_positioning
    • desktop52_verification
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread-main
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-mcuboot
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@RobertGalatNordic RobertGalatNordic force-pushed the fix_bt_rpc_gatt_deinit branch 3 times, most recently from 7ab29c1 to 81962e6 Compare November 28, 2025 13:29

FILE(GLOB app_sources src/*.c)

# Remove log_stub.c from glob since we include it explicitly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we exclude it to include it later? What's the goal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this does not make sense, removed it.

# Remove log_stub.c from glob since we include it explicitly
list(FILTER app_sources EXCLUDE REGEX ".*log_stub\\.c$")

# Add src directory for test_config.h
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's included by an absolute path anyway, so this is not really needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment was misleeding, but I still need to include the /src dir.


# Minimal BT configuration - just enough to use the real gatt.h header
# We don't need full BT stack functionality, just the type definitions
CONFIG_BT=y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gatt.h is in the public include directory, so you don't really need CONFIG_BT to be able to include <zephyr/bluetooth/gatt.h> do you?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is true, removed unnecessary config

#include <stddef.h>
#include <stdint.h>

/* Include the header - it will use our stub zephyr/bluetooth/gatt.h */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no stub gatt.h, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in deed there is none. it seems like the comment is a leftover from previous iteration of the test implementation. removed it.

/* Forward declaration - full definition not needed for unit testing */
struct nrf_rpc_cbor_ctx;

/* Typedef for compatibility */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original nRF RPC doesn't use typedef so there's no point in adding it in stub either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is true, removed it.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Nov 28, 2025

Memory footprint analysis revealed the following potential issues

applications.nrf_desktop.zdebug_nrf21540ek_multicore[nrf5340dk/nrf5340/cpuapp]: ROM size increased by 784[B] in comparison to the main[29bfe34] branch. - link (cc: @nrfconnect/ncs-si-bluebagel)
applications.nrf_desktop.zdebug[nrf5340dk/nrf5340/cpuapp]: ROM size increased by 776[B] in comparison to the main[29bfe34] branch. - link (cc: @nrfconnect/ncs-si-bluebagel)
applications.nrf_desktop.zdebug[nrf52820dongle/nrf52820]: ROM size increased by 660[B] in comparison to the main[29bfe34] branch. - link (cc: @nrfconnect/ncs-si-bluebagel)
applications.nrf_desktop.zdebug[nrf52840gmouse/nrf52840]: ROM size increased by 968[B] in comparison to the main[29bfe34] branch. - link (cc: @nrfconnect/ncs-si-bluebagel)
applications.nrf_desktop.zdebug_fast_pair.gmouse[nrf52840gmouse/nrf52840]: ROM size increased by 988[B] in comparison to the main[29bfe34] branch. - link (cc: @nrfconnect/ncs-si-bluebagel)
applications.nrf_desktop.zdebug[nrf52kbd/nrf52832]: ROM size increased by 552[B] in comparison to the main[29bfe34] branch. - link (cc: @nrfconnect/ncs-si-bluebagel)
applications.nrf_desktop.zdebug.usb_next[nrf52840gmouse/nrf52840]: ROM size increased by 968[B] in comparison to the main[29bfe34] branch. - link (cc: @nrfconnect/ncs-si-bluebagel)
applications.nrf_desktop.zdebug[nrf52833dk/nrf52820]: ROM size increased by 1000[B] in comparison to the main[29bfe34] branch. - link (cc: @nrfconnect/ncs-si-bluebagel)
applications.nrf_desktop.zdebug[nrf52dmouse/nrf52832]: ROM size increased by 516[B] in comparison to the main[29bfe34] branch. - link (cc: @nrfconnect/ncs-si-bluebagel)

Note: This message is automatically posted and updated by the CI (latest/sdk-nrf/PR-25879/7)

@RobertGalatNordic RobertGalatNordic force-pushed the fix_bt_rpc_gatt_deinit branch 2 times, most recently from a453ff8 to 0cd7729 Compare November 28, 2025 14:32
check if gatt services are correctly clean after remove

Signed-off-by: Robert Gałat <robert.galat@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants