Skip to content

xcdevice is generating a dyld_shared_cache_arm64 recovered file every ~30 seconds while IDE open #56826

Closed
@seekcx

Description

@seekcx

Steps to Reproduce

  1. Open Android Studio or VSCode,Make sure the flutter process is running.
  2. Wait for the hard drive to become full.
  3. Restart your computer.
  4. Open the trash.

Logs

null

Screenshot

image

[✓] Flutter (Channel stable, v1.17.0, on Mac OS X 10.15.4 19E287, locale zh-Hans-CN)
    • Flutter version 1.17.0 at /Users/abel/develop/flutter
    • Framework revision e6b34c2b5c (8 days ago), 2020-05-02 11:39:18 -0700
    • Engine revision 540786dd51
    • Dart version 2.8.1


[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/abel/Library/Android/sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = /Users/abel/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4.1, Build version 11E503a
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[!] IntelliJ IDEA Ultimate Edition (version 2019.2.4)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.45.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.10.1

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

Activity

trinicoconutman

trinicoconutman commented on May 11, 2020

@trinicoconutman

I am having the same exact problem. I am using the latest flutter and VS Code. It takes about an hour to burn through 100 GB on my MacbookAir 2020.

seekcx

seekcx commented on May 11, 2020

@seekcx
Author

I think I may have solved this problem.

Before there was a problem, I used CleanMyMac to clean up some files.
I wonder if some temporary files have been cleaned up, and Flutter cannot create these files properly.

I opened XCode and observed the hard disk space, which was reduced by about 4G, no longer.

Open Android Studio or VSCode again, keep the Flutter process running, and the hard disk space will not continue to decrease.

The problem seems to be solved.

trinicoconutman

trinicoconutman commented on May 11, 2020

@trinicoconutman

Hmm, i'm not quite following what the solution was. Did running XCode fix something? Just running VSCode and having the flutter process running seems to be the same process that had the issue before. What changed?

seekcx

seekcx commented on May 11, 2020

@seekcx
Author

I don't know the details, but after I run XCode, the problem is indeed solved.

If the problem is not solved, here is another method you can try.

VladyslavBondarenko

VladyslavBondarenko commented on May 11, 2020

@VladyslavBondarenko

@trinicoconutman
could you provide your flutter doctor -v and investigate what files/directories start to consume so much space?
are you experiencing this with any app? with another flutter version?

VladyslavBondarenko

VladyslavBondarenko commented on May 11, 2020

@VladyslavBondarenko

@trinicoconutman
consider to file a separate issue with provided info about your case.
@seekcx
I'm going to closed the current one, since it's solved and hardly workable

trinicoconutman

trinicoconutman commented on May 11, 2020

@trinicoconutman

Ok, opening XCode worked. Thanks guys.

XinwenCheng

XinwenCheng commented on May 13, 2020

@XinwenCheng

I faced this very issue, and problem was temporarily solved after I ran XCode, but once I flutter run to iOS device, it happened again.

flutter doctor -v

[✓] Flutter (Channel stable, v1.17.0, on Mac OS X 10.14.6 18G4032, locale en-CN)
    • Flutter version 1.17.0 at /Volumes/Transcend/Development/flutter
    • Framework revision e6b34c2b5c (11 days ago), 2020-05-02 11:39:18 -0700
    • Engine revision 540786dd51
    • Dart version 2.8.1

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Volumes/Transcend/Development/AndroidSDK
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.9.0

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.45.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.10.1

[✓] Connected device (1 available)
    • SM G9500 • 10.10.201.121:5555 • android-arm64 • Android 9 (API 28)

• No issues found!
wavecommander

wavecommander commented on May 13, 2020

@wavecommander

I originally posted this on issue #56270, but it was marked off-topic.
I believe this is a more correct spot.

I also experienced my disk being filled up completely by "A Document Being Saved by xcdevice #" files upon attaching an iOS device.

For context, I installed Flutter on macOS 10.14, then upgraded to macOS 10.15, the latest Xcode, and the latest Flutter 1.17 using flutter upgrade.

Reinstalling Xcode did not fix the problem for me.
I think this was happening because I did not update CocoaPods along with all of the other tools.
Regardless, I played it safe and 'reinstalled' Flutter as well as CocoaPods.

These steps solved my problem:

  • Delete Flutter framework directory
  • Uninstall CocoaPods completely
  • Clone Flutter repo from Github stable branch
  • Run flutter doctor (make sure you still have it in your path)
  • Install CocoaPods when prompted with sudo gem install cocoapods
  • Run pod setup after CocoaPods finished installing
jmagman

jmagman commented on May 13, 2020

@jmagman
Member

xcdevice is the Xcode command line tool Flutter uses to figure out which devices are attached to your host machine. I'm not sure how CocoaPods could be related.

I'm guessing the dyld_shared_cache_arm64 are something xcdevice is writing to tmp (maybe a copy of ~/Library/Developer/Xcode/iOS\ DeviceSupport/<>/Symbols/System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64), but the process is getting killed before it can be deleted? Or perhaps it never properly cleans up this file and Flutter is running it so often (every time your app runs) that it's just now noticeable. Seems like Xcode knows how to clean up those files and a launch of Xcode temporarily "fixes" it.

wavecommander

wavecommander commented on May 13, 2020

@wavecommander

@jmagman My hunch is that the process cleans up normally, but something is making it crash, leaving these files midway through, and the invoker is simply ignoring the crash, trying again and again in a loop while the device is connected.
I didn't have to run my app for this to occur, the moment I plugged it in, and the plugins and tools etc. are trying to communicate with the device, that is when it started filling my disk.

66 remaining items

added and removed on Jun 15, 2020
pcsosinski

pcsosinski commented on Jun 16, 2020

@pcsosinski

beta is 1.19.0-4.1.pre, so this is fixed on beta channel

psimondk

psimondk commented on Jun 17, 2020

@psimondk
Shoshin23

Shoshin23 commented on Jun 17, 2020

@Shoshin23
pcsosinski

pcsosinski commented on Jun 17, 2020

@pcsosinski

@jmagman this looks to require a manual merge into 1.17 (branch: flutter-1.17-candidate.3)

can you take a look at what that merge looks like? seems like most of the conflicts are in tests.

jmagman

jmagman commented on Jun 17, 2020

@jmagman
Member
sstadtl

sstadtl commented on Jun 17, 2020

@sstadtl

@Shoshin23
Have you tried opening Xcode => Window => Devices => let the sync finish => reboot ?
that fixed it for me
(and all dev-devices updated to the latest ios version)

psimondk

psimondk commented on Jun 17, 2020

@psimondk
jmagman

jmagman commented on Jun 17, 2020

@jmagman
Member

This issue was specifically tracking the xcdevice dyld_shared_cache_arm64 generation. There's a PR at #59695 to hotfix to stable.

If you are seeing another issue (related to Android, doctor not finding simctl, whatever), please file it so we can take a look. Locking for now to avoid noise.

locked as resolved and limited conversation to collaborators on Jun 17, 2020
pcsosinski

pcsosinski commented on Jun 18, 2020

@pcsosinski

fixed in 1.17.4

added
P0Critical issues such as a build break or regression
and removed on Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Critical issues such as a build break or regressioncustomer: crowdAffects or could affect many people, though not necessarily a specific customer.found in release: 1.17Found to occur in 1.17found in release: 1.18Occurs in 1.18platform-macBuilding on or for macOS specificallyt: xcode"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @iAladdin@jmagman@XinwenCheng@DanTup@sstadtl

      Issue actions

        xcdevice is generating a `dyld_shared_cache_arm64` recovered file every ~30 seconds while IDE open · Issue #56826 · flutter/flutter