lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
246 stars 17 forks source link

26158591: Screenshot xattr from El Capitan crashes Lion Spotlight #14649

Open openradar-mirror opened 8 years ago

openradar-mirror commented 8 years ago

Description

Summary: Screenshot PNG file created on 10.11.4 El Capitan via Shift + Command + 3 or Shift + Command + 4 was copied to Mac with 10.7.5 Lion. Metadata were preserved because screenshot was inside zip archive created via Finder. After Extracting screenshot on 10.7.5 Spotlight (namely mds process) started crashing:

DebugSymbols was unable to start a spotlight query: spotlight is not responding or disabled. (com.apple.metadata.mds[39]) Job appears to have crashed: Segmentation fault: 11

I identified the culprit. It's xattr attribute com.apple.metadata:kMDItemScreenCaptureGlobalRect After deleting kMDItemScreenCaptureGlobalRect with "xattr -d com.apple.metadata:kMDItemScreenCaptureGlobalRect ScreenShot.png" mds stopped crashing.

kMDItemScreenCaptureGlobalRect is new in OS X 10.11 El Capinan. Screenshots created in previous versions of OS X (I tested 10.7, 10.8, 10.9 and 10.10) does NOT contain kMDItemScreenCaptureGlobalRect attribute.

10.11.4 Screenshot -- COPY --> 10.7.5 | CRASH 10.11.4 Screenshot -- COPY --> 10.8.5 | OK 10.8.5 Screenshot -- COPY --> 10.7.5 | OK 10.9.5 Screenshot -- COPY --> 10.7.5 | OK 10.10.5 Screenshot -- COPY --> 10.7.5 | OK

Steps to Reproduce:

  1. Create .png screenshot on 10.11.4 using Shift + Command + 3 or Shift + Command + 4
  2. Archive screenshot in Finder into .zip archive preserving its metadata
  3. Copy archive to 10.7.5 Mac
  4. Extract screenshot from .zip archive

Expected Results: Nothing extraordinary happens

Actual Results: mds process starts crashing with Segmentation fault: 11

Version: 10.11.4 10.7.5

Notes: After deleting kMDItemScreenCaptureGlobalRect with "xattr -d com.apple.metadata:kMDItemScreenCaptureGlobalRect ScreenShot.png" mds stopped crashing.

I know Apple does not update old OS X versions but in this case there should be something done. A lot of Macs are stuck on 10.7.5 including first gen Mac Pros.

Configuration: I was able to reproduce this issue both in real world scenario (which led me to this problem) and in VMware Fusion OS X virtual machines (freshly installed OS X).

Product Version: 10.11.4, 10.7.5 Created: 2016-05-07T23:13:43.592830 Originated: 2016-08-05T00:00:00 Open Radar Link: http://www.openradar.me/26158591

openradar-mirror commented 8 years ago

Modified: 2016-05-07T23:13:43.593040