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

[browser][debugger][MT] CallFunctionOnTests.RunOnInvalidCfoId #87315

Closed
pavelsavara opened this issue Jun 9, 2023 · 3 comments · Fixed by #87405
Closed

[browser][debugger][MT] CallFunctionOnTests.RunOnInvalidCfoId #87315

pavelsavara opened this issue Jun 9, 2023 · 3 comments · Fixed by #87405
Assignees
Labels
arch-wasm WebAssembly architecture area-Debugger-mono
Milestone

Comments

@pavelsavara
Copy link
Member

[xUnit.net 00:08:09.53]     DebuggerTests.CallFunctionOnTests.RunOnInvalidCfoId(eval_fn: "negative_cfo_test ();", bp_loc: "/other.js", line: 64, col: 1, use_cfo: False) [FAIL]
Detected a container, disabling sandboxing for debugger tests.
  Failed DebuggerTests.CallFunctionOnTests.RunOnInvalidCfoId(eval_fn: "negative_cfo_test ();", bp_loc: "/other.js", line: 64, col: 1, use_cfo: False) [1 ms]
  Error Message:
   System.AggregateException : One or more errors occurred. (Index was outside the bounds of the array.)
---- System.IndexOutOfRangeException : Index was outside the bounds of the array.
  Stack Trace:
     at DebuggerTests.Inspector.OpenSessionAsync(Func`3 getInitCmds, String urlToInspect, TimeSpan span) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 377
   at DebuggerTests.DebuggerTestBase.InitializeAsync() in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 173
----- Inner Stack Trace -----
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
   at DebuggerTests.InspectorClient.SendCommand(SessionId sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/InspectorClient.cs:line 98
   at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 219
  Standard Output Messages:

...

[2023-06-08T20:02:59] Inspector-67 Error: _isFailingWithException. System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.)
 |                                            ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
 |                                              at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
 |                                              at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
 |                                              at DebuggerTests.InspectorClient.SendCommand(SessionId sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/InspectorClient.cs:line 98
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 219
 |                                              --- End of inner exception stack trace ---
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 220
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 219
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 220
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 223
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 221
 |                                              at DebuggerTests.Inspector.<OpenSessionAsync>b__40_1() in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 362.

Build
log

@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-Debugger-mono labels Jun 9, 2023
@pavelsavara pavelsavara added this to the 8.0.0 milestone Jun 9, 2023
@ghost
Copy link

ghost commented Jun 9, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details
[xUnit.net 00:08:09.53]     DebuggerTests.CallFunctionOnTests.RunOnInvalidCfoId(eval_fn: "negative_cfo_test ();", bp_loc: "/other.js", line: 64, col: 1, use_cfo: False) [FAIL]
Detected a container, disabling sandboxing for debugger tests.
  Failed DebuggerTests.CallFunctionOnTests.RunOnInvalidCfoId(eval_fn: "negative_cfo_test ();", bp_loc: "/other.js", line: 64, col: 1, use_cfo: False) [1 ms]
  Error Message:
   System.AggregateException : One or more errors occurred. (Index was outside the bounds of the array.)
---- System.IndexOutOfRangeException : Index was outside the bounds of the array.
  Stack Trace:
     at DebuggerTests.Inspector.OpenSessionAsync(Func`3 getInitCmds, String urlToInspect, TimeSpan span) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 377
   at DebuggerTests.DebuggerTestBase.InitializeAsync() in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 173
----- Inner Stack Trace -----
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
   at DebuggerTests.InspectorClient.SendCommand(SessionId sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/InspectorClient.cs:line 98
   at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 219
  Standard Output Messages:

...

[2023-06-08T20:02:59] Inspector-67 Error: _isFailingWithException. System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.)
 |                                            ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
 |                                              at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
 |                                              at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
 |                                              at DebuggerTests.InspectorClient.SendCommand(SessionId sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/InspectorClient.cs:line 98
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 219
 |                                              --- End of inner exception stack trace ---
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 220
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 219
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 220
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 223
 |                                              at DebuggerTests.Inspector.OnMessage(String sessionId, String method, JObject args, CancellationToken token) in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 221
 |                                              at DebuggerTests.Inspector.<OpenSessionAsync>b__40_1() in /_/src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs:line 362.

Build
log

Author: pavelsavara
Assignees: thaystg, ilonatommy
Labels:

arch-wasm, area-Debugger-mono

Milestone: 8.0.0

@mdh1418
Copy link
Member

mdh1418 commented Jun 9, 2023

Seeing the same with DebuggerTests.MonoJsTests.RaiseDebugEventTraceTest on #84191 for build
log

@ilonatommy
Copy link
Member

ilonatommy commented Jun 12, 2023

Reason: "A Dictionary<TKey,TValue> can support multiple readers concurrently, as long as the collection is not modified.".
pending_cmds is getting modified from different threads which sometimes causes the issue:

pending_cmds[new MessageId(sessionId.sessionId, id)] = tcs;

I'll try ConcurrentDictionary instead, as docs suggest.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 12, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 13, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Debugger-mono
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants