Page MenuHome

Long startups after network drives are disconnected
Closed, ResolvedPublic


System Information
Operating system: Windows 10
Graphics card: GTX 1070 & GTX 970

Blender Version
Broken: 2.80.0-git.860a9f979d60 & Blender 2.79

Short description of error
When Blender is used to save to or load from a network drive, and then the network drive disconnects, Blender startup times can be increased by 10x in my tests. Normally Blender opens almost instantly, but in 2.79 it could take up to a minute after a drive was disconnected. In 2.8 it's a little better, but still noticeably slower.

Exact steps for others to reproduce the error

  1. Open Blender
  2. Save or load something from network drive
  3. Disconnect network drive
  4. Re-open Blender and it will take a lot longer to open

I have found that clearing the "Recent" files in the file explorer will reset this problem until you need to use a network drive again. I have not tested this with a "Mapped," network drive, so clearing recent files might not help in that case.

Event Timeline

This should have been fixed a while ago with rB01a8216a4bc8968a108eec5fc50436f4a6ed02a9, but it seems like the issue is back now. I don't have any network drives to reproduce this with.

@Campbell Barton (campbellbarton) and you reproduce this?

This is caused by bookmark reading & validation

  • ED_file_read_bookmarks() opens $HOME/.config/blender/2.80/config/bookmarks.txt
  • Under [Recent] there is the directory of the latest written files directory.
  • This directory is added via fsmenu_read_bookmarks, see: fsmenu.c:459, fsmenu_insert_entry(fsmenu, category, line, name, FS_INSERT_SAVE).
  • fsmenu_entry_refresh_valid calls BLI_is_dir which will hang when running on a network drive in some cases.

Introduced by rB0dfdca6d132dd0b26307ab0c35be87f78da98022

AFAICS solution is to revert this change, remove checking the path from drawing too.

Campbell Barton (campbellbarton) triaged this task as Confirmed, Medium priority.

'Reverting' that change will only move the problem further, now people will have 'invalid' bookmarks on which they will click, and have again to wait 30 secs of freeze in the file browser…

Besides cursing Microsoft to Hell for not being able to provide a proper way to check for network-related paths in a non-blocking way (checked, there seems to be no real solution here, only hacks and workarounds), I think the only real solution is to keep the start-up check, but put it into an async job… :(((

@Bastien Montagne (mont29), wouldn't this be an improvement to avoid the delay until the user clicks on it?
Then at least it's an explicit action without overhead on startup.

Otherwise loading Blender: external drives spin up & network paths need to be checked.
Even on other platforms this can add overhead (if the network has a lot of traffic for eg).

@Campbell Barton (campbellbarton) might be an improvement, but I can bet you we'll end up getting bug reports 'my file manager hangs for 30 secs when I click on a bookmark' as well. So would say either we consider current situation as not-so-good but known limitation, or we go for some fully async check of the bookmarks (at startup). Think this should not be a big change anyway, we are already using jobs to list files, we can as well do it to check bookmarks too. ;)

Maybe get 2nd opinion on this...

  • Agree async is nice, but...
  • For 2.80 we could not validate paths on load (as we had in previous releases), to avoid slow load times.

Well, we had current behavior for 4 years… So clearly not a critical issue either, if we go that way I’d say keep current behavior for 2.80 altogether. ;)

My two cents:

I think that network operations like these should be non-locking as quirky network drives might lock up blender for long periods of time.

For me personally, I would like i more if the files would be queried when you try to access them. But I do agree with @Bastien Montagne (mont29) that we will probably get new tickets about that too. :/

Maybe we could add some UI stuff that notifies the user that we are looking up the network things? So that they know something is happening and that blender just didn't lock up.

While we can get complaints either way, validating on startup can backfire:

  • Open Blender.
  • Plug in external drive.
  • Open a file browser.
  • The bookmark is missing even though the path it points to is now valid.