Skip to content

UnauthorizedAccessException creating symlink on tvOS device (Operation not permitted) #125490

@MatousBot

Description

@MatousBot

Suggested labels: Known Build Error, test-failure, os-tvos, arch-arm64, untriaged

Note: This issue was automatically generated by AI-Test-Triage. Please review and triage accordingly.

Build Information

Build: 20260309.1, 20260310.2

Build error leg or test failing: System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink, System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe, System.IO.FileSystem.Tests.WorkItemExecution

Affected CI jobs: build_tvos_arm64_Release_AllSubsets_CoreCLR, build_tvOS_arm64_Release_AllSubsets_Mono

Causing Commit Range Information

Commit range: {TODO: Insert commit range or link to changes}

Summary

  • UnauthorizedAccessException ('Operation not permitted') occurs when creating symbolic links during System.IO tests.
  • Failures reproducible on tvOS device runs in build_tvos_arm64_Release_AllSubsets_CoreCLR (tvos/arm64).
  • Tests are executed via XHarness/mlaunch; test harness reports XHarness exit code 1 (TESTS_FAILED).
  • Device interaction logs sometimes show mlaunch exiting with code 137, concurrent with the symlink failures.
  • Root failure surfaces in System.IO.File.CreateSymbolicLink invoked from SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink.

Failure Statistics

Note: These statistics are based on the configured time range and might not reflect the full history of the failure.

  • Occurrence Count: 12
  • First Failure: 2026-03-10 07:35:08 UTC
  • Last Failure: 2026-03-11 08:06:52 UTC

Work Items

Showing 10 most recent of 12 occurrences

Work Item Console Log Build Job Name
System.IO.FileSystem.Tests Work Item
View Extract
[00:57:32.8313560] 	2026-03-09 21:57:32.892 System.IO.FileSystem.Tests[13824:11381713] 	[FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[00:57:32.8331760] 2026-03-09 21:57:32.893 System.IO.FileSystem.Tests[13824:11381713] System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/B4A6FCC5-9050-463B-8950-5CABC94B81D8/tmp/#SafeFileHandle_GetFileType_Unix_w1d2lkuk.cut/GetFileType_SymbolicLink_48_4n3u3cep' is denied.
[00:57:32.8332330] ---- System.IO.IOException : Operation not permitted
[00:57:32.8332590] at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
[00:57:32.8332710] 2026-03-09 21:57:32.893 System.IO.FileSystem.Tests[13824:11381713] at Interop.CheckIo(Int64 result, String path, Boolean isDirError)
[00:57:32.8332810] at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
...
[00:58:52] dbug: Saving diagnostics data to '/tmp/helix/working/AF5009A4/w/B0360953/e/diagnostics.json'
XHarness exit code: 1 (TESTS_FAILED)
...
[00:58:35] dbug: Process mlaunch exited with 137
[00:58:35] dbug: Test run completed
Full Log
20260309.1 build_tvos_arm64_Release_AllSubsets_CoreCLR
System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
View Extract
[01:14:52.1100100]  Test collection for System.IO.Tests.SafeFileHandle_GetFileType_Unix
[01:14:52.1303710] 2026-03-09 22:14:52.261 System.IO.FileSystem.Tests[15414:12129812] [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[01:14:52.1303870] 2026-03-09 22:14:52.262 System.IO.FileSystem.Tests[15414:12129812] System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/E898CCCE-58BD-4C37-972C-D1B8DB22D2FC/tmp/#SafeFileHandle_GetFileType_Unix_5ihimqbm.qpy/GetFileType_SymbolicLink_48_9mv0gog9' is denied.
[01:14:52.1303920] ---- System.IO.IOException : Operation not permitted
[01:14:52.1303970] at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
[01:14:52.1317430] 2026-03-09 22:14:52.262 System.IO.FileSystem.Tests[15414:12129812] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink()
[01:14:52.1317860] at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[01:14:52.1317930] at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[01:16:10.0088740] ---- System.IO.IOException : Operation not permitted Exception stack traces: at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
[01:16:10.0088980] 2026-03-09 22:16:10.069 System.IO.FileSystem.Tests[15414:12133111] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink()
[01:16:10.0089680] 2026-03-09 22:16:10.069 System.IO.FileSystem.Tests[15414:12133111] Execution time: 0.0139391
Full Log
20260309.1 build_tvOS_arm64_Release_AllSubsets_Mono
System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe
View Extract
[01:14:52.1303710] 	2026-03-09 22:14:52.261 System.IO.FileSystem.Tests[15414:12129812] 	[FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[01:14:52.1303870] 2026-03-09 22:14:52.262 System.IO.FileSystem.Tests[15414:12129812] System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/E898CCCE-58BD-4C37-972C-D1B8DB22D2FC/tmp/#SafeFileHandle_GetFileType_Unix_5ihimqbm.qpy/GetFileType_SymbolicLink_48_9mv0gog9' is denied.
[01:14:52.1303920] ---- System.IO.IOException : Operation not permitted
[01:14:52.1303970] at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
[01:14:52.1317430] 2026-03-09 22:14:52.262 System.IO.FileSystem.Tests[15414:12129812] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink()
...
[01:14:52.1468800] 2026-03-09 22:14:52.278 System.IO.FileSystem.Tests[15414:12129812] [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe
[01:14:52.1469090] Assert.Equal() Failure: Values differ
[01:14:52.1469150] Expected: 0
[01:14:52.1469200] Actual: -1
[01:14:52.1469250] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe()
...
[01:16:10.0070610] 2026-03-09 22:16:10.067 System.IO.FileSystem.Tests[15414:12133111] Failed tests:
[01:16:10.0088200] 2026-03-09 22:16:10.068 System.IO.FileSystem.Tests[15414:12133111] 1) [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[01:16:10.0089930] 2026-03-09 22:16:10.069 System.IO.FileSystem.Tests[15414:12133111] 2) [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe
[01:16:10.0737720] === TEST EXECUTION SUMMARY ===
[01:16:10.0737880] Tests run: 8554 Passed: 7580 Inconclusive: 0 Failed: 2 Ignored: 812 Skipped: 160
Full Log
20260309.1 build_tvOS_arm64_Release_AllSubsets_Mono
System.IO.FileSystem.Tests Work Item
View Extract
[01:14:52.1303710] 	2026-03-09 22:14:52.261 System.IO.FileSystem.Tests[15414:12129812] 	[FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[01:14:52.1303870] 2026-03-09 22:14:52.262 System.IO.FileSystem.Tests[15414:12129812] System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/E898CCCE-58BD-4C37-972C-D1B8DB22D2FC/tmp/#SafeFileHandle_GetFileType_Unix_5ihimqbm.qpy/GetFileType_SymbolicLink_48_9mv0gog9' is denied.
[01:14:52.1303920] ---- System.IO.IOException : Operation not permitted
[01:14:52.1303970] at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
[01:14:52.1317430] 2026-03-09 22:14:52.262 System.IO.FileSystem.Tests[15414:12129812] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink()
[01:16:10] dbug: Detected test end tag in application's output
[01:16:10] dbug: Process mlaunch exited with 137
[01:16:26] dbug: Command Completed, took 0.508 seconds
[01:16:27] info: Application 'net.dot.System.IO.FileSystem.Tests' was uninstalled successfully
XHarness exit code: 1 (TESTS_FAILED)
Full Log
20260309.1 build_tvOS_arm64_Release_AllSubsets_Mono
System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
View Extract
[01:25:28.2792880] 	Test collection for System.IO.Tests.SafeFileHandle_GetFileType_Unix
[01:25:28.2927130] 2026-03-10 22:25:28.375 System.IO.FileSystem.Tests[15458:11607341] [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[01:25:28.2927670] 2026-03-10 22:25:28.375 System.IO.FileSystem.Tests[15458:11607341] System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/7196F9BD-8A3A-44B4-9525-D9249753B580/tmp/#SafeFileHandle_GetFileType_Unix_lokgk5xw.v5w/GetFileType_SymbolicLink_48_o6e725ay' is denied.
[01:25:28.2927790] ---- System.IO.IOException : Operation not permitted
[01:25:28.2927890] at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
[01:25:28.2928000] 2026-03-10 22:25:28.375 System.IO.FileSystem.Tests[15458:11607341] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink()
[01:25:28.2944850] 2026-03-10 22:25:28.377 System.IO.FileSystem.Tests[15458:11607341] [IGNORED] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_BlockDevice
...
[01:27:00.5582420] 2026-03-10 22:27:00.647 System.IO.FileSystem.Tests[15458:11610997] Failed tests:
[01:27:00.5601320] 2026-03-10 22:27:00.648 System.IO.FileSystem.Tests[15458:11610997] 1) [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink Test name: System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[01:27:00.5602210] ---- System.IO.IOException : Operation not permitted Exception stack traces: at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
[01:27:00.5603390] 2026-03-10 22:27:00.648 System.IO.FileSystem.Tests[15458:11610997] 2) [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe Test name: System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe
Full Log
20260310.2 build_tvOS_arm64_Release_AllSubsets_Mono
System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe
View Extract
[01:25:28.2927130] 	2026-03-10 22:25:28.375 System.IO.FileSystem.Tests[15458:11607341] 	[FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[01:25:28.2927670] 2026-03-10 22:25:28.375 System.IO.FileSystem.Tests[15458:11607341] System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/7196F9BD-8A3A-44B4-9525-D9249753B580/tmp/#SafeFileHandle_GetFileType_Unix_lokgk5xw.v5w/GetFileType_SymbolicLink_48_o6e725ay' is denied.
[01:25:28.2927790] ---- System.IO.IOException : Operation not permitted
[01:25:28.2927890] at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
[01:25:28.2928000] 2026-03-10 22:25:28.375 System.IO.FileSystem.Tests[15458:11607341] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink()
...
[01:25:28.3071070] 2026-03-10 22:25:28.391 System.IO.FileSystem.Tests[15458:11607341] [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe
[01:25:28.3071550] Assert.Equal() Failure: Values differ
[01:25:28.3071670] Expected: 0
[01:25:28.3071790] Actual: -1
[01:25:28.3071880] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe()
...
[01:27:00.5582420] 2026-03-10 22:27:00.647 System.IO.FileSystem.Tests[15458:11610997] Failed tests:
[01:27:00.5601320] 2026-03-10 22:27:00.648 System.IO.FileSystem.Tests[15458:11610997] 1) [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[01:27:00.5603390] 2026-03-10 22:27:00.648 System.IO.FileSystem.Tests[15458:11610997] 2) [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe
[01:27:00.6267700] Tests run: 8554 Passed: 7580 Inconclusive: 0 Failed: 2 Ignored: 812 Skipped: 160
Full Log
20260310.2 build_tvOS_arm64_Release_AllSubsets_Mono
System.IO.FileSystem.Tests Work Item
View Extract
[01:25:28.2792880] 	Test collection for System.IO.Tests.SafeFileHandle_GetFileType_Unix
[01:25:28.2927130] 2026-03-10 22:25:28.375 System.IO.FileSystem.Tests[15458:11607341] [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[01:25:28.2927670] 2026-03-10 22:25:28.375 System.IO.FileSystem.Tests[15458:11607341] System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/7196F9BD-8A3A-44B4-9525-D9249753B580/tmp/#SafeFileHandle_GetFileType_Unix_lokgk5xw.v5w/GetFileType_SymbolicLink_48_o6e725ay' is denied.
[01:25:28.2927790] ---- System.IO.IOException : Operation not permitted
[01:25:28.2927890] at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
[01:25:28.2928000] 2026-03-10 22:25:28.375 System.IO.FileSystem.Tests[15458:11607341] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink()
...
[01:27:00] dbug: Process mlaunch exited with 137
[01:27:08] dbug: Test run failed
[01:27:18] info: Application 'net.dot.System.IO.FileSystem.Tests' was uninstalled successfully
XHarness exit code: 1 (TESTS_FAILED)
Full Log
20260310.2 build_tvOS_arm64_Release_AllSubsets_Mono
System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
View Extract
[01:40:31.1296160] 	Test collection for System.IO.Tests.SafeFileHandle_GetFileType_Unix
[01:40:31.1448480] 2026-03-10 22:40:31.232 System.IO.FileSystem.Tests[15712:12105207] [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[01:40:31.1449040] 2026-03-10 22:40:31.232 System.IO.FileSystem.Tests[15712:12105207] System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/CBCFC49F-1993-4F29-8A3C-EB39990135F3/tmp/#SafeFileHandle_GetFileType_Unix_23vq54w3.m5t/GetFileType_SymbolicLink_48_h87427hj' is denied.
[01:40:31.1449180] ---- System.IO.IOException : Operation not permitted
[01:40:31.1449290] at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
[01:40:31.1466970] at Interop.CheckIo(Int64 result, String path, Boolean isDirError)
[01:40:31.1467490] at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
[01:40:31.1467630] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink()
Full Log
20260310.2 build_tvos_arm64_Release_AllSubsets_CoreCLR
System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe
View Extract
[01:40:31.1449180] 	---- System.IO.IOException : Operation not permitted
[01:40:31.1449290] at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
[01:40:31.1466970] 2026-03-10 22:40:31.232 System.IO.FileSystem.Tests[15712:12105207] at Interop.CheckIo(Int64 result, String path, Boolean isDirError)
[01:40:31.1467490] at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
[01:40:31.1467630] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink()
...
[01:40:31.1589480] 2026-03-10 22:40:31.246 System.IO.FileSystem.Tests[15712:12105207] [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe
[01:40:31.1589960] Assert.Equal() Failure: Values differ
[01:40:31.1590070] Expected: 0
[01:40:31.1590180] Actual: -1
[01:40:31.1590280] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe()
...
[01:41:08.7843030] 2026-03-10 22:41:08.872 System.IO.FileSystem.Tests[15712:12107348] Exception messages: System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/CBCFC49F-1993-4F29-8A3C-EB39990135F3/tmp/#SafeFileHandle_GetFileType_Unix_23vq54w3.m5t/GetFileType_SymbolicLink_48_h87427hj' is denied.
[01:41:08.7843210] ---- System.IO.IOException : Operation not permitted Exception stack traces: at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
[01:41:08.7843780] at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
[01:41:08.7844060] at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink()
[01:41:08.7846520] Execution time: 0.0068954
[01:41:08.7846740] 2026-03-10 22:41:08.872 System.IO.FileSystem.Tests[15712:12107348] 2) [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe Test name: System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe
[01:41:08.7847100] Exception messages: Assert.Equal() Failure: Values differ
[01:41:08.7847220] Expected: 0
[01:41:08.7847440] Actual: -1
[01:41:08.7847580] Exception stack traces: at System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_NamedPipe()
[01:41:08.7847700] Execution time: 0.0022052
Full Log
20260310.2 build_tvos_arm64_Release_AllSubsets_CoreCLR
System.IO.FileSystem.Tests Work Item
View Extract
[01:40:31.1296160]  Test collection for System.IO.Tests.SafeFileHandle_GetFileType_Unix
[01:40:31.1448480] 2026-03-10 22:40:31.232 System.IO.FileSystem.Tests[15712:12105207] [FAIL] System.IO.Tests.SafeFileHandle_GetFileType_Unix.GetFileType_SymbolicLink
[01:40:31.1449040] 2026-03-10 22:40:31.232 System.IO.FileSystem.Tests[15712:12105207] System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/CBCFC49F-1993-4F29-8A3C-EB39990135F3/tmp/#SafeFileHandle_GetFileType_Unix_23vq54w3.m5t/GetFileType_SymbolicLink_48_h87427hj' is denied.
[01:40:31.1449180] ---- System.IO.IOException : Operation not permitted
[01:40:31.1449290] at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
[01:40:31.1466970] 2026-03-10 22:40:31.232 System.IO.FileSystem.Tests[15712:12105207] at Interop.CheckIo(Int64 result, String path, Boolean isDirError)
[01:40:31.1467490] at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)
...
[01:41:08] dbug: Detected test end tag in application's output
[01:41:08] dbug: Process mlaunch exited with 137
[01:41:16] dbug: Test run failed
[01:41:26] info: Application 'net.dot.System.IO.FileSystem.Tests' was uninstalled successfully
XHarness exit code: 1 (TESTS_FAILED)
Full Log
20260310.2 build_tvos_arm64_Release_AllSubsets_CoreCLR

Error Message

{
  "ErrorMessage": [
    "System.IO.IOException : Operation not permitted",
    "at System.IO.File.CreateSymbolicLink(String path, String pathToTarget)"
  ],
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Report

Build Definition Test Pull Request
1332106 dotnet/runtime System.IO.FileSystem.Tests.WorkItemExecution #125481

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 1 1

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions