Fix ctypes DTraceConsumerThread to also call dtrace_close#7
Merged
tmetsch merged 1 commit intotmetsch:masterfrom Nov 16, 2017
Merged
Fix ctypes DTraceConsumerThread to also call dtrace_close#7tmetsch merged 1 commit intotmetsch:masterfrom
tmetsch merged 1 commit intotmetsch:masterfrom
Conversation
Owner
|
Thanks a million - drinks on me when we meet :-) |
Contributor
Author
|
Ha, well, this only fixes the less-popular ctypes version; #8 still stands for the Cython version, and I haven't yet had a chance to try fixing it. |
Contributor
Author
|
You only closed this, rather than merging; was that intentional? |
Owner
|
It was not intentional! sry. |
arichardson
added a commit
to arichardson/l41-python-dtrace
that referenced
this pull request
Dec 29, 2020
Buffered output hanlding appears to be broken on macOS. The -B flag is disabled in dtrace.c () and compiling dtrace.c with that flag enabled results in the same crash that I see with python-dtrace: ``` * thread tmetsch#1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x7fb100000000) * frame #0: 0x00007fff6f83de52 libsystem_platform.dylib`_platform_strlen + 18 frame tmetsch#1: 0x00007fff6f6d9891 libsystem_c.dylib`__vfprintf + 5379 frame tmetsch#2: 0x00007fff6f6ffad3 libsystem_c.dylib`__v2printf + 475 frame tmetsch#3: 0x00007fff6f6e5ee7 libsystem_c.dylib`_vsnprintf + 417 frame tmetsch#4: 0x00007fff6f6e5f90 libsystem_c.dylib`vsnprintf + 68 frame tmetsch#5: 0x00007fff6d3650e3 libdtrace.dylib`dt_printf + 524 frame tmetsch#6: 0x00007fff6d33da7f libdtrace.dylib`dt_consume_cpu + 2536 frame tmetsch#7: 0x00007fff6d33c9e0 libdtrace.dylib`dtrace_consume + 1090 frame tmetsch#8: 0x00007fff6d366534 libdtrace.dylib`dtrace_work + 116 frame tmetsch#9: 0x000000010d6be9ff dtrace2`main(argc=4, argv=0x00007ffee2547250) at dtrace2.c:1834:17 frame tmetsch#10: 0x00007fff6f647cc9 libdyld.dylib`start + 1 ``` To work around this crash, output to stderr for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ctypes DTraceConsumerThread does not currently call dtrace_close on its handle, so it gets leaked. This copies to destructor from DTraceConsumer.