Search results for

“file uri scheme”

81,711 results found

Post

Replies

Boosts

Views

Activity

Reply to Sporadic crash in xzm_main_malloc_zone_init_range_groups when spawning large binaries (macOS 26.3.1)
Thanks Quinn, that was exactly the right pointer. We traced through the disassembly of xzm_main_malloc_zone_init_range_groups on macOS 26.3.1 and correlated it with the open source in rel/libmalloc-792 (xzone_segment.c:1210-1250). Here's what we found: The CONFIG_MACOS_RANGES path computes: ptr_reservation_size = XZM_RANGE_SEPARATION + XZM_POINTER_RANGE_SIZE + XZM_RANGE_SEPARATION = 4G + 16G + 4G = 24 GiB ptr_start = 16GiB + (entropy % 736) * 32MiB It then calls mach_vm_map with VM_FLAGS_FIXED for 24 GiB at ptr_start. The 736 granules cover [16 GiB, 39 GiB), ensuring the reservation fits under the 63 GiB commpage limit. Why dylibs land above 16 GiB: The binary is a Chromium component-build test binary (browser_tests) that loads 516 Chromium dylibs plus system libraries (1543 images total). The main executable alone consumes 5.54 GiB of VA (4 GiB __PAGEZERO, 517 MiB __TEXT, 1.04 GiB __LINKEDIT). The 516 Chromium dylibs add another 10.19 GiB of aggregate VM (2.26 GiB __TEXT, 3.86 GiB __LINKEDIT). Combined with
1d
Reply to TKTokenDriverConfiguration becomes permanently unusable after ctkd process restart
[quote='882312022, dopey, /thread/820940?answerId=882312022#882312022, /profile/dopey'] We are actually seeing seeing this happen in practice. [/quote] OK. [quote='882312022, dopey, /thread/820940?answerId=882312022#882312022, /profile/dopey'] it's not deterministic. [/quote] Right. It’s hard to say what’s going on without more logging, but the most likely cause is a memory pressure exit, and that’s very non-deterministic. [quote='882312022, dopey, /thread/820940?answerId=882312022#882312022, /profile/dopey'] I will open a bug and post the bug number. [/quote] Much appreciated. Ideally this would include a sysdiagnose log taken: On a device with extra CryptoTokenKit logging enabled (see below) Shortly after seeing the problem But that might be hard to get, so you should feel free to file a bug with only your ‘kill ctkd’ step as evidence. On the logging front, our Bug Reporting > Profiles and Logs only has a CryptoTokenKit profile for iOS. However, you can install that profile on macOS, and I think
Topic: Privacy & Security SubTopic: General Tags:
1d
Localization in Swift macOS console Apps.
Is it possible to build localization into console apps, developed in SwiftUI in Xcode26. I have created a catalog, (.xcstrings file) with an English and fr-CA string. I have tried to display the French text without success. I am using the console app to test a package which also has English/French text. English text works fine in both package and the console main, but I cannot generate the French. From what I can discover so far it's not possible without bundling it as a .app, (console app). Looking for anyone who has crossed this bridge.
7
0
260
1d
Reply to NEAppProxyUDPFlow.writeDatagrams fails with "The datagram was too large" on macOS 15.x, macOS 26.x
Hi Quinn, Following up on your earlier advice about using NEAppProxyUDPFlowHandling and the async readDatagrams / writeDatagrams API. I’ve updated my DNS proxy as follows: I now implement NEAppProxyUDPFlowHandling and handle DNS over UDP via the async API. For each flow, I store the Network.NWEndpoint that comes from readDatagrams() and then pass that same endpoint back into writeDatagrams. I no longer use NWHostEndpoint / NetworkExtension.NWEndpoint anywhere in this path. Relevant code (stripped down): private func readFirstDatagrams(from udpFlow: NEAppProxyUDPFlow, into flow: Flow, channel: Channel) { Task { let (pairs, error) = await udpFlow.readDatagrams() if let error = error { // handle error... return } guard let pairs = pairs, !pairs.isEmpty else { // retry... return } let (firstData, firstEndpoint) = pairs[0] let size = firstData.count MainLogger.shared.log(message: UDP recv (pairs.count) datagrams, first size=(size) from=(firstEndpoint) type=(type(of: firstEndpoint)) ) // Force a hostPort endpoint l
1d
Reply to Sporadic crash in xzm_main_malloc_zone_init_range_groups when spawning large binaries (macOS 26.3.1)
The 3 in that error is KERN_NO_SPACE, which is a pretty clear indication that the system memory allocator asked for address space and the kernel refused to give it. However, given all the constraints you’ve described, it’s not at all clear why that would be. Weirdly, the code that traps this way is not on the main branch of the Darwin open source, but I found a copy in the rel/libmalloc-792 branch [1]. Now, I don’t have time today to study that code in depth, but I figured you’d find it interesting (-: AFAICT it tries to allocate address space by using mach_vm_map to map MEMORY_OBJECT_NULL, specifying a start that’s after 16 GiB, such that it fits within 64 GiB, with a randomly applied offset. That random bit probably explains why this shows up so infrequently. It’s hard to say why this is failing. You might be able to learn more by running vmmap against the dying process. It’d also be interested to know what address was passed to mach_vm_map (with reference to the source, that’s the ptr_addr value), somethin
1d
‌Xcode26-built apps cannot run on iPhone 6 or earlier devices‌
‌Using Xcode 26, the built package encounters device compatibility issues — while it installs successfully on supported iPhone devices, but it crashes immediately upon launch and cannot run normally.‌‌In previous versions of Xcode, the same minimum deployment setting in the project did not cause such compatibility issues.‌ The app built with Xcode 26 shows the following behavior when installed and tested on various devices:‌ iPhone6p iOS12.5.8 fails to run 2.iPhone6 iOS11 fails to run 3.Iphone6 iOS12.5.7 fails to run 4.iPhone7 iOS12.1.3 ok 5.iPhoneX iOS 12.2 ok 6.iphone6s plus iOS10.3.1 ok 7.iphoneXS. iOS 12.1.4 ok 8.iPhone11 iOS 13.6.1 ok 9.iPhone7. iOS 13.7 ok We have tested and found that an iPhone 6s Plus running iOS 10.3.1 can normally run the app. We would like to know whether apps built with Xcode 26 are inherently incompatible with iPhone 6 and older devices. Has Xcode 26’s underlying build environment removed full support for the A8 chip, resulting in binary files containing instructions or
6
0
422
1d
Reply to System-wide deadlock in removexattr from revisiond / APFS
Yeah, the resource fork is just another named fork. For APFS compression, my understanding is that it's using a com.apple.decmpfs named fork, and we see those methods from the APFS kext in the stack. Disassembling revisiond and checking the stack crawl, it appears to be working with com.apple.genstore.* xattrs. We are still trying to identify which file(s) are involved, but so far, any logging messes with the timing to hide the problem and lsof just hangs due to the rwlock, but perhaps it's down in .DocumentRevisions-V100. The underlying xattr access is an implementation detail, though it probably is visible to the ES client. I will check to see if calls to extended attributes and named forks (directly or indirectly) are reported that way to the ES hooks. clone the file yourself and then operate on the clone. That's an interesting thought, especially for the copy-on-write features. I will take it back to the team to consider.
Topic: App & System Services SubTopic: Core OS Tags:
1d
Reply to Background Assets - Apple Hosted - iOS26
Hello, @andy_nash, @StonedStudio, @tom_krikorian, @Dokug, and @zepsec! I’m happy to report that this issue is now resolved in the OS 26.5 beta 1 simulators that we released today with Xcode 26.5 beta 1. If you still see crashes or errors that mention a “team ID” after updating to the OS 26.5 beta 1 simulators, then please file a new feedback report and reply to this thread with the feedback ID. Note that there’s still a separate known issue that prevents the URL override from working in simulator environments. I’ll post again in this thread when that separate issue is fixed. Thanks!
1d
Reply to Apple watch Xcode pairing & connection issues
You can also kill it by sudo pkill -9 remotepairingd If you encounter an instance where you actually find this necessary, please file a Feedback Assistant Report which includes a devicectl diagnose (and separate mac / phone / watch sysdiagnoses if they're not all collected by it). There are no known issues for which this step should be necessary, so if there are issues, we want to know about them. make sure NOT to un-pair your device If you un-pair or you accidentally tap the button to not trust, the only way to get the prompt to appear again is by physically re-connecting the phone. watch is ON throughout the connecting process Yes, and it needs to remain unlocked throughout the DDI mounting process as well. If the device locks before the DDI mounting completes, you will need to re-attempt mounting the DDI. --Jeremy jeremyhu at apple dot com
1d
Reply to System-wide deadlock in removexattr from revisiond / APFS
I was mostly thinking of its interaction with extended attributes, as we see the target threads touching those as well. Just to clarify something, what's really going on here isn't really xattr access. The resource fork has a bit of a strange history, as it predates general xattr support by ~15 years and doesn't really fit into the same mold as any other xattr. It originally had its own API access path through FSReadFork and the ..namedfork/rsrc suffix to open and, more importantly, is routinely MUCH larger than any other xattr, most of which are measured in “bytes. The resource fork was basically added to the more general xattr implementation, rather than being implemented as a native part of the original implementation. Several years ago, we repurposed the resource fork and used it to implement file system level compression of specific files, which is what's happening here. Critically, these files look like standard data files and are accessed by reading the file
Topic: App & System Services SubTopic: Core OS Tags:
1d
Reply to iCloud Sync not working with iPhone, works fine for Mac.
The issue isn't just with CKSyncEngine. I have a custom CloudKit-based syncing setup, which uses CKRecordZoneSubscription to listen and respond to changes in a zone, and the remote notifications aren't working with that either. I filed FB22380044 ... hopefully this can be patched up with a quick update, as it would break so many apps
Replies
Boosts
Views
Activity
1d
Reply to Sporadic crash in xzm_main_malloc_zone_init_range_groups when spawning large binaries (macOS 26.3.1)
Thanks Quinn, that was exactly the right pointer. We traced through the disassembly of xzm_main_malloc_zone_init_range_groups on macOS 26.3.1 and correlated it with the open source in rel/libmalloc-792 (xzone_segment.c:1210-1250). Here's what we found: The CONFIG_MACOS_RANGES path computes: ptr_reservation_size = XZM_RANGE_SEPARATION + XZM_POINTER_RANGE_SIZE + XZM_RANGE_SEPARATION = 4G + 16G + 4G = 24 GiB ptr_start = 16GiB + (entropy % 736) * 32MiB It then calls mach_vm_map with VM_FLAGS_FIXED for 24 GiB at ptr_start. The 736 granules cover [16 GiB, 39 GiB), ensuring the reservation fits under the 63 GiB commpage limit. Why dylibs land above 16 GiB: The binary is a Chromium component-build test binary (browser_tests) that loads 516 Chromium dylibs plus system libraries (1543 images total). The main executable alone consumes 5.54 GiB of VA (4 GiB __PAGEZERO, 517 MiB __TEXT, 1.04 GiB __LINKEDIT). The 516 Chromium dylibs add another 10.19 GiB of aggregate VM (2.26 GiB __TEXT, 3.86 GiB __LINKEDIT). Combined with
Replies
Boosts
Views
Activity
1d
Reply to password to unlock login keychain in 26.4?
The latter. I will file a feedback report for user related behaviour change.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
1d
Reply to TKTokenDriverConfiguration becomes permanently unusable after ctkd process restart
[quote='882312022, dopey, /thread/820940?answerId=882312022#882312022, /profile/dopey'] We are actually seeing seeing this happen in practice. [/quote] OK. [quote='882312022, dopey, /thread/820940?answerId=882312022#882312022, /profile/dopey'] it's not deterministic. [/quote] Right. It’s hard to say what’s going on without more logging, but the most likely cause is a memory pressure exit, and that’s very non-deterministic. [quote='882312022, dopey, /thread/820940?answerId=882312022#882312022, /profile/dopey'] I will open a bug and post the bug number. [/quote] Much appreciated. Ideally this would include a sysdiagnose log taken: On a device with extra CryptoTokenKit logging enabled (see below) Shortly after seeing the problem But that might be hard to get, so you should feel free to file a bug with only your ‘kill ctkd’ step as evidence. On the logging front, our Bug Reporting > Profiles and Logs only has a CryptoTokenKit profile for iOS. However, you can install that profile on macOS, and I think
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
1d
Localization in Swift macOS console Apps.
Is it possible to build localization into console apps, developed in SwiftUI in Xcode26. I have created a catalog, (.xcstrings file) with an English and fr-CA string. I have tried to display the French text without success. I am using the console app to test a package which also has English/French text. English text works fine in both package and the console main, but I cannot generate the French. From what I can discover so far it's not possible without bundling it as a .app, (console app). Looking for anyone who has crossed this bridge.
Replies
7
Boosts
0
Views
260
Activity
1d
Reply to NEAppProxyUDPFlow.writeDatagrams fails with "The datagram was too large" on macOS 15.x, macOS 26.x
Hi Quinn, Following up on your earlier advice about using NEAppProxyUDPFlowHandling and the async readDatagrams / writeDatagrams API. I’ve updated my DNS proxy as follows: I now implement NEAppProxyUDPFlowHandling and handle DNS over UDP via the async API. For each flow, I store the Network.NWEndpoint that comes from readDatagrams() and then pass that same endpoint back into writeDatagrams. I no longer use NWHostEndpoint / NetworkExtension.NWEndpoint anywhere in this path. Relevant code (stripped down): private func readFirstDatagrams(from udpFlow: NEAppProxyUDPFlow, into flow: Flow, channel: Channel) { Task { let (pairs, error) = await udpFlow.readDatagrams() if let error = error { // handle error... return } guard let pairs = pairs, !pairs.isEmpty else { // retry... return } let (firstData, firstEndpoint) = pairs[0] let size = firstData.count MainLogger.shared.log(message: UDP recv (pairs.count) datagrams, first size=(size) from=(firstEndpoint) type=(type(of: firstEndpoint)) ) // Force a hostPort endpoint l
Replies
Boosts
Views
Activity
1d
Reply to Sporadic crash in xzm_main_malloc_zone_init_range_groups when spawning large binaries (macOS 26.3.1)
The 3 in that error is KERN_NO_SPACE, which is a pretty clear indication that the system memory allocator asked for address space and the kernel refused to give it. However, given all the constraints you’ve described, it’s not at all clear why that would be. Weirdly, the code that traps this way is not on the main branch of the Darwin open source, but I found a copy in the rel/libmalloc-792 branch [1]. Now, I don’t have time today to study that code in depth, but I figured you’d find it interesting (-: AFAICT it tries to allocate address space by using mach_vm_map to map MEMORY_OBJECT_NULL, specifying a start that’s after 16 GiB, such that it fits within 64 GiB, with a randomly applied offset. That random bit probably explains why this shows up so infrequently. It’s hard to say why this is failing. You might be able to learn more by running vmmap against the dying process. It’d also be interested to know what address was passed to mach_vm_map (with reference to the source, that’s the ptr_addr value), somethin
Replies
Boosts
Views
Activity
1d
‌Xcode26-built apps cannot run on iPhone 6 or earlier devices‌
‌Using Xcode 26, the built package encounters device compatibility issues — while it installs successfully on supported iPhone devices, but it crashes immediately upon launch and cannot run normally.‌‌In previous versions of Xcode, the same minimum deployment setting in the project did not cause such compatibility issues.‌ The app built with Xcode 26 shows the following behavior when installed and tested on various devices:‌ iPhone6p iOS12.5.8 fails to run 2.iPhone6 iOS11 fails to run 3.Iphone6 iOS12.5.7 fails to run 4.iPhone7 iOS12.1.3 ok 5.iPhoneX iOS 12.2 ok 6.iphone6s plus iOS10.3.1 ok 7.iphoneXS. iOS 12.1.4 ok 8.iPhone11 iOS 13.6.1 ok 9.iPhone7. iOS 13.7 ok We have tested and found that an iPhone 6s Plus running iOS 10.3.1 can normally run the app. We would like to know whether apps built with Xcode 26 are inherently incompatible with iPhone 6 and older devices. Has Xcode 26’s underlying build environment removed full support for the A8 chip, resulting in binary files containing instructions or
Replies
6
Boosts
0
Views
422
Activity
1d
Slow launch of app on iOS Simulator 26.4
Each time I launch a Debug version of the app on iOS Simulator, I see the Launch Screen presented and then about a 30-second delay before the app is responsive and debug output appears in the console panel. Filed FB22345091
Replies
8
Boosts
0
Views
344
Activity
1d
Reply to Safari iOS 17 layout issue
This issue has been filed via Feedback Assistant as FB22377067.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
1d
Reply to System-wide deadlock in removexattr from revisiond / APFS
Yeah, the resource fork is just another named fork. For APFS compression, my understanding is that it's using a com.apple.decmpfs named fork, and we see those methods from the APFS kext in the stack. Disassembling revisiond and checking the stack crawl, it appears to be working with com.apple.genstore.* xattrs. We are still trying to identify which file(s) are involved, but so far, any logging messes with the timing to hide the problem and lsof just hangs due to the rwlock, but perhaps it's down in .DocumentRevisions-V100. The underlying xattr access is an implementation detail, though it probably is visible to the ES client. I will check to see if calls to extended attributes and named forks (directly or indirectly) are reported that way to the ES hooks. clone the file yourself and then operate on the clone. That's an interesting thought, especially for the copy-on-write features. I will take it back to the team to consider.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1d
Reply to Background Assets - Apple Hosted - iOS26
Hello, @andy_nash, @StonedStudio, @tom_krikorian, @Dokug, and @zepsec! I’m happy to report that this issue is now resolved in the OS 26.5 beta 1 simulators that we released today with Xcode 26.5 beta 1. If you still see crashes or errors that mention a “team ID” after updating to the OS 26.5 beta 1 simulators, then please file a new feedback report and reply to this thread with the feedback ID. Note that there’s still a separate known issue that prevents the URL override from working in simulator environments. I’ll post again in this thread when that separate issue is fixed. Thanks!
Replies
Boosts
Views
Activity
1d
Reply to Background Assets: Second and subsequent download cancellations fail (iOS 26.0–26.3 RC)
Hello, @ota.seiji! I’m happy to report that issue with subsequent download cancellations is fixed in OS 26.5 beta 1, which we released to developers today. If you still encounter the issue after updating to OS 26.5 beta 1, then please file a new feedback report and reply to this thread with the feedback ID. Thanks!
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
1d
Reply to Apple watch Xcode pairing & connection issues
You can also kill it by sudo pkill -9 remotepairingd If you encounter an instance where you actually find this necessary, please file a Feedback Assistant Report which includes a devicectl diagnose (and separate mac / phone / watch sysdiagnoses if they're not all collected by it). There are no known issues for which this step should be necessary, so if there are issues, we want to know about them. make sure NOT to un-pair your device If you un-pair or you accidentally tap the button to not trust, the only way to get the prompt to appear again is by physically re-connecting the phone. watch is ON throughout the connecting process Yes, and it needs to remain unlocked throughout the DDI mounting process as well. If the device locks before the DDI mounting completes, you will need to re-attempt mounting the DDI. --Jeremy jeremyhu at apple dot com
Replies
Boosts
Views
Activity
1d
Reply to System-wide deadlock in removexattr from revisiond / APFS
I was mostly thinking of its interaction with extended attributes, as we see the target threads touching those as well. Just to clarify something, what's really going on here isn't really xattr access. The resource fork has a bit of a strange history, as it predates general xattr support by ~15 years and doesn't really fit into the same mold as any other xattr. It originally had its own API access path through FSReadFork and the ..namedfork/rsrc suffix to open and, more importantly, is routinely MUCH larger than any other xattr, most of which are measured in “bytes. The resource fork was basically added to the more general xattr implementation, rather than being implemented as a native part of the original implementation. Several years ago, we repurposed the resource fork and used it to implement file system level compression of specific files, which is what's happening here. Critically, these files look like standard data files and are accessed by reading the file
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1d