Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@thaystg
Copy link
Contributor

@thaystg thaystg commented Sep 27, 2019

If there is a perform_wait_callback in the stack there will be another catch generated by the method called in the owner thread, so we don't need to throw as unhandled exception, we can continue and find the next catch.

Fixes #17083

…r catch generated by the owner thread, so we don't need to throw, we can continue and find the next catch.

Fixes mono#17083
@thaystg
Copy link
Contributor Author

thaystg commented Sep 28, 2019

@monojenkins build failed

3 similar comments
@thaystg
Copy link
Contributor Author

thaystg commented Sep 28, 2019

@monojenkins build failed

@thaystg
Copy link
Contributor Author

thaystg commented Sep 28, 2019

@monojenkins build failed

@marek-safar
Copy link
Member

@monojenkins build failed

@marek-safar
Copy link
Member

@monojenkins backport 2019-08

@vargaz
Copy link
Contributor

vargaz commented Sep 30, 2019

Is perform_wait_callback a special method so it needs to be special cased in the runtime ?

@lambdageek
Copy link
Member

@vargaz PerformWaitCallback is a little bit special to the runtime. The threadpool code sets save_lmf to TRUE because the worker loop wants to mess with the exception handling.

/*
* This is needed so there is always an lmf frame in the runtime invoke call below,
* so ThreadAbortExceptions are caught even if the thread is in native code.
*/
mono_defaults.threadpool_perform_wait_callback_method->save_lmf = TRUE;

@vargaz
Copy link
Contributor

vargaz commented Oct 1, 2019

I guess this is ok then but it still looks kinda weird.

@knocte
Copy link
Contributor

knocte commented Oct 1, 2019

I don't want to delay this fix to be committed (in fact I was the bug reporter), but hardcoding threadpool_perform_wait_callback_method in this bug fix would mean that the bug would still be present when the thread is not a threadpool thread?

@thaystg
Copy link
Contributor Author

thaystg commented Oct 1, 2019

It's a side effect of #15234. We should backport to 2019-06 and 2019-02?

@lambdageek
Copy link
Member

@monojenkins backport to 2019-06

@monojenkins
Copy link
Contributor

@lambdageek backporting to 2019-06 failed, the patch results in conflicts:

Applying: If there is a perform_wait_callback in the stack there will be another catch generated by the owner thread, so we don't need to throw, we can continue and find the next catch. Fixes #17083
Using index info to reconstruct a base tree...
M	mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
M	mcs/class/Mono.Debugger.Soft/Test/dtest.cs
M	mono/mini/mini-exceptions.c
Falling back to patching base and 3-way merge...
Auto-merging mono/mini/mini-exceptions.c
CONFLICT (content): Merge conflict in mono/mini/mini-exceptions.c
Auto-merging mcs/class/Mono.Debugger.Soft/Test/dtest.cs
Auto-merging mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
error: Failed to merge in the changes.
Patch failed at 0001 If there is a perform_wait_callback in the stack there will be another catch generated by the owner thread, so we don't need to throw, we can continue and find the next catch. Fixes #17083

Please backport manually!

@marek-safar
Copy link
Member

@monojenkins build failed

1 similar comment
@lambdageek
Copy link
Member

@monojenkins build failed

@akoeplinger
Copy link
Member

@monojenkins build

@akoeplinger
Copy link
Member

@monojenkins backport 2019-08

@thaystg
Copy link
Contributor Author

thaystg commented Oct 2, 2019

@monojenkins build failed

3 similar comments
@thaystg
Copy link
Contributor Author

thaystg commented Oct 2, 2019

@monojenkins build failed

@thaystg
Copy link
Contributor Author

thaystg commented Oct 2, 2019

@monojenkins build failed

@thaystg
Copy link
Contributor Author

thaystg commented Oct 2, 2019

@monojenkins build failed

@lambdageek
Copy link
Member

Relevant failures: x64 and arm64 FullAOT+Interpreter lanes consistently failing the abort-cctor test. Also on the 2019-08 backport.

@thaystg thaystg requested a review from BrzVlad as a code owner October 7, 2019 01:20
@thaystg
Copy link
Contributor Author

thaystg commented Oct 7, 2019

@monojenkins build failed

@thaystg thaystg merged commit 18fac0a into mono:master Oct 7, 2019
@thaystg
Copy link
Contributor Author

thaystg commented Oct 7, 2019

@monojenkins backport 2019-08

@thaystg
Copy link
Contributor Author

thaystg commented Oct 7, 2019

@monojenkins backport 2019-06

@monojenkins
Copy link
Contributor

@thaystg backporting to 2019-06 failed, the patch results in conflicts:

Applying: If there is a perform_wait_callback in the stack there will be another catch generated by the owner thread, so we don't need to throw, we can continue and find the next catch. Fixes #17083
Using index info to reconstruct a base tree...
M	mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
M	mcs/class/Mono.Debugger.Soft/Test/dtest.cs
M	mono/mini/mini-exceptions.c
Falling back to patching base and 3-way merge...
Auto-merging mono/mini/mini-exceptions.c
CONFLICT (content): Merge conflict in mono/mini/mini-exceptions.c
Auto-merging mcs/class/Mono.Debugger.Soft/Test/dtest.cs
Auto-merging mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
error: Failed to merge in the changes.
Patch failed at 0001 If there is a perform_wait_callback in the stack there will be another catch generated by the owner thread, so we don't need to throw, we can continue and find the next catch. Fixes #17083

Please backport manually!

thaystg added a commit to thaystg/mono that referenced this pull request Oct 7, 2019
…r catch generated by the method called in the owner thread, so we don't need to throw as unhandled exception, we can continue and find the next catch.

Fixes mono#17083

Backport of mono#17106.
@thaystg
Copy link
Contributor Author

thaystg commented Oct 7, 2019

@monojenkins backport 2019-02

@monojenkins
Copy link
Contributor

@thaystg backporting to 2019-02 failed, the patch results in conflicts:

Applying: If there is a perform_wait_callback in the stack there will be another catch generated by the owner thread, so we don't need to throw, we can continue and find the next catch. Fixes #17083
Using index info to reconstruct a base tree...
M	mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
M	mcs/class/Mono.Debugger.Soft/Test/dtest.cs
M	mono/mini/mini-exceptions.c
Falling back to patching base and 3-way merge...
Auto-merging mono/mini/mini-exceptions.c
CONFLICT (content): Merge conflict in mono/mini/mini-exceptions.c
Auto-merging mcs/class/Mono.Debugger.Soft/Test/dtest.cs
Auto-merging mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
error: Failed to merge in the changes.
Patch failed at 0001 If there is a perform_wait_callback in the stack there will be another catch generated by the owner thread, so we don't need to throw, we can continue and find the next catch. Fixes #17083

Please backport manually!

monojenkins pushed a commit to monojenkins/mono that referenced this pull request Oct 7, 2019
…r catch generated by the method called in the owner thread, so we don't need to throw as unhandled exception, we can continue and find the next catch.

Fixes mono#17083

Backport of mono#17106.
marek-safar pushed a commit that referenced this pull request Oct 9, 2019
…r catch generated by the method called in the owner thread, so we don't need to throw as unhandled exception, we can continue and find the next catch.

Fixes #17083

Backport of #17106.
ManickaP pushed a commit to ManickaP/runtime that referenced this pull request Jan 20, 2020
…o#17106)

* If there is a perform_wait_callback in the stack there will be another catch generated by the owner thread, so we don't need to throw, we can continue and find the next catch.
Fixes mono/mono#17083

* Reverting unit test changed on commit 405d521.

* Fixing assert when calling mono_jit_info_get_method if it was a trampoline.


Commit migrated from mono/mono@18fac0a
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 this pull request may close these issues.

Regression: when debugger encounters a not-unhandled exception, it stops and shows "Dns.cs file not found" (Dns being the BCL class used)

7 participants