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

[Build] Darwin build failed -[MTRErrorTests testErrorSourcePaths] #27425

Closed
woody-apple opened this issue Jun 23, 2023 · 1 comment · Fixed by #27426
Closed

[Build] Darwin build failed -[MTRErrorTests testErrorSourcePaths] #27425

woody-apple opened this issue Jun 23, 2023 · 1 comment · Fixed by #27426
Assignees
Labels

Comments

@woody-apple
Copy link
Contributor

Build issue(s)

https://github.com/project-chip/connectedhomeip/actions/runs/5351208311/jobs/9704754574

2023-06-23T00:41:33.2165110Z 2023-06-23 00:41:33.196862+0000 xctest[57173:352988] Write response: (
2023-06-23T00:41:33.2165390Z         {
2023-06-23T00:41:33.2165660Z         attributePath = "MTRAttributePath(100,200,300)";
2023-06-23T00:41:33.2165930Z     }
2023-06-23T00:41:33.2166130Z )
2023-06-23T00:41:33.2166590Z 2023-06-23 00:41:33.197448+0000 xctest[57173:353353] [Default] CHIP XPC connection disconnected
2023-06-23T00:41:33.2167110Z 2023-06-23 00:41:33.197977+0000 xctest[57173:352988] XPC connection disconnected
2023-06-23T00:41:33.2167660Z Test Case '-[MTRXPCProtocolTests testWriteAttributeSuccess]' passed (0.008 seconds).
2023-06-23T00:41:33.2168260Z Test Case '-[MTRXPCProtocolTests testXPCConnectionFailure]' started.
2023-06-23T00:41:33.2168840Z 2023-06-23 00:41:33.201725+0000 xctest[57173:352988] Device acquired. Reading...
2023-06-23T00:41:33.2169350Z 2023-06-23 00:41:33.201854+0000 xctest[57173:352988] [Default] Reading attribute ...
2023-06-23T00:41:33.2169930Z 2023-06-23 00:41:33.202364+0000 xctest[57173:353337] [Default] Cannot connect to XPC server for remote controller
2023-06-23T00:41:33.2170740Z 2023-06-23 00:41:33.202720+0000 xctest[57173:352988] [Default] Failed to obtain XPC connection
2023-06-23T00:41:33.2171340Z 2023-06-23 00:41:33.202881+0000 xctest[57173:352988] Read value: (null)
2023-06-23T00:41:33.2171880Z Test Case '-[MTRXPCProtocolTests testXPCConnectionFailure]' passed (0.004 seconds).
2023-06-23T00:41:33.2172440Z Test Suite 'MTRXPCProtocolTests' passed at 2023-06-23 00:41:33.205.
2023-06-23T00:41:33.2172830Z 	 Executed 27 tests, with 0 failures (0 unexpected) in 9.484 (9.505) seconds
2023-06-23T00:41:33.2173650Z Test Suite 'MatterTests.xctest' failed at 2023-06-23 00:41:33.206.
2023-06-23T00:41:33.2174030Z 	 Executed 256 tests, with 3 failures (0 unexpected) in 43.915 (44.014) seconds
2023-06-23T00:41:33.2174530Z Test Suite 'Selected tests' failed at 2023-06-23 00:41:33.208.
2023-06-23T00:41:33.2174890Z 	 Executed 256 tests, with 3 failures (0 unexpected) in 43.915 (44.019) seconds
2023-06-23T00:41:38.7793660Z 2023-06-23 00:41:38.779 xcodebuild[36565:308524] [MT] IDETestOperationsObserverDebug: 174.511 elapsed -- Testing started completed.
2023-06-23T00:41:38.7795370Z 2023-06-23 00:41:38.779 xcodebuild[36565:308524] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2023-06-23T00:41:38.7796100Z 2023-06-23 00:41:38.779 xcodebuild[36565:308524] [MT] IDETestOperationsObserverDebug: 174.511 sec, +174.511 sec -- end
2023-06-23T00:41:43.2566100Z Failing tests:
2023-06-23T00:41:43.2566320Z 
2023-06-23T00:41:43.2569590Z 	-[MTRErrorTests testErrorSourcePaths]
2023-06-23T00:41:43.2569980Z Test session results, code coverage, and logs:
2023-06-23T00:41:43.2571520Z 
2023-06-23T00:41:43.2572710Z 	/Users/runner/Library/Developer/Xcode/DerivedData/Matter-fezxjrcgbvmiwkgpcrhtmcinmudo/Logs/Test/Test-Matter Framework Tests-2023.06.23_00-31-10-+0000.xcresult
2023-06-23T00:41:43.2604490Z ** TEST FAILED **
2023-06-23T00:41:43.2604690Z 

Platform

darwin

Anything else?

No response

@woody-apple woody-apple changed the title [Build] Darwin build failed [Build] Darwin build failed -[MTRErrorTests testErrorSourcePaths] Jun 23, 2023
@bzbarsky-apple
Copy link
Contributor

The failure is this bit:

2023-06-23T00:40:31.1978010Z ==================
2023-06-23T00:40:31.2071630Z WARNING: ThreadSanitizer: data race (pid=52934)
2023-06-23T00:40:31.2072750Z   Write of size 1 at 0x0001247b32f0 by main thread:
2023-06-23T00:40:31.2073690Z     #0 chip::Logging::SetLogFilter(unsigned char) CHIPLogging.cpp:255 (Matter:x86_64+0x27555ae)
2023-06-23T00:40:31.2075230Z     #1 MTRSetLogCallback MTRLogging.mm:62 (Matter:x86_64+0x2635094)
2023-06-23T00:40:31.2076530Z     #2 -[MTRErrorTests testErrorSourcePaths] MTRErrorTests.m:35 (MatterTests:x86_64+0x367f2f)
2023-06-23T00:40:31.2077420Z     #3 __invoking___ <null>:2 (CoreFoundation:x86_64+0x66dbb)
2023-06-23T00:40:31.2078340Z 
2023-06-23T00:40:31.2078960Z   Previous read of size 1 at 0x0001247b32f0 by thread T8:
2023-06-23T00:40:31.2080190Z     #0 chip::Logging::IsCategoryEnabled(unsigned char) CHIPLogging.cpp:274 (Matter:x86_64+0x27555ff)
2023-06-23T00:40:31.2081670Z     #1 -[MTRDevice _handleSubscriptionReset] MTRDevice.mm:339 (Matter:x86_64+0x2637b62)
2023-06-23T00:40:31.2082530Z     #2 __31-[MTRDevice _setupSubscription]_block_invoke.130 MTRDevice.mm:597 (Matter:x86_64+0x263e295)
2023-06-23T00:40:31.2083050Z     #3 __tsan::invoke_and_release_block(void*) <null>:2 (libclang_rt.tsan_osx_dynamic.dylib:x86_64+0x7f35b)
2023-06-23T00:40:31.2083520Z     #4 _dispatch_client_callout <null>:2 (libdispatch.dylib:x86_64+0x3316)
2023-06-23T00:40:31.2084290Z 
2023-06-23T00:40:31.2084870Z   Location is global 'chip::Logging::gLogFilter' at 0x0001247b32f0 (Matter+0x30ae2f0)
2023-06-23T00:40:31.2085130Z 
2023-06-23T00:40:31.2085290Z   Thread T8 (tid=349302, running) is a GCD worker thread
2023-06-23T00:40:31.2085490Z 
2023-06-23T00:40:31.2085750Z SUMMARY: ThreadSanitizer: data race CHIPLogging.cpp:255 in chip::Logging::SetLogFilter(unsigned char)
2023-06-23T00:40:31.2086120Z ==================

bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Jun 23, 2023
We could end up logging after Matter stack shutdown and when a different stack
was being configured, which would cause a thread race.

Also fixes a situation where we could try to resubscribe to things after our
MTRDevice has been invalidated.

Fixes project-chip#27425
woody-apple pushed a commit to bzbarsky-apple/connectedhomeip that referenced this issue Jun 23, 2023
We could end up logging after Matter stack shutdown and when a different stack
was being configured, which would cause a thread race.

Also fixes a situation where we could try to resubscribe to things after our
MTRDevice has been invalidated.

Fixes project-chip#27425
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Jun 23, 2023
We could end up logging after Matter stack shutdown and when a different stack
was being configured, which would cause a thread race.

Also fixes a situation where we could try to resubscribe to things after our
MTRDevice has been invalidated.

Fixes project-chip#27425
@mergify mergify bot closed this as completed in #27426 Jun 23, 2023
mergify bot pushed a commit that referenced this issue Jun 23, 2023
We could end up logging after Matter stack shutdown and when a different stack
was being configured, which would cause a thread race.

Also fixes a situation where we could try to resubscribe to things after our
MTRDevice has been invalidated.

Fixes #27425
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants