DynamoRIO / DynamoRIO/drmemory

drmemory.pl can find the wrong logdir due to race between glob and logdir creation

Open
#671 0 comments 0 reactions 0 assignees View on GitHub
Migrated OpSys-Linux Priority-Medium
Dominant language
C
Stars
2.7k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

_From [rnk@google.com](https://code.google.com/u/rnk@google.com/) on November 07, 2011 12:42:05_

After many, many invocations of drmemory from my build dir on Linux, I have accumulated ~1000 log dirs. drmemory.pl has a glob on line 482 where it uses the glob "$logdir/DrMemory-_.$procid._" to try to find the log dir created by the injected process. It then tries to pick the most recent directory. This falls over when the glob happens before the logdir is created, and we pick up a logdir from a prior DrM invocation. The result for me is test flakiness. :(

We should use a more robust mechanism to communicate the logdir back to the frontend. It seems Windows uses a pidfile mechanism. Would it be reasonable to try to make that work on Windows, or would it be less work to start porting drmemory.exe to Unix so we no longer need to maintain two frontends?

_Original issue: http://code.google.com/p/drmemory/issues/detail?id=671_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.