disorderly representations of files in apps such as Console

Moderators: jhartley, MSR734, nola

disorderly representations of files in apps such as Console

Post by grahamperrin » Thu Sep 20, 2012 2:41 am

In the screenshots that follow, focus on the listings to the left of the window of the app. Each listed item is a representation of a file.

For files that are on HFS Plus: no problem.

For files that are on ZFS: representations are disorderly.

The problem was first noted in July 2012, after I began using a Ten's Complement ZEVO for my home directory. I have attempted numerous workarounds, none succeed.

2012-07-14 09-02-52 Console.png
.aslquery files stored on ZEVO ZFS appear disorderly in Console.app
2012-07-14 09-02-52 Console.png (159.51 KiB) Viewed 160 times


2012-09-20 07-43-30 Console.png
The problem is reproduced with ZEVO Community Edition 1.1.
2012-09-20 07-43-30 Console.png (162.86 KiB) Viewed 160 times


2012-09-20 08-09-42 Lingon 2.2.1 with my agents on ZEVO.png
Files in my ZFS home directory appear disorderly (uppermost section, MY AGENTS). No such problem with files where jhfs+ is used (USERS AGENTS, USERS DAEMONS).
2012-09-20 08-09-42 Lingon 2.2.1 with my agents on ZEVO.png (107.79 KiB) Viewed 160 times


Environment

MacBookPro5,2

8 GB memory

Mountain Lion

ZEVO Community Edition 1.1

Code: Select all
macbookpro08-centrim:~ gjp22$ zfs get all gjp22
NAME   PROPERTY              VALUE                  SOURCE
gjp22  type                  filesystem             -
gjp22  creation              Sat Jul 14 11:13 2012  -
gjp22  used                  344Gi                  -
gjp22  available             219Gi                  -
gjp22  referenced            292Gi                  -
gjp22  compressratio         1.16x                  -
gjp22  mounted               yes                    -
gjp22  quota                 none                   default
gjp22  reservation           none                   default
gjp22  recordsize            128Ki                  default
gjp22  mountpoint            /Volumes/gjp22         default
gjp22  checksum              on                     default
gjp22  compression           off                    local
gjp22  atime                 off                    local
gjp22  devices               on                     default
gjp22  exec                  on                     default
gjp22  setuid                on                     default
gjp22  readonly              off                    default
gjp22  snapdir               visible                local
gjp22  canmount              on                     default
gjp22  copies                1                      default
gjp22  version               5                      -
gjp22  utf8only              on                     -
gjp22  normalization         formD                  -
gjp22  casesensitivity       insensitive            -
gjp22  refquota              none                   default
gjp22  refreservation        none                   default
gjp22  primarycache          all                    default
gjp22  secondarycache        all                    default
gjp22  usedbysnapshots       51.2Gi                 -
gjp22  usedbydataset         292Gi                  -
gjp22  usedbychildren        242Mi                  -
gjp22  usedbyrefreservation  0                      -
gjp22  logbias               latency                default
gjp22  sync                  standard               default
macbookpro08-centrim:~ gjp22$
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: disorderly representations of files in apps such as Cons

Post by dbrady » Sun Sep 23, 2012 10:54 am

This is a bug in the Console app. File names are not guaranteed to be returned in any predetermined order. For Latin names, HFS+ case-insensitive will appear in dictionary order. But this doesn't hold true for case-sensitive HFS+ or non-Latin names. The posix APIs don't guarantee any ordering for readdir operations. I suspect that even HFS+ would appear out of order in the Console for non-Latin languages.
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

Re: disorderly representations of files in apps such as Cons

Post by grahamperrin » Sun Sep 23, 2012 12:15 pm

Thanks – I suspect a bug in Console (reported to Apple some time ago) but this continues to puzzle me.

casesensitivity=insensitive
and in the example below I see only Latin – not in case-insensitive dictionary order.

six queries.png
six queries.png (67.16 KiB) Viewed 143 times


I pasted the six filenames to TextWrangler and checked for gremlins, none found.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: disorderly representations of files in apps such as Cons

Post by dbrady » Sun Sep 23, 2012 3:22 pm

To see the true on-disk directory order you can use ls(1) with "-f".
example (on zfs file system):
Code: Select all
$ touch a z b s c x d
$ ls
a   b   c   d   s   x   z
$ ls -f
.   ..   a   x   b   s   z   d   c
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

Console alongside results of ls -f, and Lingon

Post by grahamperrin » Sun Sep 23, 2012 9:10 pm

Thanks – this makes sense now (screenshot).

App Store version 3.1.2 of Lingon appears similarly bugged, I might report to the developer in due course. No rush though. (Source for an earlier version is open, for anyone who's interested.)
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

workaround for bug in Console.app

Post by grahamperrin » Tue Oct 02, 2012 1:57 pm

dbrady wrote:This is a bug in the Console app. …


Tentatively worked around by moving the ASLQueries directory to a new subdirectory of the
/private/var/folders/…
area (of the JHFS+ startup volume) for my username – 

Image

– then placing a symlink in the application support area in my ZEVO home directory. Ah, that's better:

Image
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

cross reference

Post by grahamperrin » Thu Oct 11, 2012 1:23 am

… Lingon 2.2.1 with my agents on ZEVO …


For reference only: versions of Lingon and Lingon 3 – with a link to screenshots of 1.2, which is without the bug.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: disorderly representations of files in apps such as Cons

Post by grahamperrin » Mon Nov 05, 2012 12:06 pm

For reference only: I added Console and Lingon to the shortlist at viewtopic.php?t=1498

Also this afternoon I sent an e-mail to the support address for Lingon.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

feedback from Peter Borg

Post by grahamperrin » Sun Nov 11, 2012 10:24 am

The developer of Lingon thanks us and:

> … will look into how it can be fixed in a future version. …
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

A better workaround for the bug in Console.app

Post by grahamperrin » Sun Dec 30, 2012 7:09 am

grahamperrin wrote:Tentatively worked around by moving the ASLQueries directory to a new subdirectory of the
/private/var/folders/…
area (of the JHFS+ startup volume) for my username …


That was not a good workaround! I realised that the contents of
/private/var/folders
are removed when the OS is installed; and that Time Machine does not back up that area.

Better

Code: Select all
sh-3.2$ sudo mkdir /Library/Application\ Support/Console
sh-3.2$ sudo mkdir /Library/Application\ Support/Console/ASLQueries


Then:

  1. give yourself write privileges to that new ASLQueries folder
  2. create a symbolic link.

The end result, for me (user gjp22):

Code: Select all
sh-3.2$ ls -dl ~/Library/Application\ Support/Console/ASLQueries
lrwxr-xr-x  1 gjp22  wheel  47 30 Dec 12:02 /Volumes/gjp22/Library/Application Support/Console/ASLQueries -> /Library/Application Support/Console/ASLQueries


Code: Select all
sh-3.2$ ls -del /Library/Application\ Support/Console/ASLQueries
drwxr-xr-x+ 55 root  admin  1870 30 Dec 11:59 /Library/Application Support/Console/ASLQueries
 0: user:gjp22 allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom


Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 1 guest

cron