indiana-university / kumo

Visit the Wiki for Kumo documentation.
https://cloudstorage.iu.edu/partner
MIT License
4 stars 1 forks source link

Exception thrown when opening files: "System.IO.FileLoadException: Could not load file or assembly 'System.IO'" #4

Closed jhoerr closed 7 years ago

jhoerr commented 7 years ago

This error occurs sporadically, but consistently on the machines that exhibit it. It appears that the client can't access .Net framework assembl(ies). We know the framework is installed because we check for that on installation. It appears that the file is present because this is a 'FileLoadException' rather than a 'FileNotFoundException'. It does not appear to be a permissions issue because there isn't a message to the effect of 'access is denied'.

Will fix this as 2.9.5 if it can be root caused to something in the app.

2017-01-03 11:12:20.96 [17] ERROR ADS\gstonkov 3.2.2 Windows NT 6.2.9200.0 (x64);.Net CLR 4.0.30319.42000

Box operation failed: One or more errors occurred..

Exception Logged At: Client.CloudFileSystem.CloudDrive.ParseGenericException

Exception Information: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.IO.FileLoadException: Could not load file or assembly 'System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The file cannot be accessed by the system. (Exception from HRESULT: 0x80070780) at PCLStorage.FileSystemFolder.d0.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at PCLStorage.FileSystemFolder.CreateFileAsync(String desiredName, CreationCollisionOption option, CancellationToken cancellationToken) at Client.Core.FileSystem.CacheFileIO.d3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Client.Core.FileSystem.CacheFileManager.d8.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result() at Client.Core.FileSystem.CacheFileManager.<>c__DisplayClass6_0.b0() at Client.Core.FileSystem.CacheFileManager.d9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Client.Core.FileSystem.CacheFileManager.d6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Client.Core.Provider.Common.Context.Context.d34.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Client.Core.Provider.Common.Context.Context.d20.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result() at Client.CloudFileSystem.CloudDrive.DoWithEvents[T](Func1 contextAction) ---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.IO.FileLoadException: Could not load file or assembly 'System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The file cannot be accessed by the system. (Exception from HRESULT: 0x80070780) at PCLStorage.FileSystemFolder.<CreateFileAsync>d__0.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.Start[TStateMachine](TStateMachine& stateMachine) at PCLStorage.FileSystemFolder.CreateFileAsync(String desiredName, CreationCollisionOption option, CancellationToken cancellationToken) at Client.Core.FileSystem.CacheFileIO.d3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Client.Core.FileSystem.CacheFileManager.d8.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result() at Client.Core.FileSystem.CacheFileManager.<>c__DisplayClass6_0.b0() at Client.Core.FileSystem.CacheFileManager.d9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Client.Core.FileSystem.CacheFileManager.d6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Client.Core.Provider.Common.Context.Context.d34.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Client.Core.Provider.Common.Context.Context.d20.MoveNext() ---> (Inner Exception #0) System.IO.FileLoadException: Could not load file or assembly 'System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The file cannot be accessed by the system. (Exception from HRESULT: 0x80070780) File name: 'System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at PCLStorage.FileSystemFolder.d0.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at PCLStorage.FileSystemFolder.CreateFileAsync(String desiredName, CreationCollisionOption option, CancellationToken cancellationToken) at Client.Core.FileSystem.CacheFileIO.d3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Client.Core.FileSystem.CacheFileManager.d8.MoveNext()

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. <--- <--- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result() at Client.CloudFileSystem.CloudDrive.DoWithEvents[T](Func`1 contextAction)

jardrake commented 7 years ago

Attempted to reproduce on hyper-v with the following build steps: 1) Install Windows 10 v1511 2) Install Kumo client 3.2.4 3) Upgrade to Windows 10 v1607 4) Observe Kumo doesn't work 5) Observe reinstall doesn't resolve issue

However, the client behaved appropriately following those steps. So, I met with Brandon and Tim to further discuss the issue. They are going to build a box with the same sequence that produces the error. They said it would be a few days before they could get it setup, but they would let me know when it's ready.

jardrake commented 7 years ago

Last week, I had Brandon attempt to fix the issue by:

  1. uninstalling Kumo (3.2.4)
  2. Confirming cbfs6.sys and vpnpbus.sys drivers were removed Kumo did successfully remove both drivers
  3. reinstall Kumo (3.2.4)

However, the issue still occurred.

Also, I feel that I didn't fully understand the problem until watching Brandon attempt to use Kumo on his computer. To better explain the issue, Brandon's machine mounts the virtual drives. He can also navigate through the directory structure of each drive. The mounting dialog works as expected. The issue occurs when Brandon attempts to open any type of file. When checking the error view, we see the "Could not load file or assembly 'System.IO" error after each attempt to open a file in the virtual drive.

jhoerr commented 7 years ago

So it looks like you've determined that the CBFS drivers probably aren't the root of the issue. That's good progress! Now to figure out what's responsible for the System.IO errors.

jardrake commented 7 years ago

After checking Brandon's GAC, I can confirm he has System.IO 4.0.0.0 on his machine.

jhoerr commented 7 years ago

Fixed in 3.3.0