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

Crash profiling dll #77

Closed
Danipon opened this issue Dec 17, 2021 · 11 comments
Closed

Crash profiling dll #77

Danipon opened this issue Dec 17, 2021 · 11 comments

Comments

@Danipon
Copy link

Danipon commented Dec 17, 2021

Hi, we are using MP to profile some extension DLL we write for famous CAD systems. The latest versions always crashes after a while. I managed to get the crash location, but I'm not of much help here. I will attach the screenshot of my VS if can help.
crash_micro-profiler
If there is something I can do to help you guess the problem let me know.

tyoma added a commit that referenced this issue Dec 18, 2021
- the crash occurs due to an attempt to access a collector's TLS, when over 0x40 TLSes are already allocated;
- README.md updated.
@tyoma
Copy link
Owner

tyoma commented Dec 18, 2021

Hello @Danipon!
Thank you for your feedback. As you can see I've already pushed the fix. I'll publish the fixed version soon and will ask for your help testing, whether the crash has actually gone.
Thank you!
Artem

@tyoma
Copy link
Owner

tyoma commented Dec 18, 2021

@Danipon, please try this version - it should fix the crashes: https://github.com/tyoma/micro-profiler/releases/tag/v2.0.638.0

tyoma added a commit that referenced this issue Dec 18, 2021
- the crash occurs due to an attempt to access a collector's TLS, when over 0x40 TLSes are already allocated.
@Danipon
Copy link
Author

Danipon commented Dec 20, 2021

Hi Tyoma, thanks for the quick replay. Just installed and tested. The problems persists apparently on the same location.
micro-profiler02

@tyoma
Copy link
Owner

tyoma commented Dec 20, 2021

Hi @Danipon! will you be able to send me a dump file? You can take it by going to Debug/Save Dump As... and picking "Minidump with Heap" save mode. You can send it me over the email from commits or, if you can - ask me for one on linked-in.
thank you!

@tyoma
Copy link
Owner

tyoma commented Dec 20, 2021

@Danipon my linked-in handle is in my profile here, on github

@Danipon
Copy link
Author

Danipon commented Dec 20, 2021 via email

@tyoma
Copy link
Owner

tyoma commented Dec 21, 2021

@Danipon thanks again for the dump. I guess, I may have a clue. I do this:

00007FFD8AF1CE5D  mov         rbx,qword ptr gs:[1780h]  
00007FFD8AF1CE66  mov         rax,qword ptr [rbx+rax*8-200h]

but rbx may be zero if TLS hasn't been written in the thread yet. In this case it has a legitimate value of '0'.

tyoma added a commit that referenced this issue Dec 22, 2021
tyoma added a commit that referenced this issue Dec 22, 2021
… if no dynamic TLS array has been allocated yet
@tyoma
Copy link
Owner

tyoma commented Dec 22, 2021

Hi @Danipon! Can you please try the collector dll attached? You just need to replace the one came with the installer with this one. The installation directory is specified in env variable %MICROPROFILERDIR%

micro-profiler_x64.zip

@Danipon
Copy link
Author

Danipon commented Dec 22, 2021

Hi @tyoma. I can confirm you the provided version is working fine! Thank you!

@tyoma
Copy link
Owner

tyoma commented Dec 22, 2021

This is great, @Danipon! I'll publish new version as soon, as possible!

@tyoma
Copy link
Owner

tyoma commented Dec 23, 2021

@Danipon, I have published updated version to VisualStudio Marketplace - you will probably be notified of it in VisualStudio Extensions Manager.
May I ask you to leave a review there on Marketplace, if you haven't already?
Thanks again for the issue and the info provided!!!

@tyoma tyoma closed this as completed Dec 23, 2021
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

No branches or pull requests

2 participants