Skip to content

Stack overflow in AddQueryIdAndResultObject (ClientRequest.cs, line 548) #8633

@Dr-Oli

Description

@Dr-Oli

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

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

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)

+------------------------------------------------------------------------+
| This target supports Hardware-enforced Stack Protection. A HW based |
| "Shadow Stack" may be available to assist in debugging and analysis. |
| See aka.ms/userhsp for more info. |
| |
| dps @ssp |
| |
+------------------------------------------------------------------------+

For analysis of this file, run !analyze -v
clr!SlowAllocateString+0x3a:
00007ff8a45ff2fe e89de50600 call clr!GetThread (00007ff8a466d8a0)
0:023> !analyze -v


  •                                                                         *
    
  •                    Exception Analysis                                   *
    
  •                                                                         *
    

MethodDesc: 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

Key  : Analysis.CPU.mSec
Value: 125031

Key  : Analysis.DebugAnalysisManager
Value: Create

Key  : Analysis.Elapsed.mSec
Value: 144326

Key  : Analysis.IO.Other.Mb
Value: 1

Key  : Analysis.IO.Read.Mb
Value: 1

Key  : Analysis.IO.Write.Mb
Value: 91

Key  : Analysis.Init.CPU.mSec
Value: 1812

Key  : Analysis.Init.Elapsed.mSec
Value: 32658

Key  : Analysis.Memory.CommitPeak.Mb
Value: 901

Key  : CLR.BuiltBy
Value: NET481REL1LAST_C

Key  : CLR.Engine
Value: CLR

Key  : CLR.Version
Value: 4.8.9105.0

Key  : Timeline.OS.Boot.DeltaSec
Value: 304123

Key  : Timeline.Process.Start.DeltaSec
Value: 1904

Key  : WER.OS.Branch
Value: vb_release

Key  : WER.OS.Timestamp
Value: 2019-12-06T14:06:00Z

Key  : WER.OS.Version
Value: 10.0.19041.1

Key  : WER.Process.Version
Value: 2022.4.10.0

....

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APItype:archive-old-issueIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions