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

Object reference not set to an instance of an object at System.Threading.ThreadInt64PersistentCounter.get_Count() #71583

Open
xclud opened this issue Jul 2, 2022 · 4 comments

Comments

@xclud
Copy link

xclud commented Jul 2, 2022

Description

I am running an AspNet Core project with a Worker running as a background service.

Very rare and random I got this exception:

Object reference not set to an instance of an object.

Stacktrace:
...at System.Threading.ThreadInt64PersistentCounter.get_Count()

Reproduction Steps

This happened very randomly, I don't know how to reproduce. Just have an aspnet core app with a Worker as a background service. I let it run for several hours in VS 2022 debugger.

Expected behavior

Should not throw an exception.

Actual behavior

Throws a null reference exception.

Regression?

No response

Known Workarounds

No response

Configuration

.NET 7.0 Preview 5.
Windows 11 Insider Build 25151.
Intel Core i3 x64 (NUC 8).
64 GB of RAM.
2TB Samsung NVMe Pro 980 of Disk Space.

Other information

No response

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 2, 2022
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Jul 2, 2022

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

I am running an AspNet Core project with a Worker running as a background service.

Very rare and random I got this exception:

Object reference not set to an instance of an object.

Stacktrace:
...at System.Threading.ThreadInt64PersistentCounter.get_Count()

Reproduction Steps

This happened very randomly, I don't know how to reproduce. Just have an aspnet core app with a Worker as a background service. I let it run for several hours in VS 2022 debugger.

Expected behavior

Should not throw an exception.

Actual behavior

Throws a null reference exception.

Regression?

No response

Known Workarounds

No response

Configuration

.NET 7.0 Preview 5.
Windows 11 Insider Build 25151.
Intel Core i3 x64 (NUC 8).
64 GB of RAM.
2TB Samsung NVMe Pro 980 of Disk Space.

Other information

No response

Author: xclud
Assignees: -
Labels:

area-System.Threading, untriaged

Milestone: -

@kouvel kouvel added this to the Future milestone Jul 8, 2022
@kouvel kouvel removed the untriaged New issue has not been triaged by the area owner label Jul 8, 2022
@kouvel
Copy link
Member

kouvel commented Jul 8, 2022

It's not clear to me how this could be happening from the code. Try enabling just-in-time debugging in VS and if possible share a crash dump if it happens again.

@xclud
Copy link
Author

xclud commented Jul 9, 2022

I did enable my just in time debugging. Next time it happens I will provide more information. It didn't happen since then.

Please keep this issue open in case someone encounter the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants