We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

Kidhack's avatar
Kidhack
Helpful | Level 5
8 years ago

In a "mdworker quit unexpectedly" loop after turning on Smart Sync

Ever since turning on Dropbox Smart Sync, Spotlight has been going nuts and using tons of CPU. The helper app "mdworker" is constantly crashing. Will report back after Dropbox finishes indexing all the Smart Sync files. 

Quit unexpectedly

PS. Funny you can't link Dropbox photos to the image uploader in this forum.

 
  • Hi everyone,

     

     I wanted to give you an update on the issue of mdworker crashing when reading a mismatch in the expected logical vs physical size of PDFs on Mac.

     

    Firstly we've not forgotten about this, a lot of work has been going on in the background to resolve the issue. It has required extensive code re-writing. For those not familiar with the issue, users may see within the logs mdworker crashing. This crash is fairly silent, though will appear in logs. There's no risk to data, but for those who like to inspect clean logs this can cause a lot of noise and may be viewed as sub-optimal. 

     

    Based on the feedback raised by yourselves on this forum we've spent considerable time working toward a fix. We've changed the way we write Smart Sync placeholders (ie the files that look like files, but take up 0kb until recalled) for those on 10.13.5 and later. The new sparse format will not trigger an mdworker crash. 

     

    We've tested within the beta to validate the code and at this point have now rolled the fix / changed behavior out to 100%. 

     

    This is a forward fix, so from now on all and any placeholders created will not suffer this issue. For those who have the placeholders (the empty files with the grey cloud symbol on them) already on their machines there are a few options:

     

    1. Unlink and relink your Dropbox. Note: this will trigger a reindex of content that may take minutes to a few hours depending on your filecount. 
    1. Remove the content, via Selective Sync, then return it. Similarly, but perhaps preferably, this will remove the placeholders then re-add them quickly and non-destructively.

    There are a few other options, but those keen to avoid this error being highlighted in logs can take these steps.

     

    Many thanks for your feedback on this issue here, it's driven a clear change in product. We pay close attention to the feedback surfaced via this channel so if you have other wishes please either add to existing threads, up-vote ideas, or create your own thread to spark discussion or development.

     

  • Ross_S's avatar
    Ross_S
    Icon for Dropbox Staff rankDropbox Staff

    Hi everyone,

     

     I wanted to give you an update on the issue of mdworker crashing when reading a mismatch in the expected logical vs physical size of PDFs on Mac.

     

    Firstly we've not forgotten about this, a lot of work has been going on in the background to resolve the issue. It has required extensive code re-writing. For those not familiar with the issue, users may see within the logs mdworker crashing. This crash is fairly silent, though will appear in logs. There's no risk to data, but for those who like to inspect clean logs this can cause a lot of noise and may be viewed as sub-optimal. 

     

    Based on the feedback raised by yourselves on this forum we've spent considerable time working toward a fix. We've changed the way we write Smart Sync placeholders (ie the files that look like files, but take up 0kb until recalled) for those on 10.13.5 and later. The new sparse format will not trigger an mdworker crash. 

     

    We've tested within the beta to validate the code and at this point have now rolled the fix / changed behavior out to 100%. 

     

    This is a forward fix, so from now on all and any placeholders created will not suffer this issue. For those who have the placeholders (the empty files with the grey cloud symbol on them) already on their machines there are a few options:

     

    1. Unlink and relink your Dropbox. Note: this will trigger a reindex of content that may take minutes to a few hours depending on your filecount. 
    1. Remove the content, via Selective Sync, then return it. Similarly, but perhaps preferably, this will remove the placeholders then re-add them quickly and non-destructively.

    There are a few other options, but those keen to avoid this error being highlighted in logs can take these steps.

     

    Many thanks for your feedback on this issue here, it's driven a clear change in product. We pay close attention to the feedback surfaced via this channel so if you have other wishes please either add to existing threads, up-vote ideas, or create your own thread to spark discussion or development.

     

    • Fabio L.'s avatar
      Fabio L.
      Experienced | Level 12
      Thanks a lot guys! Is this available from the stable 55.4.171 or from the new beta?
      • Ross_S's avatar
        Ross_S
        Icon for Dropbox Staff rankDropbox Staff
        Both.... and you already have it!

        We added the code a while ago, then have been slowly ramping it up with server-side gating. It has now reached 100%, so code already in the build is now live to everyone.
    • afonsopatrao's avatar
      afonsopatrao
      Explorer | Level 4

      I'm having this issue with smartsync and High Sierra (10.13.6). I did what you said (unlink and link it back), but I also tried other solutions: rebuild spotlight; fixing system permissions; reinstalling MacOS. Nothing works: mdworker is constantly crashing, which makes "ReportCrash" process taking enormous CPU usage.

      Maybe the problem got back woth your latest Dropbox release. Please find a sollution: I cannot work without spotlight making its job.

      • Walter's avatar
        Walter
        Icon for Dropbox Staff rankDropbox Staff

        Sorry to hear this RafaelG. Have you tried any troubleshooting steps so far like re-installing the software on the affected device?

        If the issue persists, could you post a screenshot of the exact error you see on your screen so we can investigate further? 

        Thanks so much and welcome to our Community too Rafael!

  • Kidhack's avatar
    Kidhack
    Helpful | Level 5

    Dropbox is done syncing and I restarted, but MDWORKER is still going nuts and unexpectiedly quitting.

     

    I found this code to disable the MDWORKER and it is no longer freaking out. I'm not sure what the impact on Spotlight is by disabling MDWORKER.

     

    In terminal enter the following to...

     

    Disable:
    sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

    Enable:

    sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
    • Kidhack's avatar
      Kidhack
      Helpful | Level 5
      FYI, by disabling MDWORKER, it also disables Spotlight from conducting searches.
      • Ross_S's avatar
        Ross_S
        Icon for Dropbox Staff rankDropbox Staff

        Ok, thanks for letting me know, post back here if the issue re-occurs and we'll look into it. :)

  • Ross_S's avatar
    Ross_S
    Icon for Dropbox Staff rankDropbox Staff

    Kidhack wrote:

    Ever since turning on Dropbox Smart Sync, Spotlight has been going nuts and using tons of CPU. The helper app "mdworker" is constantly crashing. Will report back after Dropbox finishes indexing all the Smart Sync files. 

    Quit unexpectedly

     

    PS. Funny you can't link Dropbox photos to the image uploader in this forum.


    Hi there,

     

     I'll send you an email and follow up with you via support ticket to see if we can get to the bottom of this.

     

    Many thanks for reporting this.

    • Kidhack's avatar
      Kidhack
      Helpful | Level 5

      After using the code above to disable the MDWORKER, it stopped quitting. I enabled it again and it seems to be stable now. Not sure if it just needed to work through everthing or if there was a corrupt file that it got stuck on. Seems ok now, but I'll update if things change.

  • Jtaylor2d's avatar
    Jtaylor2d
    Helpful | Level 5

    Did you ever resolve this'll? I have a user with this problem and it's related to SmartSync. Erased the computer and reinstalled and started immediately again. Just now trying to diagnose further and will report back.

     

    Maybe someone from Dropbox can reach out to me? I'm a Dropbox Partner and I'm nervous to deploy this feature to other clients now.

    • John_Cox's avatar
      John_Cox
      Helpful | Level 6

      Alas, no. It is not as bad as it used to be once all the syncing was finished.

       

      But even now I have a little dialogue box dragged off onto another monitor with the error.

       

      Sigh...

    • AndersHansson's avatar
      AndersHansson
      New member | Level 2

      I solved this issue a while back now.

       

      IIRC all you need to do is to disable OSX Spotlight indexing for the Dropbox folder(s). You can do this from Settings --> Spotlight --> Privacy (tab) and add the Dropbox sync folder(s).

       

      It was some time now so I might have forgotten some details so let me know if it works for you and I'll try to dig a little deeper to see if there was something else I needed to do.

       

      It is indeed a very annoying issue...

       

      EDIT: I now saw that a similar answer was given before. To my knowledge there is no way around disabling Spotlight for the affected folders. However you only need to disable folders actually used with Smart Sync.

      • Jtaylor2d's avatar
        Jtaylor2d
        Helpful | Level 5
        I appreciate your input, but that's not exactly a fix. It certainly prevents the mdworker crashes from happening, but a fix would involve keeping on Spotlight.

        I still need to some more research, but this is a strange issue. I have other users at this same location who use SmartSync on a Mac with Spotlight turned on who don't have any issues. I'm hoping that switching from SmartSync Online back to Local can fix the issue until further information from Dropbox comes about.

        I'll keep everyone updated if I discover anything new.
  • MKBDper's avatar
    MKBDper
    Helpful | Level 5

    I got is solved by reindexing Spotlight.

    And for stubburn files that would not Smart Sync, duplicate the file, delete the old one, rename the copy – works fine √

  • Thomas C. G.'s avatar
    Thomas C. G.
    Explorer | Level 4

    After struggling with this for weeks and trying all kind of possible solutions, I finally got rid of the error message. The trick on my system was, to exclude the Dropbox cache folder from spotlight searches. Bingo. :-)

    • ERC's avatar
      ERC
      New member | Level 2

      Hi Thomas.

      Thanks for the info.

      After several weeks of getting nowhere I have actually gone to the more drastic lengths of totally re-installing MacOS and starting from scratch.

      A painful process but I can confirm theat the problem has stopped occuring – for the time-being at least.

      Thanks again for offering your support.
      Cheers

      s

       

  • Kidhack's avatar
    Kidhack
    Helpful | Level 5
    I haven't had any issues for a while now. Not sure what changed.
    • HusseinH's avatar
      HusseinH
      Explorer | Level 4
      Did you turn back search?
      I still have the issue whenever I need to turn back search. It's quite annoying actually because I can't search for anything, unless I turn back search and then I have to turn it off to get rid of the "mdworker quit unexpectedly" pop-ups :(
  • kentaronyc's avatar
    kentaronyc
    New member | Level 2

    Has this been resolved? mdworker is throwing an error on PDF.mdimporter for me as well. 

     

     

    • Leno M.'s avatar
      Leno M.
      Helpful | Level 5

      SO the solution I found was to format the Mac. I deleted the Hard drive and reisntalled the OS. It no longer affects the Mac now. 

       

      The process was restart the mac press Command key + R and enter recovry mode, disk utility, delete the hard drive by clicking erase and after exit and resintall OS. This solved it for me.

      • nancyp's avatar
        nancyp
        New member | Level 2
        that seems a bit extreme - I'm not reformatting my Mac - this is a Dropbox issue - they really need to sort it out
  • Walter's avatar
    Walter
    Icon for Dropbox Staff rankDropbox Staff

    Hey Sylvain - how are you today?

    Apologies for the tardy response - are you still having this issue? 

    Bear in mind that you might need to perform an advanced re-install to troubleshoot this specific error. Also note, that you can always reach out to our Support team by logging a ticket if this persists. 

    I hope this helps and please keep us posted. Thank you!

    • Ross_S's avatar
      Ross_S
      Icon for Dropbox Staff rankDropbox Staff

      Actually mdworker crashing is due to the way apple interacts with certain filetypes.


      The issue is only present on HFS file systems, so, with the introduction of spares files on High Sierra - which uses APFS - this issue is resolved.

       

      For context, firstly, while you see the errors within event log there are no issues with the functionality or operation of your Dropbox software. These errors do not indicate an issue with the saving of your data.

      What you are seeing is mdworker crashing as, when it reads the logical size of PDFs, the actual size and past size differ, causing the issue. As mentioned on the forum thread you could disable it/Spotlight but we would certainly not recommend this. While the error may look noisy in the logs there is no actual issue here.

      Hope this helps!

      • stephenceresia's avatar
        stephenceresia
        Explorer | Level 4

        I'm using 10.13.5 on APFS and having the issue.  So any insight on how to fix it would be greatly appreciated.