Xcode.app issues (possibly related to com.apple.macl xattr?)

All your general support questions for OpenZFS on OS X.

Xcode.app issues (possibly related to com.apple.macl xattr?)

Postby Haravikk » Fri Feb 04, 2022 8:40 am

I was trying to do some development work in Xcode today but I've encountered some kind of issue with the way Xcode registers files as "locked for editing".

I'm running zfs-macOS-2.1.0-1, and the dataset in question has xattr=sa and com.apple.mimic=hfs as the obvious settings that might be involved.

It seems like when I edit a file in the Xcode project, the com.apple.macl extended attribute is applied to the file, and at this point I can no longer edit the file; Xcode complains that the file is "locked for editing" (padlock in the top right corner in the open editor pane) but when it tries to unlock the file it complains that it failed for unknown reasons. I can however edit the file just fine in other programs; the file itself is not appearing as locked in the Finder.

The project in question has git source control enabled within Xcode, which may or may not part of the problem?


I'm not 100% certain that com.apple.macl is at fault, all I know is that once a file has it, Xcode will no longer allow me to edit it. The only way that I've found to continue editing the file is to raw copy the file (cat /path/to/file >> /path/to/file.new) and replace it, as this will create a new file without any extended attributes.

I've noticed some similar, and possibly related, issues. For example, Stickies.app no longer allows me to create or save stickies, it comes up with an error such as "You don’t own the file “49A07A46-0ECD-4006-B4BD-19C22830DAB8.rtfd” and don’t have permission to write to it." even though I have full ownership of the file under ~/Library/Containers/com.apple.Stickies/Data/Library/Stickies, but all of the .rtfd files within have the com.apple.macl attribute I'm seeing Xcode apparently stumble over. Likewise I've noticed that some other programs complain that file history is not available because it's not supported on the current volume (as you would get on an SMB share, a FAT formatted USB stick etc.), however when I look in the volume root I see there is a .DocumentRevisions-V100 folder which has content and appears to be having data written into it without any obvious errors.

It's almost like some kind of data is being stored, not retrieved correctly, and is resulting false negatives; however I've run various tests using xattr to set and retrieve attributes and they all seem to work just fine, so I'm not sure where the error might be? Has anyone found any workarounds to any of the above issues?

Any ideas how I might debug further? Aside from using xattr this is well outside my experience to debug, and Xcode at least doesn't seem to be logging anything more than it reports in its error popup.
Last edited by Haravikk on Sun Feb 13, 2022 4:43 am, edited 1 time in total.
Haravikk
 
Posts: 74
Joined: Tue Mar 17, 2015 4:52 am

Re: Xcode.app issues (possibly related to com.apple.xacl xat

Postby Haravikk » Sat Feb 12, 2022 4:46 am

Anyone else experiencing issues like these, or am I being an idiot in trying to run user accounts off ZFS datasets?

I've also noticed that when I login to user accounts I see a lot of recovered files in trash, and it seems like they are all preference files that could not be saved. The one thing they seem to have in common is that these all have the com.apple.macl extended attribute.

So it seems like there's definitely something wrong with extended attributes; I'm running macOS Catalina in case that makes a difference (not sure why it would) and again as far as I can tell the xattrs are being set correctly, and I can retrieve values for them using the xattr terminal command, but for some reason other processes seem to be having trouble.

Any ideas why that might be, or what I can do to debug it? I've tried looking for logs but I don't see anything that stands out.
Haravikk
 
Posts: 74
Joined: Tue Mar 17, 2015 4:52 am

Re: Xcode.app issues (possibly related to com.apple.xacl xat

Postby jeffc » Sat Feb 12, 2022 8:03 am

Haravikk wrote:Anyone else experiencing issues like these, or am I being an idiot in trying to run user accounts off ZFS datasets?

I have issues with Xcode projects residing on ZFS. I created this issue: https://github.com/openzfsonosx/zfs/issues/792 Don't know if the problem is the same, but it sounds plausible it has something to do with extended attributes.
jeffc
 
Posts: 13
Joined: Wed Jan 13, 2021 5:35 pm

Re: Xcode.app issues (possibly related to com.apple.xacl xat

Postby Haravikk » Sat Feb 12, 2022 4:01 pm

Sounds like exactly the same issue I'm experiencing on the Xcode side; did you notice any of the other issues I'm seeing, such as the temporary .plist files appearing as recovered items in trash after you've logged out and back in again? Or are your user accounts located somewhere other than your ZFS datasets?

Also, in your issue you mention Xcode only remembering one recent item, I'm actually noticing the same thing in Recent Items sub-menu of the Apple menu; I only have a single entry under Documents, and my list of Servers is out of date (not showing servers that I've connected to today). However my list of recent Applications seems correct.
Haravikk
 
Posts: 74
Joined: Tue Mar 17, 2015 4:52 am

Re: Xcode.app issues (possibly related to com.apple.xacl xat

Postby jeffc » Sat Feb 12, 2022 5:14 pm

Haravikk wrote:Sounds like exactly the same issue I'm experiencing on the Xcode side; did you notice any of the other issues I'm seeing, such as the temporary .plist files appearing as recovered items in trash after you've logged out and back in again? Or are your user accounts located somewhere other than your ZFS datasets?

Also, in your issue you mention Xcode only remembering one recent item, I'm actually noticing the same thing in Recent Items sub-menu of the Apple menu; I only have a single entry under Documents, and my list of Servers is out of date (not showing servers that I've connected to today). However my list of recent Applications seems correct.

My user accounts are located on APFS and (therefore?) I do not have .plist files appearing as recovered items in trash. I don't have the other problems either, probably for the same reason.
jeffc
 
Posts: 13
Joined: Wed Jan 13, 2021 5:35 pm

Re: Xcode.app issues (possibly related to com.apple.xacl xat

Postby jeffc » Sat Feb 12, 2022 9:59 pm

Turns out my problem was Developer Mode not being set. Once enabled, my problems went away. Still doesn't explain why they never existed on APFS.
jeffc
 
Posts: 13
Joined: Wed Jan 13, 2021 5:35 pm

Re: Xcode.app issues (possibly related to com.apple.xacl xat

Postby jeffc » Sat Feb 12, 2022 10:03 pm

Spoke too soon. Xcode still only keeps one ZFS-hosted project in recently opened.
jeffc
 
Posts: 13
Joined: Wed Jan 13, 2021 5:35 pm

Re: Xcode.app issues (possibly related to com.apple.xacl xat

Postby Haravikk » Sun Feb 13, 2022 1:55 am

jeffc wrote:
Haravikk wrote:Sounds like exactly the same issue I'm experiencing on the Xcode side; did you notice any of the other issues I'm seeing, such as the temporary .plist files appearing as recovered items in trash after you've logged out and back in again? Or are your user accounts located somewhere other than your ZFS datasets?

Also, in your issue you mention Xcode only remembering one recent item, I'm actually noticing the same thing in Recent Items sub-menu of the Apple menu; I only have a single entry under Documents, and my list of Servers is out of date (not showing servers that I've connected to today). However my list of recent Applications seems correct.

My user accounts are located on APFS and (therefore?) I do not have .plist files appearing as recovered items in trash. I don't have the other problems either, probably for the same reason.

Ah, well I'm definitely curious if anyone else is running user accounts from ZFS then.

I just logged into an account today and found a Recovered file folder with 11,678 temporary copies mostly of knowledge-agent.plist which was very weird, all from various dates during the week (I last restarted last Saturday iirc). Might account for why some of my backups are larger than expected if macOS services are writing and re-writing a bunch of plist files, but the question is why?

I've taken a look under the .TemporaryItems folder (in volume root) and within that is a folder for the user, and in there are a bunch of new copies of the knowledge-agent.plist along with a bunch of others. After a bit of searching I've found a bunch of Sandbox related console messages that seem related to it, looking like:

Code: Select all
error   11:26:16.798186+0000   kernel   Sandbox: cfprefsd(1779) System Policy: deny(1) file-write-owner /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/knowledge-agent.plist.cA2aDXT
error   11:26:16.798217+0000   kernel   Sandbox: cfprefsd(1779) System Policy: deny(1) file-write-mode /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/knowledge-agent.plist.cA2aDXT
error   11:26:16.847455+0000   kernel   Sandbox: cfprefsd(1779) System Policy: deny(1) file-write-owner /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/knowledge-agent.plist.cA2aDXT
error   11:26:16.847515+0000   kernel   Sandbox: cfprefsd(1779) System Policy: deny(1) file-write-mode /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/knowledge-agent.plist.cA2aDXT
error   11:26:16.847742+0000   kernel   Sandbox: cfprefsd(1779) System Policy: deny(1) file-write-unlink /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/knowledge-agent.plist.cA2aDXT


Having discovered these I believe I've solved this particular problem by granting cfprefsd full disk access (I couldn't seem to give it just external disk access which I believe is what it really needed), and that appears to have stopped those particular errors and there are no more plists appearing in .TemporaryItems anymore (hopefully). I'll see what impact that has on other processes and issues I've been noticing, though I'm not sure why I should need to have done this; my user accounts always used to be located on a separate volume (not individual ones like I'm now using, but a separate APFS Users volume) and it never needed cfprefsd never needed special treatment before.

I can't be sure if this is related to the Xcode issues, but it feels like they could be; it's possible Xcode or some other process needs to be given external or full disk access, but I haven't figured out which. I'll try enabling developer mode so I can get work done in the mean time, but it'd be nice to figure out what the problem really as, to see if we can figure out why ZFS specifically is being affected; why would the sandbox be blocking writes on a ZFS volume but not an APFS one?

Of course this still potentially points to a com.apple.macl related issue, as the purpose of that attribute is supposed to be to avoid the need for expanded disk access, so I think I still need a way to debug why it's not working as intended?
Haravikk
 
Posts: 74
Joined: Tue Mar 17, 2015 4:52 am

Re: Xcode.app issues (possibly related to com.apple.macl xat

Postby Haravikk » Mon Feb 14, 2022 6:50 am

So it seems like the issue is definitely limited to ZFS datasets; I tried my most affected user (the one with the Xcode projects) on an HFS+ formatted zvol with the exact same data, mounted at the same location (/Users/haravikk) and the issue is gone along with all the other issues I've been experiencing, all of which appear to be sandbox related.

That definitely seems to point to something sandbox related not working properly on a ZFS dataset compared to a normal Mac filesystem, and something that's not being mimicked with com.apple.mimic=hfs set; but I'm currently at my limit of what I know how to debug. Any ideas how I might get more information about what exactly is causing the macOS sandbox to reject filesystem related requests that should be allowed?

My gut feeling is that it still might be com.apple.macl related as the affected files all seem to have it, and unaffected files don't; could it that be that whatever method the macOS sandbox uses to check for this attribute isn't returning correctly on a ZFS dataset? As I said before, the xattr command line tool seems to be working as expected, but its possible there's another method to access attributes that is where the bug is creeping in?
Haravikk
 
Posts: 74
Joined: Tue Mar 17, 2015 4:52 am

Re: Xcode.app issues (possibly related to com.apple.macl xat

Postby Haravikk » Tue Feb 15, 2022 8:43 am

I'm still trying to debug this; I encountered basically the same issue with TextEdit, though it seems to only currently affect certain files, and only after attempting to edit them for a second time.

Here's the relevant error in Console.app:

Code: Select all
Sandbox: TextEdit(19485) System Policy: deny(1) file-read-data /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk Mistral~~previous-1.txt


And here's the output of fs_usage on TextEdit at the time (I was trying to revert changes to the file and got an error telling me I don't have permission):

Code: Select all
16:32:34.873235  stat64                                 C/Resources/en_GB.lproj/NSAlertPanel.nib                                                                    0.000043   TextEdit.2431174
16:32:34.873283  open              F=15       (R___________)  C/Resources/en_GB.lproj/NSAlertPanel.nib                                                              0.000046   TextEdit.2431174
16:32:34.873287  fstat64           F=15                                                                                                                             0.000003   TextEdit.2431174
16:32:34.873297  mmap              F=15   A=0x0114a67000      O=0x00000000        B=0x4000             <READ>                                                       0.000010   TextEdit.2431174
16:32:34.873302  close             F=15                                                                                                                             0.000005   TextEdit.2431174
16:32:34.873642    PgIn[A]         D=0x00256442  B=0x4000   /dev/disk5s1  C/Resources/en_GB.lproj/NSAlertPanel.nib                                                  0.000314 W TextEdit.2431174
16:32:34.873678  PAGE_IN_FILE      A=0x0114a67000                                                                                                                   0.000372   TextEdit.2431174
16:32:34.873689  PAGE_IN_FILE      A=0x0114a6a000                                                                                                                   0.000003   TextEdit.2431174
16:32:34.873692  PAGE_IN_FILE      A=0x0114a69000                                                                                                                   0.000003   TextEdit.2431174
16:32:34.874110  PAGE_IN_FILE      A=0x0114a68000                                                                                                                   0.000005   TextEdit.2431174
16:32:36.071498  lstat64                                /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt                0.000082   TextEdit.2431174
16:32:36.074449  statfs64                               /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt                0.000055   TextEdit.2431174
16:32:36.074479  lstat64                                /Users/haravikk/.TemporaryItems                                                                               0.000025   TextEdit.2431174
16:32:36.074499  lstat64                                /Users/haravikk/.TemporaryItems/folders.503                                                                   0.000019   TextEdit.2431174
16:32:36.074518  lstat64                                /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems                                                    0.000018   TextEdit.2431174
16:32:36.074526  access                       (___F)    /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems                                                    0.000007   TextEdit.2431174
16:32:36.074560  getattrlist                            /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems                                                    0.000016   TextEdit.2431174
16:32:36.074972  mkdir                                  /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)               0.000321   TextEdit.2431174
16:32:36.075003  fsctl                                  /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)               0.000029   TextEdit.2431174
16:32:36.075059  getattrlist            [  2]           folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000024   TextEdit.2431174
16:32:36.075126  stat64                                 formation/25B40D2A-49D1-4FFC-B9D5-582C12509A97.genstore.noindex/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000045   TextEdit.2431174
16:32:36.075172  getxattr               [ 93]           formation/25B40D2A-49D1-4FFC-B9D5-582C12509A97.genstore.noindex/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000045   TextEdit.2431174
16:32:36.075199  stat64                                 /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)               0.000017   TextEdit.2431174
16:32:36.075211  statfs64                               formation/25B40D2A-49D1-4FFC-B9D5-582C12509A97.genstore.noindex/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000011   TextEdit.2431174
16:32:36.075227  getattrlist                            /Users/haravikk                                                                                               0.000016   TextEdit.2431174
16:32:36.075244  lstat64                                formation/25B40D2A-49D1-4FFC-B9D5-582C12509A97.genstore.noindex/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000012   TextEdit.2431174
16:32:36.075252  lstat64                [  2]           folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000008   TextEdit.2431174
16:32:36.075268  fstatat64                              formation/25B40D2A-49D1-4FFC-B9D5-582C12509A97.genstore.noindex/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000011   TextEdit.2431174
16:32:36.075284  lstat64                [  2]           folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000008   TextEdit.2431174
16:32:36.075292  stat_extended64        [  2]           folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000007   TextEdit.2431174
16:32:36.075308  lstat_extended64                       formation/25B40D2A-49D1-4FFC-B9D5-582C12509A97.genstore.noindex/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000014   TextEdit.2431174
16:32:36.075357  open              F=15       (R___________)  ion/25B40D2A-49D1-4FFC-B9D5-582C12509A97.genstore.noindex/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000047   TextEdit.2431174
16:32:36.075379  lstat64                [  2]           folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000008   TextEdit.2431174
16:32:36.075382  fstatfs64         F=15                                                                                                                             0.000003   TextEdit.2431174
16:32:36.075576  open_dprotected   F=16       (_WC__E__F___)  s.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000193   TextEdit.2431174
16:32:36.075579  fcntl             F=15  <CACHING OFF>                                                                                                              0.000002   TextEdit.2431174
16:32:36.075579  fcntl             F=16  <CACHING OFF>                                                                                                              0.000001   TextEdit.2431174
16:32:36.075580  fcntl             F=16  <CMD=76>                                                                                                                   0.000001   TextEdit.2431174
16:32:36.075630  flistxattr        F=16                                                                                                                             0.000015   TextEdit.2431174
16:32:36.075636  flistxattr        F=16                                                                                                                             0.000005   TextEdit.2431174
16:32:36.075642  flistxattr        F=15                                                                                                                             0.000006   TextEdit.2431174
16:32:36.075648  flistxattr        F=15                                                                                                                             0.000005   TextEdit.2431174
16:32:36.075680  fgetxattr         F=15                                                                                                                             0.000031   TextEdit.2431174
16:32:36.075705  fgetxattr         F=15                                                                                                                             0.000024   TextEdit.2431174
16:32:36.075790  fsetxattr         F=16                                                                                                                             0.000084   TextEdit.2431174
16:32:36.075819  fgetxattr         F=15                                                                                                                             0.000027   TextEdit.2431174
16:32:36.075844  fgetxattr         F=15                                                                                                                             0.000025   TextEdit.2431174
16:32:36.075899  fsetxattr         F=16                                                                                                                             0.000054   TextEdit.2431174
16:32:36.075927  fgetxattr         F=15                                                                                                                             0.000027   TextEdit.2431174
16:32:36.075951  fgetxattr         F=15                                                                                                                             0.000024   TextEdit.2431174
16:32:36.076005  fsetxattr         F=16                                                                                                                             0.000053   TextEdit.2431174
16:32:36.076033  fgetxattr         F=15                                                                                                                             0.000026   TextEdit.2431174
16:32:36.076057  fgetxattr         F=15                                                                                                                             0.000024   TextEdit.2431174
16:32:36.076116  fsetxattr         F=16                                                                                                                             0.000058   TextEdit.2431174
16:32:36.076143  fgetxattr         F=15                                                                                                                             0.000026   TextEdit.2431174
16:32:36.076167  fgetxattr         F=15                                                                                                                             0.000023   TextEdit.2431174
16:32:36.076220  fsetxattr         F=16                                                                                                                             0.000053   TextEdit.2431174
16:32:36.076248  fgetxattr         F=15                                                                                                                             0.000026   TextEdit.2431174
16:32:36.076271  fgetxattr         F=15                                                                                                                             0.000023   TextEdit.2431174
16:32:36.076327  fsetxattr         F=16                                                                                                                             0.000055   TextEdit.2431174
16:32:36.076333  fstatfs64         F=15                                                                                                                             0.000004   TextEdit.2431174
16:32:36.076336  fstatfs64         F=16                                                                                                                             0.000002   TextEdit.2431174
16:32:36.076340  fstat64           F=16                                                                                                                             0.000003   TextEdit.2431174
16:32:36.076348  fcntl             F=16  <PREALLOCATE>                                                                                                              0.000007   TextEdit.2431174
16:32:36.076845  read              F=15   B=0x20000                                                                                                                 0.000497   TextEdit.2431174
16:32:36.076893  write             F=16   B=0x20000                                                                                                                 0.000047   TextEdit.2431174
16:32:36.077364  read              F=15   B=0x20000                                                                                                                 0.000470   TextEdit.2431174
16:32:36.077410  write             F=16   B=0x20000                                                                                                                 0.000045   TextEdit.2431174
16:32:36.077741  read              F=15   B=0xfc76                                                                                                                  0.000330   TextEdit.2431174
16:32:36.077793  write             F=16   B=0xfc76                                                                                                                  0.000051   TextEdit.2431174
16:32:36.077796  read              F=15   B=0x0                                                                                                                     0.000002   TextEdit.2431174
16:32:36.077813  ftruncate         F=16   O=0x0200000004fc76                                                                                                        0.000016   TextEdit.2431174
16:32:36.077844  fstat64_extended  F=16                                                                                                                             0.000023   TextEdit.2431174
16:32:36.077973  fchmod_extended   F=16  <r--r--r-->                                                                                                                0.000127   TextEdit.2431174
16:32:36.078012  fsetattrlist      F=16                                                                                                                             0.000037   TextEdit.2431174
16:32:36.078052  fchown            F=16                                                                                                                             0.000039   TextEdit.2431174
16:32:36.078100  fchmod            F=16  <r--r--r-->                                                                                                                0.000048   TextEdit.2431174
16:32:36.078104  fstat64           F=16                                                                                                                             0.000003   TextEdit.2431174
16:32:36.078141  fchflags          F=16  <CLEAR_ALL_FLAGS>                                                                                                          0.000037   TextEdit.2431174
16:32:36.078146  fstat64           F=15                                                                                                                             0.000004   TextEdit.2431174
16:32:36.078158  fstat64_extended  F=16                                                                                                                             0.000010   TextEdit.2431174
16:32:36.078209  lstat64                                folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000049   TextEdit.2431174
16:32:36.078251  getxattr                               folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000041   TextEdit.2431174
16:32:36.078311  chmod             <rw-r--r-->          folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000059   TextEdit.2431174
16:32:36.078391  removexattr                            folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000079   TextEdit.2431174
16:32:36.078460  removexattr                            folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000069   TextEdit.2431174
16:32:36.078515  removexattr                            folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000054   TextEdit.2431174
16:32:36.078577  removexattr                            folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000061   TextEdit.2431174
16:32:36.078637  chmod             <rw-rw-rw->          folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000059   TextEdit.2431174
16:32:36.078687  chflags           <CLEAR_ALL_FLAGS>  s/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000050   TextEdit.2431174
16:32:36.078711  getattrlist                            formation/25B40D2A-49D1-4FFC-B9D5-582C12509A97.genstore.noindex/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000023   TextEdit.2431174
16:32:36.078756  setattrlist                            folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000044   TextEdit.2431174
16:32:36.078782  close             F=15                                                                                                                             0.000022   TextEdit.2431174
16:32:36.078794  close             F=16                                                                                                                             0.000012   TextEdit.2431174
16:32:36.078859  lstat64                                /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt                0.000026   TextEdit.2431174
16:32:36.078925  getattrlist                            /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt                0.000027   TextEdit.2431174
16:32:36.078969  fsgetpath                              /Users/haravikk/Library/Application Support/endless-sky/saves                                                 0.000027   TextEdit.2431174
16:32:36.079018  getattrlist                            folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000027   TextEdit.2431174
16:32:36.079054  access_extended                        /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt                0.000019   TextEdit.2431174
16:32:36.079133  open                   [  1] (R___________)  /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt          0.000064   TextEdit.2431174
16:32:36.079185  fstatat64                              [-2]//Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)          0.000016   TextEdit.2431174
16:32:36.079249  setattrlist                            /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)               0.000062   TextEdit.2431174
16:32:36.079292  open              F=15       (R_____N____X)  /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)         0.000042   TextEdit.2431174
16:32:36.079323  getattrlistbulk                        BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt                                                                    0.000029   TextEdit.2431174
16:32:36.079327  getattrlistbulk                                                                                                                                    0.000002   TextEdit.2431174
16:32:36.079332  close             F=15                                                                                                                             0.000005   TextEdit.2431174
16:32:36.079347  lstat64                                folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000013   TextEdit.2431174
16:32:36.079514  unlink                                 folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/BAC76723-26B6-4BC2-8765-9AE1B3A38DB0.txt    0.000166   TextEdit.2431174
16:32:36.079537  lstat64                                /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)               0.000021   TextEdit.2431174
16:32:36.079652  rmdir                                  /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)               0.000115   TextEdit.2431174
16:32:36.080106  stat64                                 C/Resources/en_GB.lproj/NSAlertPanel.nib                                                                    0.000034   TextEdit.2431174
16:32:36.080162  open              F=15       (R___________)  C/Resources/en_GB.lproj/NSAlertPanel.nib                                                              0.000053   TextEdit.2431174
16:32:36.080167  fstat64           F=15                                                                                                                             0.000005   TextEdit.2431174
16:32:36.080185  mmap              F=15   A=0x0114e46000      O=0x00000000        B=0x4000             <READ>                                                       0.000017   TextEdit.2431174
16:32:36.080190  close             F=15                                                                                                                             0.000005   TextEdit.2431174
16:32:36.109195  map_fd            F=259                                                                                                                            0.000001   TextEdit.2431174
16:32:38.367111  getattrlist                            /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt                0.000069   TextEdit.2431174
16:32:38.367308  getattrlist                            /Users/haravikk/Library/Application Support/endless-sky/saves                                                 0.000040   TextEdit.2434929
16:32:38.367376  statfs64                               /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt                0.000018   TextEdit.2434929
16:32:38.367395  lstat64                                /Users/haravikk/.TemporaryItems                                                                               0.000015   TextEdit.2434929
16:32:38.367414  lstat64                                /Users/haravikk/.TemporaryItems/folders.503                                                                   0.000018   TextEdit.2434929
16:32:38.367434  lstat64                                /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems                                                    0.000020   TextEdit.2434929
16:32:38.367443  access                       (___F)    /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems                                                    0.000008   TextEdit.2434929
16:32:38.367470  getattrlist                            /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems                                                    0.000013   TextEdit.2434929
16:32:38.367910  mkdir                                  /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)               0.000401   TextEdit.2434929
16:32:38.367942  fsctl                                  /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)               0.000031   TextEdit.2434929
16:32:38.388004  open              F=15       (_WC_T_______)  s/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/Haravikk~~previous-1.txt    0.000407   TextEdit.2434929
16:32:38.388202  write             F=15   B=0x4fc76                                                                                                                 0.000194   TextEdit.2434929
16:32:38.457307  fsync             F=15                                                                                                                             0.069103   TextEdit.2434929
16:32:38.457341  close             F=15                                                                                                                             0.000032   TextEdit.2434929
16:32:38.457539  chmod             <rw-r--r-->          ryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/Haravikk~~previous-1.txt    0.000164   TextEdit.2434929
16:32:38.457587  getattrlist                            ryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/Haravikk~~previous-1.txt    0.000030   TextEdit.2434929
16:32:38.457736  setxattr                               ryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/Haravikk~~previous-1.txt    0.000099   TextEdit.2434929
16:32:38.457792  utimes                                 ryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/Haravikk~~previous-1.txt    0.000053   TextEdit.2434929
16:32:38.457853  lstat64                                /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt                0.000028   TextEdit.2434929
16:32:38.457918  getattrlist                            /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt                0.000030   TextEdit.2434929
16:32:38.457957  fsgetpath                              /Users/haravikk/Library/Application Support/endless-sky/saves                                                 0.000021   TextEdit.2434929
16:32:38.458007  getattrlist                            ryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/Haravikk~~previous-1.txt    0.000028   TextEdit.2434929
16:32:38.458044  access_extended                        /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt                0.000020   TextEdit.2434929
16:32:38.458109  open                   [  1] (R___________)  /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt          0.000052   TextEdit.2434929
16:32:38.458166  fstatat64                              ryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/Haravikk~~previous-1.txt    0.000016   TextEdit.2434929
16:32:38.458383  unlink                                 ryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)/Haravikk~~previous-1.txt    0.000208   TextEdit.2434929
16:32:38.458532  rmdir                                  /Users/haravikk/.TemporaryItems/folders.503/TemporaryItems/(A Document Being Saved By TextEdit)               0.000132   TextEdit.2434929
16:32:38.458803  open                   [  1] (R___________)  /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt          0.000069   TextEdit.2431174
16:32:38.458922  getattrlist                            /Users/haravikk/Library/Application Support/endless-sky/saves/Haravikk~~previous-1.txt                0.000093   TextEdit.2431174
16:32:38.459898  stat64                                 C/Resources/NSDocumentNonModalAlertView.nib                                                                 0.000037   TextEdit.2431174
16:32:38.459962  open              F=15       (R___________)  C/Resources/NSDocumentNonModalAlertView.nib                                                           0.000062   TextEdit.2431174
16:32:38.459968  fstat64           F=15                                                                                                                             0.000005   TextEdit.2431174
16:32:38.459973  fstatfs64         F=15                                                                                                                             0.000005   TextEdit.2431174
16:32:38.459988  stat64                                 C/Resources/NSDocumentNonModalAlertView.nib                                                                 0.000013   TextEdit.2431174
16:32:38.460006  mmap              F=15   A=0x0114a67000      O=0x00000000        B=0x2000             <READ>                                                       0.000018   TextEdit.2431174


I think it's safe to ignore the .nib related entries (these will be the error message windows) but I didn't want to remove them in case I removed too much.

The file in question is the save file for a game called Endless Sky (modern homage to Escape Velocity), and the game itself works fine and can clearly edit the file without issue, but TextEdit is running into problems. It must have something to do with the file saving API that TextEdit uses, which seems to place the new copy of the file into .TemporaryItems first before moving it into place, but somewhere in this process it is failing on ZFS whereas on APFS/HFS+ it does not.

I'm guessing this is also going to be why Versions doesn't seem to be working properly (to allow me to see older versions of a file) as it's probably implemented via the same API.

What I'm not able to figure out is exactly where the error is occurring; i.e- which of these file system operations is the one being blocked? As I would guess that one of them is probably behaving differently to what the API expects and causing these problems.

Update: Forgot to add a few things. First, in the TextEdit case, closing and reopening the app is enough to be able to edit the file again, though it will need to be force quit to do this once a file is no longer editable. Second, here are the extended attributes on the affected file, as given using xattr -l; I don't see anything strange here, but maybe someone else will?

Code: Select all
com.apple.TextEncoding: utf-8;134217984
com.apple.metadata:kMDLabel_uwnhfetpr5y2smbujmevwu2xve:
00000000  F2 7B 9D 5C EE 0B BE 41 44 99 D7 CE C0 0B A3 E1  |.{.....AD.......|
00000010  79 A2 9F 3E BF 74 44 1E 40 1A 75 40 D0 67 D3 42  |y..>.tD.@.u@.g.B|
00000020  0F 19 A4 C4 74 99 8C DA 63 77 DF F2 A0 E0 C0 22  |....t...cw....."|
00000030  95 A1 85 E5 90 D2 C3 B5 30 5C 25 CD F6 FE D7 B9  |........0.%.....|
00000040  41 35 FF C4 1A F4 7E AA 50 05 E8 24 9F E5 83 53  |A5....~.P..$...S|
00000050  86 79 90 97 AF B9 4B 8C 2B                       |.y....K.+|
00000059
com.apple.lastuseddate#PS:
00000000  12 DB 0B 62 00 00 00 00 79 54 BF 17 00 00 00 00  |...b....yT......|
00000010
com.apple.macl:
00000000  04 00 2C 1E 41 0B CE 60 40 59 BB C1 D5 24 6A 7B  |..,.A..`@Y...$j{|
00000010  30 28 04 00 08 54 1D 59 18 12 43 4B 99 79 F4 0E  |0(...T.Y..CK.y..|
00000020  30 CC 6C 52 00 00 00 00 00 00 00 00 00 00 00 00  |0.lR............|
00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00                          |........|
00000048
Haravikk
 
Posts: 74
Joined: Tue Mar 17, 2015 4:52 am

Next

Return to General Help

Who is online

Users browsing this forum: No registered users and 31 guests