Skip to content

(25.11.0) Symsorter does not understand Unreal Engine generated dSyms as they use -fat64 (macOS) #1826

@deathlyrage

Description

@deathlyrage

Environment

Version: 25.11.0

Steps to Reproduce

  1. Build a large unreal engine project in Unreal Engine 5.6 or later. Ensure you do a universal arm64 + x86_64 build.
  2. Attempt to use symsorter to process the symbols for uploading to a S3 bucket
  3. Notice that while dwarfdump can figure out the executable and dsym file. symsorter can't figure out the dsym file and fails
    with 0 debug files.

dwarfdump --uuid PathOfTitans.app/Contents/MacOS/PathOfTitans
UUID: A9C8772D-891A-3511-AB14-C1B9D88D4D75 (x86_64) PathOfTitans.app/Contents/MacOS/PathOfTitans
UUID: 9F137D82-14C4-3FC5-BF96-D995103ABC5C (arm64) PathOfTitans.app/Contents/MacOS/PathOfTitans

dwarfdump --uuid
PathOfTitans.app/Contents/UE/PathOfTitans-Mac-Shipping.app.dSYM
UUID: A9C8772D-891A-3511-AB14-C1B9D88D4D75 (x86_64) PathOfTitans.app/Contents/UE/PathOfTitans-Mac-Shipping.app.dSYM/Contents/Resources/DWARF/PathOfTitans-Mac-Shipping
UUID: 9F137D82-14C4-3FC5-BF96-D995103ABC5C (arm64) PathOfTitans.app/Contents/UE/PathOfTitans-Mac-Shipping.app.dSYM/Contents/Resources/DWARF/PathOfTitans-Mac-Shipping

Expected Result

dsym file is understood by symsorter and processes the debug information.

Actual Result

0 Debug files found.

More Info

I seem to have figured out the root cause, the unreal engine dsym helper script GenerateUniversalDSYM.sh

arches=(`lipo -archs "$1"`)
if [ ${#arches[@]} -gt 1 ]; then
    for i in ${!arches[@]} 
    do
        arch=${arches[$i]}

        echo "Extracting $arch from $1..."
        lipo -extract $arch -output $tempdir/$arch "$1" 

        # Get paths to the extracted binary and the binary inside the dSYM
        dsympaths[$i]="$tempdir/$arch.dSYM"
        binpaths[$i]="$tempdir/$arch.dSYM/Contents/Resources/DWARF/$arch"
    done

    # generate per-arch dSYMs
    for i in ${!arches[@]} 
    do
        arch=${arches[$i]}
        echo "Generating debug symbols (dSYM) for $arch" 
        dsymutil -o $tempdir/$arch.dSYM $tempdir/$arch &    
    done

    wait

    # copy first dSYM, then overwrite DWARF file with lipo
    ditto ${dsympaths[0]} "$2"
    rm "$2/Contents/Resources/DWARF/${arches[0]}"

    echo "Merging architectures '${binpaths[*]}' together into $2"
    lipo ${binpaths[*]} -fat64 -create -output "$2/Contents/Resources/DWARF/${binaryname}"
else
    echo "Using standard dsymutil because the binary was not universal..."
    dsymutil "$1" -o "$2"
fi

For universal binaries, the script:

  • Extracts each arch with lipo -extract.
  • Runs dsymutil per arch → per-arch dSYM bundles (these are fine).
  • Then uses lipo ... -fat64 -create on the per-arch DWARF files to make one big DWARF file.

That -fat64 is the kicker:

  • It tells lipo to emit a “large” fat Mach-O with a 64-bit fat header (used when slices/offsets are huge – which matches your ~5 GB dSYM).
  • Apple’s tools (dwarfdump) understand this just fine → you see UUIDs, so it looks good.
  • But Sentry’s parser (Symbolicator/symsorter) doesn’t support this fat64 header yet, so it treats the file as an unsupported object file:
  • file reports just data.
  • sentry-cli difutil check on that DWARF says “Unsupported file”.
  • symsorter: Sorted 0 debug files.

I would like some help for someone to update symsorter to understand -fat64 format so we can process dsyms.
If needed i can send a private message to someone with a copy of a dropbox link with the game files and dsyms. It needs to be a -distribution universal build to have this problem>

Can anyone confirm if symsorter properly supports -fat64 ?

Thanks,
Matthew
Alderon Games

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions