question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Collector fails due to blocked files, propose simple fix

See original GitHub issue

Hi Everyone, I realize that a similar issue has been discussed recently, but I have some substantiated evidence about what exactly happens. In my case McAfee Adaptive Thread Protection (yikes) is blocking the instrumented modules, so that InstrumentationHelper.RestoreOriginalModule() fails to restore the original file even after the default 12 retries with increasing sleep intervals of 6, 12, 24, … milliseconds.

For me, it is really sufficient to increase that interval by modifing the default initialSleepSeconds (which is actually misnamed, as the number is interpreted as milliseconds) of InstrumentationHelper.CreateRetryStrategy() from 6 to a somewhat larger value of 50. Alternatively increasing the number of retries from 12 to 15 or something along these lines also fixes it for me.

It would be great if either of those values would be configurable, either by a config file, command line argument or MSBuild parameter.

I would do the neccessary changes myself if someone more familiar with coverlet could give me a hint about what would be the appropriate method for injecting this parameter/configuration into the InstrumentationHelper.

Edit: I realized I talked about having evidence but did not include it here. I used Sysinternals Process Monitor to see when dotnet.exe, testhost.exe and mfeatp.exe (McAfee) open and close the files, and this is exactly what I saw: dotnet.exe failing to open the file for writing, because mfeatp.exe has this file still open and allows only read only sharing. As soon as mfeatp.exe closes the file, dotnet.exe succeeds in opening the file for writing.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
MarcoRossignolicommented, Jun 26, 2020

Understood you point…fair, I need to think a bit more about(the update is a bit more complex we need to add it to all drivers not only collectors and update guide, I’m bit reclutant on adding new parameters, but this time could be a solution), add param could work.

0reactions
MarcoRossignolicommented, Oct 3, 2020

Closing for now, we’ll re-open if others will hit this issue, no more thumbs up here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Troubleshooting Server Message Block (SMB)
In this article ... Try our Virtual Agent - It can help you quickly identify and fix common SMB issues. Server Message Block...
Read more >
Eliminating Large JVM GC Pauses Caused by Background ...
Our investigations show that the pauses are induced by the JVM GC (Garbage Collection)'s write() system calls during GC log writing. Such log ......
Read more >
How to do distributed locking
If the lock fails and two nodes concurrently work on the same piece of data, the result is a corrupted file, data loss, ......
Read more >
0xC0000035. The error
Fix “Error Code: 0XC0000035” Kernel Event Tracing on Windows. This is most commonly a service such as the Server service or a local...
Read more >
Solutions - Cisco Breach Defense Design Guide
A secure, off-site, enterprise backup solution could easily be defeated through password reuse and/or poor password management.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found