payload: {"action":"created","issue":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/21586","repository_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr","labels_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/21586/labels{/name}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/21586/comments","events_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/21586/events","html_url":"https://github.com/zephyrproject-rtos/zephyr/issues/21586","id":542172720,"node_id":"MDU6SXNzdWU1NDIxNzI3MjA=","number":21586,"title":"Bluetooth Mesh fail to transmit messages after some time on nRF52840","user":{"login":"aurel32","id":7688913,"node_id":"MDQ6VXNlcjc2ODg5MTM=","avatar_url":"https://avatars0.githubusercontent.com/u/7688913?v=4","gravatar_id":"","url":"https://api.github.com/users/aurel32","html_url":"https://github.com/aurel32","followers_url":"https://api.github.com/users/aurel32/followers","following_url":"https://api.github.com/users/aurel32/following{/other_user}","gists_url":"https://api.github.com/users/aurel32/gists{/gist_id}","starred_url":"https://api.github.com/users/aurel32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aurel32/subscriptions","organizations_url":"https://api.github.com/users/aurel32/orgs","repos_url":"https://api.github.com/users/aurel32/repos","events_url":"https://api.github.com/users/aurel32/events{/privacy}","received_events_url":"https://api.github.com/users/aurel32/received_events","type":"User","site_admin":false},"labels":[{"id":700751342,"node_id":"MDU6TGFiZWw3MDA3NTEzNDI=","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/area:%20Bluetooth","name":"area: Bluetooth","color":"ededed","default":false,"description":null},{"id":1502142802,"node_id":"MDU6TGFiZWwxNTAyMTQyODAy","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/area:%20Bluetooth%20Mesh","name":"area: Bluetooth Mesh","color":"c2b2f4","default":false,"description":""},{"id":383053976,"node_id":"MDU6TGFiZWwzODMwNTM5NzY=","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/bug","name":"bug","color":"e99695","default":true,"description":"The issue is a bug, or the PR is fixing a bug"},{"id":636351494,"node_id":"MDU6TGFiZWw2MzYzNTE0OTQ=","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/priority:%20medium","name":"priority: medium","color":"d93f0b","default":false,"description":"Medium impact/importance bug"}],"state":"open","locked":false,"assignee":{"login":"cvinayak","id":6350656,"node_id":"MDQ6VXNlcjYzNTA2NTY=","avatar_url":"https://avatars1.githubusercontent.com/u/6350656?v=4","gravatar_id":"","url":"https://api.github.com/users/cvinayak","html_url":"https://github.com/cvinayak","followers_url":"https://api.github.com/users/cvinayak/followers","following_url":"https://api.github.com/users/cvinayak/following{/other_user}","gists_url":"https://api.github.com/users/cvinayak/gists{/gist_id}","starred_url":"https://api.github.com/users/cvinayak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvinayak/subscriptions","organizations_url":"https://api.github.com/users/cvinayak/orgs","repos_url":"https://api.github.com/users/cvinayak/repos","events_url":"https://api.github.com/users/cvinayak/events{/privacy}","received_events_url":"https://api.github.com/users/cvinayak/received_events","type":"User","site_admin":false},"assignees":[{"login":"cvinayak","id":6350656,"node_id":"MDQ6VXNlcjYzNTA2NTY=","avatar_url":"https://avatars1.githubusercontent.com/u/6350656?v=4","gravatar_id":"","url":"https://api.github.com/users/cvinayak","html_url":"https://github.com/cvinayak","followers_url":"https://api.github.com/users/cvinayak/followers","following_url":"https://api.github.com/users/cvinayak/following{/other_user}","gists_url":"https://api.github.com/users/cvinayak/gists{/gist_id}","starred_url":"https://api.github.com/users/cvinayak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvinayak/subscriptions","organizations_url":"https://api.github.com/users/cvinayak/orgs","repos_url":"https://api.github.com/users/cvinayak/repos","events_url":"https://api.github.com/users/cvinayak/events{/privacy}","received_events_url":"https://api.github.com/users/cvinayak/received_events","type":"User","site_admin":false},{"login":"trond-snekvik","id":7857838,"node_id":"MDQ6VXNlcjc4NTc4Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/7857838?v=4","gravatar_id":"","url":"https://api.github.com/users/trond-snekvik","html_url":"https://github.com/trond-snekvik","followers_url":"https://api.github.com/users/trond-snekvik/followers","following_url":"https://api.github.com/users/trond-snekvik/following{/other_user}","gists_url":"https://api.github.com/users/trond-snekvik/gists{/gist_id}","starred_url":"https://api.github.com/users/trond-snekvik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trond-snekvik/subscriptions","organizations_url":"https://api.github.com/users/trond-snekvik/orgs","repos_url":"https://api.github.com/users/trond-snekvik/repos","events_url":"https://api.github.com/users/trond-snekvik/events{/privacy}","received_events_url":"https://api.github.com/users/trond-snekvik/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2019-12-24T16:36:20Z","updated_at":"2020-01-09T12:13:22Z","closed_at":null,"author_association":"COLLABORATOR","body":"**Describe the bug**\r\nI am running a small Bluetooth Mesh network, with some Zephyr nodes. After some time (usually days, but see below) some of the nodes fail to transmit data with the following error:\r\n`<err> bt_mesh_adv: Advertising failed: err -69`\r\n\r\nThis happens even if the node doesn't transmit data besides working as a relay and transmitting secure beacons. I have tried to diagnose the issue using help from slack. I have attached a log of the issue with a few additional logging messages (the issue starts at 01:07:33.047,668). The corresponding patch is attached.\r\n\r\nThe problem is that the call to `bt_le_adv_stop` fail to stop the advertising within the 10 second timeout. Once this happen the next call to `adv_send` will fail as the advertising is already enabled and sending data is never possible anymore.\r\n\r\n**To Reproduce**\r\nI am using a nRF52 PCA10059 board with serial console over USB. I have attached the `prj.conf` and `main.c` files, mostly inspired from existing samples. Relay is enabled with 1 retransmission with 2 interval steps (default). Secure beacons are enabled (default). Friend is compiled but disabled.\r\n\r\nI have the feeling the issue is related to the network environment as I can reproduce the problem with a very simple node with only the mandatory models. My network is composed of the following nodes in addition to the one I am using to debug the failure:\r\n- A Linux based node using the bluetooth-meshd daemon from Bluez. It is mostly receiving data, sending data sporadically. It is also configured as a friend, but relay is disabled.\r\n- A Ledvance Smart+ Classic E27 Multicolor light bulb, publishing 6 bytes every 10 seconds. Relay is enabled with 1 retransmission with 9 interval steps (default).\r\n- A Ledvance Smart+ Indoor Plug EU, publishing 3 bytes every 60 seconds + on change. Relay is enabled with 1 retransmission with 9 interval steps (default).\r\n- A nRF52 PCA10059 based Zephyr node publishing 9 bytes every second (vendor model) + \r\n5 bytes every 15 seconds (sensor model). Relay is enabled with 1 retransmission with 2 interval steps (default).\r\n- A nRF52 PCA10059 based Zephyr node publishing 5 bytes every 15 seconds (sensor model). Relay is enabled with 1 retransmission with 2 interval steps (default).\r\n\r\nWith this setup I used to encounter the problem appears between 3 to 9 days. Since I am debugging the issue, it happens more often and I can usually reproduce the problem between 1 to 5 hours. It might be due to the additional workload of logging debug messages.\r\n\r\n**Environment (please complete the following information):**\r\n - OS: Linux\r\n - Toolchain: Zephyr SDK 0.10.3\r\n - Commit SHA or Version used: zephyr-v2.1.0 aka b413223a66ed9e857c67ee21d1e8be4768804dd1\r\n- Board: NRF52840_pca10059\r\n\r\nAll the mentioned files are available in the following zip [zephyr-nrf52-btmesh-tx-fail.zip](https://github.com/zephyrproject-rtos/zephyr/files/3998730/zephyr-nrf52-btmesh-tx-fail.zip)"},"comment":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/comments/572535110","html_url":"https://github.com/zephyrproject-rtos/zephyr/issues/21586#issuecomment-572535110","issue_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/21586","id":572535110,"node_id":"MDEyOklzc3VlQ29tbWVudDU3MjUzNTExMA==","user":{"login":"carlescufi","id":12450381,"node_id":"MDQ6VXNlcjEyNDUwMzgx","avatar_url":"https://avatars3.githubusercontent.com/u/12450381?v=4","gravatar_id":"","url":"https://api.github.com/users/carlescufi","html_url":"https://github.com/carlescufi","followers_url":"https://api.github.com/users/carlescufi/followers","following_url":"https://api.github.com/users/carlescufi/following{/other_user}","gists_url":"https://api.github.com/users/carlescufi/gists{/gist_id}","starred_url":"https://api.github.com/users/carlescufi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlescufi/subscriptions","organizations_url":"https://api.github.com/users/carlescufi/orgs","repos_url":"https://api.github.com/users/carlescufi/repos","events_url":"https://api.github.com/users/carlescufi/events{/privacy}","received_events_url":"https://api.github.com/users/carlescufi/received_events","type":"User","site_admin":false},"created_at":"2020-01-09T12:13:22Z","updated_at":"2020-01-09T12:13:22Z","author_association":"MEMBER","body":"@cvinayak can you please investigate the root cause here. It seems from @joerchan 's investigation that the `mayfly_enqueue` call before the `k_sem_take` is not triggering a `k_sem_give`."}}
other: {"actor":{"display_login":"carlescufi"}}