Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception not caught (should be re-thrown as NOnionException?) caused a crash #45

Closed
knocte opened this issue Oct 26, 2022 · 5 comments · Fixed by #49
Closed

Exception not caught (should be re-thrown as NOnionException?) caused a crash #45

knocte opened this issue Oct 26, 2022 · 5 comments · Fixed by #49

Comments

@knocte
Copy link
Member

knocte commented Oct 26, 2022

I just got this crash when running make update-servers in geewallet:

Unhandled Exception:
System.AggregateException: One or more errors occurred. (Authentication failed because the remote party has closed the transport stream.) ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
  at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x00110] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:226 
  at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x00046] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:187 
  at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x0025c] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:310 
   --- End of inner exception stack trace ---
  at Microsoft.FSharp.Control.AsyncResult`1[T].Commit () [0x00012] in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:349 
  at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronouslyInCurrentThread[a] (System.Threading.CancellationToken cancellationToken, Microsoft.FSharp.Control.FSharpAsync`1[T] computation) [0x0001c] in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:882 
  at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronously[T] (System.Threading.CancellationToken cancellationToken, Microsoft.FSharp.Control.FSharpAsync`1[T] computation, Microsoft.FSharp.Core.FSharpOption`1[T] timeout) [0x00013] in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:890 
  at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T] (Microsoft.FSharp.Control.FSharpAsync`1[T] computation, Microsoft.FSharp.Core.FSharpOption`1[T] timeout, Microsoft.FSharp.Core.FSharpOption`1[T] cancellationToken) [0x00061] in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:1154 
  at GWallet.Backend.ServerManager.UpdateServersStats () [0x00040] in /Users/knocte/Documents/Code/geewalletMASTERclean/src/GWallet.Backend/ServerManager.fs:212 
  at Program.UpdateServersStats () [0x00000] in /Users/knocte/Documents/Code/geewalletMASTERclean/src/GWallet.Frontend.Console/Program.fs:509 
  at Program.main (System.String[] argv) [0x000ca] in /Users/knocte/Documents/Code/geewalletMASTERclean/src/GWallet.Frontend.Console/Program.fs:530 
---> (Inner Exception #0) System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
  at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x00110] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:226 
  at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x00046] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:187 
  at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x0025c] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:310 <---

[ERROR] FATAL UNHANDLED EXCEPTION: System.AggregateException: One or more errors occurred. (Authentication failed because the remote party has closed the transport stream.) ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
  at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x00110] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:226 
  at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x00046] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:187 
  at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x0025c] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:310 
   --- End of inner exception stack trace ---
  at Microsoft.FSharp.Control.AsyncResult`1[T].Commit () [0x00012] in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:349 
  at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronouslyInCurrentThread[a] (System.Threading.CancellationToken cancellationToken, Microsoft.FSharp.Control.FSharpAsync`1[T] computation) [0x0001c] in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:882 
  at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronously[T] (System.Threading.CancellationToken cancellationToken, Microsoft.FSharp.Control.FSharpAsync`1[T] computation, Microsoft.FSharp.Core.FSharpOption`1[T] timeout) [0x00013] in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:890 
  at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T] (Microsoft.FSharp.Control.FSharpAsync`1[T] computation, Microsoft.FSharp.Core.FSharpOption`1[T] timeout, Microsoft.FSharp.Core.FSharpOption`1[T] cancellationToken) [0x00061] in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:1154 
  at GWallet.Backend.ServerManager.UpdateServersStats () [0x00040] in /Users/knocte/Documents/Code/geewalletMASTERclean/src/GWallet.Backend/ServerManager.fs:212 
  at Program.UpdateServersStats () [0x00000] in /Users/knocte/Documents/Code/geewalletMASTERclean/src/GWallet.Frontend.Console/Program.fs:509 
  at Program.main (System.String[] argv) [0x000ca] in /Users/knocte/Documents/Code/geewalletMASTERclean/src/GWallet.Frontend.Console/Program.fs:530 
---> (Inner Exception #0) System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
  at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x00110] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:226 
  at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x00046] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:187 
  at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x0025c] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:310 <---

make: *** [update-servers] Error 1

I guess we need to wrap it under NOnionException? /cc @aarani

@knocte
Copy link
Member Author

knocte commented Oct 26, 2022

@parhamsaremi pls look into this ^

@knocte knocte changed the title Exception not caught and re-thrown as NOnionException Exception not caught (should be re-thrown as NOnionException?) caused a crash Oct 26, 2022
parhamsaremi added a commit to parhamsaremi/NOnion that referenced this issue Oct 28, 2022
IOExcepion caused problem in geewallet as mentioned in [1]. This commit will fix this problem by catching the IOException and rethrowing it as NOnionException.

[1] nblockchain#45
parhamsaremi added a commit to parhamsaremi/NOnion that referenced this issue Nov 3, 2022
IOExcepion caused problem in geewallet as mentioned in [1]. This commit will fix this problem by catching the IOException and rethrowing it as NOnionException.

[1] nblockchain#45
parhamsaremi added a commit to parhamsaremi/NOnion that referenced this issue Nov 3, 2022
IOExcepion caused problem in geewallet as mentioned in [1].
This commit will fix this problem by catching the IOException
and rethrowing it as NOnionException.

[1] nblockchain#45
@aarani

This comment was marked as duplicate.

@knocte
Copy link
Member Author

knocte commented Nov 7, 2022

Actually, I haven't reproduced the crash again in many days, so the PR is stalled.

@knocte
Copy link
Member Author

knocte commented Nov 9, 2022

BTW @aarani I guess you meant to reply in the PR, not in the bug. You're arguing about the solution to the bug, not the bug itself.

@aarani
Copy link
Collaborator

aarani commented Nov 9, 2022

Yes, I'll move the comment to the PR

parhamsaremi added a commit to parhamsaremi/NOnion that referenced this issue Nov 9, 2022
Move TorGuard exception handling to a new module so that
every time we want to handle a new type of exception, we
won't be bothered by adding a lot of try/except expressions.

Fixes nblockchain#45
Fixes nblockchain/geewallet#184
parhamsaremi added a commit to parhamsaremi/NOnion that referenced this issue Nov 9, 2022
Move TorGuard exception handling to a new module so that
every time we want to handle a new type of exception, we
won't be bothered by adding a lot of try/except expressions.

Fixes nblockchain#45
Fixes nblockchain/geewallet#184
parhamsaremi added a commit to parhamsaremi/NOnion that referenced this issue Nov 11, 2022
Move TorGuard exception handling to a new module so that
every time we want to handle a new type of exception, we
won't be bothered by adding a lot of try/except expressions.
This code is necessary for fixing [1].

Fixes nblockchain#45
[1] nblockchain/geewallet#184
parhamsaremi added a commit to parhamsaremi/NOnion that referenced this issue Nov 14, 2022
Move TorGuard exception handling to a new module so that
every time we want to handle a new type of exception, we
won't be bothered by adding a lot of try/except expressions.
This code is necessary for fixing [1].

Fixes nblockchain#45
[1] nblockchain/geewallet#184
knocte pushed a commit that referenced this issue Nov 14, 2022
Move TorGuard exception handling to a new module so that
every time we want to handle a new type of exception, we
won't be bothered by adding a lot of try/except expressions.

While we're at it, we wrap IOException (necessary for
fixing [1]).

Fixes #45
[1] nblockchain/geewallet#184
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants