Why has the MacOs Diagnostic Log shown an asterisk in an application path?
1
vote
0
answers
295
views
SuperDuper! crashed recently, and when looking at the report I found
/Applications/Tools/*/SuperDuper!.app/Contents/MacOS/SuperDuper!
The surprising part is the
*
, which I've never seen before. Under what circumstances does macOS use this?
---
**Lots of background information**
While chasing down why SuperDuper! consistently hangs when quitting after doing a backup, I noticed a peculiar line in this .hang file:
From /Library/Logs/DiagnosticReports/SuperDuper!_2019-06-27-154852_taryn-Palantir-2904.hang
...
OS Version: Mac OS X 10.13.4 (Build 17E199)
Architecture: x86_64
Report Version: 26
Data Source: Stackshots
Command: SuperDuper!
Path: /Applications/Tools/*/SuperDuper!.app/Contents/MacOS/SuperDuper!
Identifier: com.blacey.SuperDuper!
Version: 3.2.5 (119)
...
Note the application's path. Putting aside the weirdness of an exclamation point in a path*, the asterisk at Tools/*/Superduper!.app has me completely perplexed.
I first checked other hang files to see if that was simply an artifact of the logger, but none show a similar behavior:
Command: Arduino
Path: /Volumes/VOLUME/Applications/Tools/Arduino1.8.9.app/Contents/MacOS/Arduino
Command: com.apple.WebKit.WebContent
Path: /System/Library/Frameworks/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.xpc/Contents/MacOS/com.apple.WebKit.WebContent
Process: Console
Path: /Applications/Utilities/Console.app/Contents/MacOS/Console
The asterisk doesn't appear in the finder, nor in shell listings:
Palantir_ethernet:Tools taryn$ pwd
/Applications/Tools
Palantir_ethernet:Tools taryn$ ls -Al
total 129752
...
drwxr-xr-x 3 taryn staff 96 Sep 27 2018 Slack.app/
drwxr-xr-x 3 taryn staff 96 Jul 15 2018 SourceTree.app/
drwxr-xr-x 7 taryn admin 224 Jun 26 15:16 SuperDuper/
drwxr-xr-x@ 3 taryn staff 96 Oct 16 2015 The Hit List.app/
drwxr-xr-x 3 taryn admin 96 May 31 2014 TimeTracker.app/
drwxr-xr-x@ 3 taryn admin 96 Oct 6 2015 TinkerTool.app/
...
(note the '@' by the permissions tells us that there are extended attributes on those files.)
I'd thought momentarily it was an instance of the -F arg of ls.
From 'man ls':
...
-F Display a slash (`/') immediately after each pathname that is a
directory, an asterisk (`*') after each that is executable, an at
sign (@') after each symbolic link, an equals sign (
=') after
each socket, a percent sign (`%') after each whiteout, and a ver-
tical bar (`|') after each that is a FIFO.
...
But that doesn't wash, the asterisk lands in a different spot:
Palantir_ethernet:Tools taryn$ ls -AlF SuperDuper/SuperDuper\!.app/Contents/MacOS/
total 3216
-r-sr-xr-x 1 root staff 34720 Jun 24 22:48 SDAgent*
-rwxr-xr-x 1 taryn staff 445184 Jun 24 22:48 SDCopy*
-rwxr-xr-x 1 taryn staff 94736 Jun 24 22:48 SDDiskTool*
-rwxr-xr-x 1 taryn staff 28176 Jun 24 22:48 SDUtil*
-rwxr-xr-x 1 taryn staff 1036016 Jun 24 22:48 SuperDuper!*
-rwxr-xr-x 1 taryn staff 1036016 Jun 24 22:48 SuperDuper!*
Nor did drilling through the App's folders offer any insight:
Palantir_ethernet:Tools taryn$ ls -AlF SuperDuper/SuperDuper\!.app/Contents
total 32
drwxr-xr-x 24 taryn staff 768 Jun 24 22:48 Frameworks/
drwxr-xr-x 5 taryn staff 160 Jun 24 22:48 Helpers/
-rw-r--r-- 1 taryn staff 5033 Jun 24 22:47 Info.plist
drwxr-xr-x 7 taryn staff 224 Jun 24 22:48 MacOS/
-rw-r--r-- 1 taryn staff 8 Jun 24 22:47 PkgInfo
drwxr-xr-x 53 taryn staff 1696 Jun 24 22:48 Resources/
drwxr-xr-x 3 taryn staff 96 Jun 24 22:48 _CodeSignature/
-rw-r--r-- 1 taryn staff 504 Jun 24 22:48 version.plist
Palantir_ethernet:Tools taryn$ ls -AlF SuperDuper/SuperDuper\!.app
total 0
drwxr-xr-x 10 taryn staff 320 Jun 24 22:48 Contents/
Palantir_ethernet:Tools taryn$ ls -AlF SuperDuper/SuperDuper
ls: SuperDuper/SuperDuper: No such file or directory
Palantir_ethernet:Tools taryn$ ls -AlF SuperDuper
total 32
-rw-r--r-- 1 taryn admin 6148 Jun 23 21:44 .DS_Store
drwxr-xr-x 4 taryn admin 128 Dec 20 2006 Application Support/
drwxr-xr-x@ 4 taryn admin 128 Sep 15 2015 ReadMe.rtfd/
drwxr-xr-x 3 taryn staff 96 Jun 26 15:16 SuperDuper!.app/
-rw-------@ 1 taryn admin 5670 Dec 20 2006 com.blacey.SuperDuper!.plist
Searching the net for stuff like 'MacOS application path asterisk' was fruitless, a few hits reminding us that '*' is a legal char in HFS paths, but you'll need to quote or escape it from the shell. Many hits on wildcard expansion.
So, while I'm still trying to understand the crash, this question is whether such a path element has any purpose.
In normal use, a UNIX OS would take that to mean "expand/enumerate all directories under 'Tools/' which contain a subpath like 'SuperDuper!.app/Contents/MacOS/SuperDuper!' ". Such a usage makes no sense in the context of a log entry that is reporting an explicit known location.
But HFS is a bit weird, in that it is exceptionally permissive of special chars in paths, provided the char is escaped or the path quoted when used from the shell or system calls.
I'm down a classic rabbit hole, I set out to understand a crash, and hours later, I'm still trying to understand how this stupid path got mis-parsed by the logger.
*I've always thought it was bad form to use special chars in paths and files, even though MacOS and HFS/APFS allow it.
Asked by Taryn
(121 rep)
Jun 27, 2019, 10:05 PM
Last activity: Dec 9, 2023, 02:25 AM
Last activity: Dec 9, 2023, 02:25 AM