DynamoRIO / DynamoRIO/drmemory

DrMemory crashes

Open
#2,395 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
2.7k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

Hello,
i wanted to use DrMemory to search for memory leaks in a python module (Which I did in Valgrind and wanted to check out drmemory in comparison)

To be able to test the module, we have a test which consists of a binary that loads the module into a embedded python
interpreter and tests the module.
Sourcecode:
https://github.com/bareos/bareos/blob/master/core/src/plugins/filed/python/test/python-fd-module-tester.cc

**Describe the bug**
I tried different Versions of DrMemory releases, and unfortunately it crashes in all versions I tired (1.10, 2.2, 2.3. 2.3-18696)

**To Reproduce**
Steps to reproduce the behavior:

1. Build the bareos sourcecode from https://github.com/bareos/bareos
2. run the module-test verbose to see what PYHTONPATH is required: `ctest -V -R bareosfd-python3-module-tester`
3. set the PYTHONPATH: `export PYTHONPATH=/home/pstorz/git/master/core/src/plugins/filed/python/test/:/home/pstorz/git/master/b/core/src/plugins/filed/python/python3modules:/home/pstorz/git/master/core/src/plugins/filed/python/pyfiles`
4. run the binary in drmemory: `drmemory -- /home/pstorz/git/master/b/core/src/plugins/filed/python/bareosfd-python3-module-tester`

- Does the problem go away when running in light mode (pass `-light` to Dr. Memory)? **NO**
- Does the problem go away when running with the options `-leaks_only -no_count_leaks -no_track_allocs`? **NO**
- Does the problem go away when running under plain DynamoRIO? Do this by running `dynamorio/bin32/drrun -- ` or `dynamorio/bin64/drrun -- ` depending on the bitwidth of your applicaiton. (Ignore warnings about "incomplete installation".) **YES**
- What happens with the debug version of Dr. Memory and of its underlying engine DynamoRIO? Try this by passing `-debug -dr_debug -pause_at_assert`. Are any messages reported? **NO, crash still happens**

**Expected behavior**
I would expect that drmemory does not crash.

**Screenshots or Pasted Text**

Running without special switches:

```
drmemory -- /home/pstorz/git/master/b/core/src/plugins/filed/python/bareosfd-python3-module-tester

```

Running with debug version:
```
drmemory -debug -dr_debug -pause_at_assert -- /home/pstorz/git/master/b/core/src/plugins/filed/python/bareosfd-python3-module-tester

```

**Versions**
- What version of Dr. Memory are you using?**DrMemory-Linux-2.3.18696**
- Does the latest build from
https://github.com/DynamoRIO/drmemory/wiki/Latest-Build solve the problem? **No, as this is already the latest build**
- What operating system version are you running on?**Fedora Linux 33 64Bit**
- Is your application 32-bit or 64-bit?**64Bit**

**Additional context**
I have the feeling that it has to do with python itself, as it also crashes when I run drmemory on python3 executing
a script containing `print ("hello")` also crashes:
```
drmemory -- /bin/python3.9 ./test.py

```

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.