Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Darwin] Fix MTRDeviceConnectivityMonitor DNSServiceRefDeallocate call on the correct queue #33410

Conversation

jtung-apple
Copy link
Contributor

This is a race caused by not calling DNSServiceRefDeallocate on the right queue, which means if there's a resolve callback happening at the same time the monitor object calls that and goes away, then this crash can happen with the void pointer left holding dealloc'ed memory.

The fix here is to async the method that calls DNSServiceRefDeallocate onto the right queue.

Copy link

github-actions bot commented May 12, 2024

PR #33410: Size comparison from f075b9b to 45f2993

Decreases (2 builds for efr32)
platform target config section f075b9b 45f2993 change % change
efr32 lighting-app BRD4187C (read/write) 1072444 1072436 -8 -0.0
.text 888976 888968 -8 -0.0
lock-app BRD4338a (read/write) 963260 963252 -8 -0.0
.text 701352 701344 -8 -0.0
Full report (81 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink)
platform target config section f075b9b 45f2993 change % change
bl602 lighting-app bl602 (read/write) 1444882 1444882 0 0.0
.bss 85776 85776 0 0.0
.data 9512 9512 0 0.0
.rodata 159452 159452 0 0.0
.text 1109478 1109478 0 0.0
bl602+mfd (read/write) 1459306 1459306 0 0.0
.bss 85952 85952 0 0.0
.data 9488 9488 0 0.0
.rodata 158412 158412 0 0.0
.text 1124796 1124796 0 0.0
bl602+rpc (read/write) 1492530 1492530 0 0.0
.bss 93824 93824 0 0.0
.data 9888 9888 0 0.0
.rodata 167020 167020 0 0.0
.text 1141124 1141124 0 0.0
bl702 lighting-app bl702 (read only) 3478 3478 0 0.0
(read/write) 1210531 1210531 0 0.0
.bss 11185 11185 0 0.0
.data 3712 3712 0 0.0
.rodata 108972 108972 0 0.0
.text 979650 979650 0 0.0
bl702+mfd (read only) 3478 3478 0 0.0
(read/write) 1221343 1221343 0 0.0
.bss 11361 11361 0 0.0
.data 3688 3688 0 0.0
.rodata 107912 107912 0 0.0
.text 991404 991404 0 0.0
bl702+rpc (read only) 3478 3478 0 0.0
(read/write) 1301995 1301995 0 0.0
.bss 19669 19669 0 0.0
.data 4248 4248 0 0.0
.rodata 124344 124344 0 0.0
.text 1054358 1054358 0 0.0
bl706-eth (read/write) 1026617 1026617 0 0.0
.bss 23760 23760 0 0.0
.data 3256 3256 0 0.0
.rodata 102056 102056 0 0.0
.text 769192 769192 0 0.0
bl706-wifi (read/write) 1262526 1262526 0 0.0
.bss 10645 10645 0 0.0
.data 3704 3704 0 0.0
.rodata 123136 123136 0 0.0
.text 1002236 1002236 0 0.0
bl702l lighting-app bl702l (read/write) 1180360 1180360 0 0.0
.bss 16396 16396 0 0.0
.data 5072 5072 0 0.0
.rodata 102976 102976 0 0.0
.text 972508 972508 0 0.0
bl702l+mfd (read/write) 1191768 1191768 0 0.0
.bss 16572 16572 0 0.0
.data 5056 5056 0 0.0
.rodata 101916 101916 0 0.0
.text 984830 984830 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 (read only) 799020 799020 0 0.0
(read/write) 177644 177644 0 0.0
.bss 99572 99572 0 0.0
.data 3596 3596 0 0.0
.rodata 85228 85228 0 0.0
.text 713528 713528 0 0.0
lock-ftd LP_EM_CC1354P10_6 (read only) 814264 814264 0 0.0
(read/write) 188116 188116 0 0.0
.bss 110060 110060 0 0.0
.data 3588 3588 0 0.0
.rodata 78800 78800 0 0.0
.text 735200 735200 0 0.0
lock-mtd LP_EM_CC1354P10_6 (read only) 803596 803596 0 0.0
(read/write) 182236 182236 0 0.0
.bss 104180 104180 0 0.0
.data 3588 3588 0 0.0
.rodata 106132 106132 0 0.0
.text 697200 697200 0 0.0
pump-app LP_EM_CC1354P10_6 (read only) 755844 755844 0 0.0
(read/write) 176596 176596 0 0.0
.bss 98304 98304 0 0.0
.data 3580 3580 0 0.0
.rodata 80884 80884 0 0.0
.text 674696 674696 0 0.0
pump-controller-app LP_EM_CC1354P10_6 (read only) 741572 741572 0 0.0
(read/write) 176828 176828 0 0.0
.bss 98536 98536 0 0.0
.data 3580 3580 0 0.0
.rodata 76668 76668 0 0.0
.text 664640 664640 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL (read only) 606262 606262 0 0.0
(read/write) 209588 209588 0 0.0
.bss 202812 202812 0 0.0
.data 1652 1652 0 0.0
.rodata 89742 89742 0 0.0
.text 514396 514396 0 0.0
lock CC3235SF_LAUNCHXL (read only) 652150 652150 0 0.0
(read/write) 209844 209844 0 0.0
.bss 203208 203208 0 0.0
.data 1516 1516 0 0.0
.rodata 110502 110502 0 0.0
.text 539528 539528 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 (read/write) 742707 742707 0 0.0
.app_xip_area 660949 660949 0 0.0
.bss 75364 75364 0 0.0
.data 932 932 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-02 (read/write) 758351 758351 0 0.0
.app_xip_area 673393 673393 0 0.0
.bss 77220 77220 0 0.0
.data 2276 2276 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-03 (read/write) 758351 758351 0 0.0
.app_xip_area 673393 673393 0 0.0
.bss 77220 77220 0 0.0
.data 2276 2276 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW930739M2EVB-02 (read/write) 714563 714563 0 0.0
.app_xip_area 637737 637737 0 0.0
.bss 70488 70488 0 0.0
.data 876 876 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
light-switch CYW30739B2-P5-EVK-01 (read/write) 680235 680235 0 0.0
.app_xip_area 602765 602765 0 0.0
.bss 70956 70956 0 0.0
.data 1052 1052 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-02 (read/write) 695559 695559 0 0.0
.app_xip_area 614977 614977 0 0.0
.bss 72812 72812 0 0.0
.data 2308 2308 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-03 (read/write) 695559 695559 0 0.0
.app_xip_area 614977 614977 0 0.0
.bss 72812 72812 0 0.0
.data 2308 2308 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
lock CYW30739B2-P5-EVK-01 (read/write) 698771 698771 0 0.0
.app_xip_area 618285 618285 0 0.0
.bss 74004 74004 0 0.0
.data 1020 1020 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-02 (read/write) 714183 714183 0 0.0
.app_xip_area 630585 630585 0 0.0
.bss 75860 75860 0 0.0
.data 2276 2276 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-03 (read/write) 714183 714183 0 0.0
.app_xip_area 630585 630585 0 0.0
.bss 75860 75860 0 0.0
.data 2276 2276 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
thermostat CYW30739B2-P5-EVK-01 (read/write) 661299 661299 0 0.0
.app_xip_area 586845 586845 0 0.0
.bss 68164 68164 0 0.0
.data 828 828 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-02 (read/write) 676943 676943 0 0.0
.app_xip_area 599281 599281 0 0.0
.bss 70028 70028 0 0.0
.data 2172 2172 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-03 (read/write) 676943 676943 0 0.0
.app_xip_area 599281 599281 0 0.0
.bss 70028 70028 0 0.0
.data 2172 2172 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
efr32 lighting-app BRD4187C (read/write) 1072444 1072436 -8 -0.0
.bss 180008 180008 0 0.0
.data 3440 3440 0 0.0
.text 888976 888968 -8 -0.0
lock-app BRD4338a (read/write) 963260 963252 -8 -0.0
.bss 213092 213092 0 0.0
.data 29448 29448 0 0.0
.text 701352 701344 -8 -0.0
window-app BRD4187C (read/write) 1136352 1136352 0 0.0
.bss 164560 164560 0 0.0
.data 3344 3344 0 0.0
.text 968428 968428 0 0.0
esp32 all-clusters-app c3devkit (read only) 1215634 1215634 0 0.0
(read/write) 1751576 1751576 0 0.0
.dram0.bss 74624 74624 0 0.0
.dram0.data 13652 13652 0 0.0
.flash.rodata 253768 253768 0 0.0
.flash.text 1215634 1215634 0 0.0
.iram0.text 75570 75570 0 0.0
m5stack (read only) 1257275 1257275 0 0.0
(read/write) 538172 538172 0 0.0
.dram0.bss 81384 81384 0 0.0
.dram0.data 35196 35196 0 0.0
.flash.rodata 285672 285672 0 0.0
.flash.text 1251111 1251111 0 0.0
.iram0.text 125403 125403 0 0.0
linux air-purifier-app debug (read only) 2717693 2717693 0 0.0
(read/write) 132496 132496 0 0.0
.bss 47752 47752 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 76456 76456 0 0.0
.dynamic 608 608 0 0.0
.got 4576 4576 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 187312 187312 0 0.0
.text 2347397 2347397 0 0.0
all-clusters-app debug (read only) 6030457 6030457 0 0.0
(read/write) 484008 484008 0 0.0
.bss 136032 136032 0 0.0
.data 4560 4560 0 0.0
.data.rel.ro 335976 335976 0 0.0
.dynamic 624 624 0 0.0
.got 5344 5344 0 0.0
.init 27 27 0 0.0
.init_array 1440 1440 0 0.0
.rodata 354160 354160 0 0.0
.text 5237603 5237603 0 0.0
all-clusters-minimal-app debug (read only) 5313817 5313817 0 0.0
(read/write) 239960 239960 0 0.0
.bss 128896 128896 0 0.0
.data 4464 4464 0 0.0
.data.rel.ro 99512 99512 0 0.0
.dynamic 624 624 0 0.0
.got 5264 5264 0 0.0
.init 27 27 0 0.0
.init_array 1168 1168 0 0.0
.rodata 292938 292938 0 0.0
.text 4780995 4780995 0 0.0
bridge-app debug (read only) 4704361 4704361 0 0.0
(read/write) 220872 220872 0 0.0
.bss 119424 119424 0 0.0
.data 6240 6240 0 0.0
.data.rel.ro 88480 88480 0 0.0
.dynamic 624 624 0 0.0
.got 5232 5232 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 233322 233322 0 0.0
.text 4245571 4245571 0 0.0
chip-tool debug (read only) 12153425 12153425 0 0.0
(read/write) 524288 524288 0 0.0
.bss 95000 95000 0 0.0
.data 5122 5122 0 0.0
.data.rel.ro 416928 416928 0 0.0
.dynamic 624 624 0 0.0
.got 5736 5736 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 454297 454297 0 0.0
.text 10988419 10988419 0 0.0
chip-tool-ipv6only arm64 (read only) 11480364 11480364 0 0.0
(read/write) 588992 588992 0 0.0
.bss 104008 104008 0 0.0
.data 4520 4520 0 0.0
.data.rel.ro 457024 457024 0 0.0
.dynamic 512 512 0 0.0
.got 17240 17240 0 0.0
.init 24 24 0 0.0
.init_array 280 280 0 0.0
.rodata 358396 358396 0 0.0
.text 10237256 10237256 0 0.0
fabric-bridge-app debug (read only) 4570649 4570649 0 0.0
(read/write) 212880 212880 0 0.0
.bss 114976 114976 0 0.0
.data 5056 5056 0 0.0
.data.rel.ro 86160 86160 0 0.0
.dynamic 624 624 0 0.0
.got 5232 5232 0 0.0
.init 27 27 0 0.0
.init_array 808 808 0 0.0
.rodata 226762 226762 0 0.0
.text 4120915 4120915 0 0.0
lighting-app debug+rpc+ui (read only) 5627889 5627889 0 0.0
(read/write) 229704 229704 0 0.0
.bss 120368 120368 0 0.0
.data 4896 4896 0 0.0
.data.rel.ro 96912 96912 0 0.0
.dynamic 672 672 0 0.0
.got 5864 5864 0 0.0
.init 27 27 0 0.0
.init_array 976 976 0 0.0
.rodata 357108 357108 0 0.0
.text 5018883 5018883 0 0.0
lock-app debug (read only) 4771401 4771401 0 0.0
(read/write) 208032 208032 0 0.0
.bss 114664 114664 0 0.0
.data 4192 4192 0 0.0
.data.rel.ro 82472 82472 0 0.0
.dynamic 624 624 0 0.0
.got 5184 5184 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 259242 259242 0 0.0
.text 4295763 4295763 0 0.0
ota-provider-app debug (read only) 4378105 4378105 0 0.0
(read/write) 196600 196600 0 0.0
.bss 114528 114528 0 0.0
.data 4368 4368 0 0.0
.data.rel.ro 71728 71728 0 0.0
.dynamic 624 624 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 752 752 0 0.0
.rodata 211594 211594 0 0.0
.text 3968771 3968771 0 0.0
ota-requestor-app debug (read only) 4508809 4508809 0 0.0
(read/write) 200968 200968 0 0.0
.bss 115424 115424 0 0.0
.data 4768 4768 0 0.0
.data.rel.ro 74848 74848 0 0.0
.dynamic 624 624 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 217674 217674 0 0.0
.text 4088851 4088851 0 0.0
shell debug (read only) 3001625 3001625 0 0.0
(read/write) 159440 159440 0 0.0
.bss 63504 63504 0 0.0
.data 1424 1424 0 0.0
.data.rel.ro 88672 88672 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 1112 1112 0 0.0
.rodata 191040 191040 0 0.0
.text 2631554 2631554 0 0.0
thermostat-no-ble arm64 (read only) 4496108 4496108 0 0.0
(read/write) 245880 245880 0 0.0
.bss 123000 123000 0 0.0
.data 3408 3408 0 0.0
.data.rel.ro 105920 105920 0 0.0
.dynamic 512 512 0 0.0
.got 8968 8968 0 0.0
.init 24 24 0 0.0
.init_array 448 448 0 0.0
.rodata 162100 162100 0 0.0
.text 3992760 3992760 0 0.0
tv-app debug (read only) 5831809 5831809 0 0.0
(read/write) 355288 355288 0 0.0
.bss 245136 245136 0 0.0
.data 6560 6560 0 0.0
.data.rel.ro 96312 96312 0 0.0
.dynamic 624 624 0 0.0
.got 5464 5464 0 0.0
.init 27 27 0 0.0
.init_array 1184 1184 0 0.0
.rodata 297866 297866 0 0.0
.text 5287667 5287667 0 0.0
tv-casting-app debug (read only) 9989073 9989073 0 0.0
(read/write) 345768 345768 0 0.0
.bss 159512 159512 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 176272 176272 0 0.0
.dynamic 624 624 0 0.0
.got 5096 5096 0 0.0
.init 27 27 0 0.0
.init_array 1224 1224 0 0.0
.rodata 388088 388088 0 0.0
.text 9129971 9129971 0 0.0
mbed lock-app-release cy8cproto_062_4343w (read only) 6224 6224 0 0.0
(read/write) 2537896 2537896 0 0.0
.bss 220808 220808 0 0.0
.data 5216 5216 0 0.0
.text 1500580 1500580 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1061636 1061636 0 0.0
bss 139161 139161 0 0.0
rodata 101868 101868 0 0.0
text 773284 773284 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1238952 1238952 0 0.0
bss 137517 137517 0 0.0
rodata 151408 151408 0 0.0
text 799992 799992 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1009276 1009276 0 0.0
bss 138059 138059 0 0.0
rodata 89124 89124 0 0.0
text 734832 734832 0 0.0
nxp contact k32w0+release (read only) 576684 576684 0 0.0
(read/write) 83172 83172 0 0.0
.bss 67888 67888 0 0.0
.data 2196 2196 0 0.0
.text 576148 576148 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 704556 704556 0 0.0
.bss 71240 71240 0 0.0
.data 2864 2864 0 0.0
.text 591072 591072 0 0.0
light k32w0+release (read only) 610952 610952 0 0.0
(read/write) 82640 82640 0 0.0
.bss 67336 67336 0 0.0
.data 2216 2216 0 0.0
.text 610416 610416 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 796520 796520 0 0.0
.bss 80776 80776 0 0.0
.data 2072 2072 0 0.0
.text 674304 674304 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 826256 826256 0 0.0
(read/write) 1828060 1828060 0 0.0
.bss 204340 204340 0 0.0
.data 2744 2744 0 0.0
.text 1612588 1612588 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 829352 829352 0 0.0
(read/write) 1749356 1749356 0 0.0
.bss 201268 201268 0 0.0
.data 2720 2720 0 0.0
.text 1536980 1536980 0 0.0
light cy8ckit_062s2_43012 (read only) 836072 836072 0 0.0
(read/write) 1667820 1667820 0 0.0
.bss 194732 194732 0 0.0
.data 2536 2536 0 0.0
.text 1462164 1462164 0 0.0
lock cy8ckit_062s2_43012 (read only) 809008 809008 0 0.0
(read/write) 1696468 1696468 0 0.0
.bss 221812 221812 0 0.0
.data 2520 2520 0 0.0
.text 1463748 1463748 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1134604 1134604 0 0.0
.bss 102636 102636 0 0.0
.data 856 856 0 0.0
.text 646984 646984 0 0.0
lock-app qpg6105+debug (read/write) 1094388 1094388 0 0.0
.bss 97308 97308 0 0.0
.data 868 868 0 0.0
.text 606772 606772 0 0.0
stm32 light STM32WB5MM-DK (read/write) 606289 606289 0 0.0
.bss 128500 128500 0 0.0
.data 688 688 0 0.0
.rodata 80700 80700 0 0.0
.text 386656 386656 0 0.0
telink air-quality-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 834610 834610 0 0.0
bss 49884 49884 0 0.0
text 625100 625100 0 0.0
all-clusters-app tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 1097000 1097000 0 0.0
bss 101552 101552 0 0.0
text 797818 797818 0 0.0
all-clusters-minimal-app tlsr9528a (read only) 47960 47960 0 0.0
(read/write) 1059492 1059492 0 0.0
bss 110048 110048 0 0.0
text 773158 773158 0 0.0
bridge-app tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 915132 915132 0 0.0
bss 92804 92804 0 0.0
text 656752 656752 0 0.0
contact-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 836970 836970 0 0.0
bss 49928 49928 0 0.0
text 627520 627520 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a (read only) 51584 51584 0 0.0
(read/write) 937968 937968 0 0.0
bss 77540 77540 0 0.0
text 704166 704166 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d (read only) 29122 29122 0 0.0
(read/write) 1091332 1091332 0 0.0
bss 99876 99876 0 0.0
text 794626 794626 0 0.0
lock-app-dfu tlsr9528a (read only) 51584 51584 0 0.0
(read/write) 912088 912088 0 0.0
bss 69208 69208 0 0.0
text 660926 660926 0 0.0
ota-requestor-app tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 933936 933936 0 0.0
bss 92516 92516 0 0.0
text 675738 675738 0 0.0
pump-app tlsr9258a (read only) 52568 52568 0 0.0
(read/write) 831568 831568 0 0.0
bss 58172 58172 0 0.0
text 621564 621564 0 0.0
pump-controller-app tlsr9518adk80d (read only) 31872 31872 0 0.0
(read/write) 800664 800664 0 0.0
bss 56108 56108 0 0.0
text 599436 599436 0 0.0
shell tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 676416 676416 0 0.0
bss 73388 73388 0 0.0
text 461828 461828 0 0.0
smoke_co_alarm-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 844830 844830 0 0.0
bss 51556 51556 0 0.0
text 634188 634188 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d (read only) 32220 32220 0 0.0
(read/write) 859489 859489 0 0.0
bss 59724 59724 0 0.0
text 642976 642976 0 0.0
thermostat tlsr9518adk80d (read only) 31872 31872 0 0.0
(read/write) 826220 826220 0 0.0
bss 56432 56432 0 0.0
text 618998 618998 0 0.0
window-covering tlsr9258a (read only) 52568 52568 0 0.0
(read/write) 836256 836256 0 0.0
bss 58388 58388 0 0.0
text 623832 623832 0 0.0

@mergify mergify bot merged commit 70d9a61 into project-chip:master May 13, 2024
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants