Open Dr-Oli opened 1 year ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Problem resolved. ClientContext is not thread-safe and we forgot on 2 places to properly create context. If you are creating conext from existing one use ClientContext.Clone (URI).
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint CSOM
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Desktop application based on .NET 4.7.2 on Windows 10
Describe the bug / error
From time to time when running file.ListItemAllFields my application is crashing. In dump analyses I am finding:
***** Path validation summary ** Response Time (ms) Location Deferred srv Symbol search path is: srv Executable search path is: Windows 10 Version 19044 MP (8 procs) Free x64 Product: WinNt, suite: SingleUserTS Edition build lab: 19041.1.amd64fre.vb_release.191206-1406 Machine Name: Debug session time: Mon Dec 5 10:58:45.000 2022 (UTC + 1:00) System Uptime: 3 days 12:28:43.246 Process Uptime: 0 days 0:31:44.000 ................................................................ ................................................................ ................................................................ ....................................................... Loading unloaded module list ........ This dump file has an exception of interest stored in it. The stored exception information can be accessed via .ecxr. (6904.4ea4): Stack overflow - code c00000fd (first/second chance not available)
+------------------------------------------------------------------------+
For analysis of this file, run !analyze -v clr!SlowAllocateString+0x3a: 00007ff8
a45ff2fe e89de50600 call clr!GetThread (00007ff8
a466d8a0) 0:023> !analyze -vMethodDesc: 00007ff8470f71c0 Method Name: Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject(Int64, System.Object) Class: 00007ff8470ef838 MethodTable: 00007ff8470f7358 mdToken: 00000000060000db Module: 00007ff845314428 IsJitted: yes CodeAddr: 00007ff846c0e060 Transparency: Transparent MethodDesc: 00007ff845315f10 Method Name: Microsoft.SharePoint.Client.ClientObject.get_Query() Class: 00007ff84534cdf0 MethodTable: 00007ff845315fd8 mdToken: 000000000600002c Module: 00007ff845314428 IsJitted: yes CodeAddr: 00007ff846c0eee0 Transparency: Transparent MethodDesc: 00007ff847124b18 Method Name: Microsoft.SharePoint.Client.ListItem.LoadExpandoFields() Class: 00007ff84710b268 MethodTable: 00007ff847124cc8 mdToken: 0000000006000602 Module: 00007ff845311e08 IsJitted: yes CodeAddr: 00007ff848f26780 Transparency: Transparent MethodDesc: 00007ff845315f10 Method Name: Microsoft.SharePoint.Client.ClientObject.get_Query() Class: 00007ff84534cdf0 MethodTable: 00007ff845315fd8 mdToken: 000000000600002c Module: 00007ff845314428 IsJitted: yes CodeAddr: 00007ff846c0eee0 Transparency: Transparent MethodDesc: 00007ff847124b18 Method Name: Microsoft.SharePoint.Client.ListItem.LoadExpandoFields() Class: 00007ff84710b268 MethodTable: 00007ff847124cc8 mdToken: 0000000006000602 Module: 00007ff845311e08 IsJitted: yes CodeAddr: 00007ff848f26780 Transparency: Transparent MethodDesc: 00007ff845315f10 Method Name: Microsoft.SharePoint.Client.ClientObject.get_Query() Class: 00007ff84534cdf0 MethodTable: 00007ff845315fd8 mdToken: 000000000600002c Module: 00007ff845314428 IsJitted: yes CodeAddr: 00007ff846c0eee0 Transparency: Transparent MethodDesc: 00007ff847124b18 Method Name: Microsoft.SharePoint.Client.ListItem.LoadExpandoFields() Class: 00007ff84710b268 MethodTable: 00007ff847124cc8 mdToken: 0000000006000602 Module: 00007ff845311e08 IsJitted: yes CodeAddr: 00007ff848f26780 Transparency: Transparent MethodDesc: 00007ff845315f10 Method Name: Microsoft.SharePoint.Client.ClientObject.get_Query() Class: 00007ff84534cdf0 MethodTable: 00007ff845315fd8 mdToken: 000000000600002c Module: 00007ff845314428 IsJitted: yes CodeAddr: 00007ff846c0eee0 Transparency: Transparent MethodDesc: 00007ff847124b18 Method Name: Microsoft.SharePoint.Client.ListItem.LoadExpandoFields() Class: 00007ff84710b268 MethodTable: 00007ff847124cc8 mdToken: 0000000006000602 Module: 00007ff845311e08 IsJitted: yes CodeAddr: 00007ff848f26780 Transparency: Transparent MethodDesc: 00007ff845315f10 Method Name: Microsoft.SharePoint.Client.ClientObject.get_Query() Class: 00007ff84534cdf0 MethodTable: 00007ff845315fd8 mdToken: 000000000600002c Module: 00007ff845314428 IsJitted: yes CodeAddr: 00007ff846c0eee0 Transparency: Transparent MethodDesc: 00007ff847124b18 Method Name: Microsoft.SharePoint.Client.ListItem.LoadExpandoFields() Class: 00007ff84710b268 MethodTable: 00007ff847124cc8 mdToken: 0000000006000602 Module: 00007ff845311e08 IsJitted: yes CodeAddr: 00007ff848f26780 Transparency: Transparent MethodDesc: 00007ff845315f10 Method Name: Microsoft.SharePoint.Client.ClientObject.get_Query() Class: 00007ff84534cdf0 MethodTable: 00007ff845315fd8 mdToken: 000000000600002c Module: 00007ff845314428 IsJitted: yes CodeAddr: 00007ff846c0eee0 Transparency: Transparent
KEY_VALUES_STRING: 1
....
ERROR_CODE: (NTSTATUS) 0xc00000fd - A new guard page for the stack cannot be created.
Steps to reproduce
This is tricky part as this is happening randomly. Usually (90%) it works but then same files are processed again and it is crashing. Dump file can be shared (it is around 1,5Gb).
Expected behavior
ListItemAllFields should list all fields of checked file without going into endless loop ending with stack overflow error.