Bug 1366574
| Summary: | dyninst: Installs breakpoints even in read-only mode | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Florian Weimer <fweimer> | ||||
| Component: | dyninst | Assignee: | Stan Cox <scox> | ||||
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 24 | CC: | fche, jistone, lberk, orion, wcohen | ||||
| Target Milestone: | --- | Keywords: | Reopened | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-08-08 16:30:06 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Florian Weimer
2016-08-12 11:20:44 UTC
Created attachment 1190350 [details]
trace-only.cpp
You can turn off library tracking by default:
#include <dyninst/PlatFeatures.h>
...
{
Dyninst::ProcControlAPI::LibraryTracking::setDefaultTrackLibraries(false);
}
Then for a given Process, you can refresh manually with:
proc->getLibraryTracking()->refreshLibraries();
Does that suffice for you?
AFAICS the various "tracking" APIs are not discussed at all in proccontrol.pdf though, so that's probably worth raising upstream.
A global variable? Not really nice, but it works for me. Sorry, it seems that Dyninst::ProcControlAPI::LibraryTracking::setDefaultTrackLibraries(false); at the start of the program is not fully effective. I still see 30217 ptrace(PTRACE_PEEKTEXT, 28519, 0x7fb3508500a0, [0x2e6666666666c3f3]) = 0 30217 ptrace(PTRACE_POKETEXT, 28519, 0x7fb3508500a0, 0x2e6666666666c3cc) = 0 with it. This is not related to library tracking, but something else. GDB shows this as the location of the crash: Dump of assembler code for function __nptl_create_event: 0x00007fb3508500a0 <+0>: int3 => 0x00007fb3508500a1 <+1>: retq Looking at the Dyninst sources, this does not appear to be optional. (The Dyninst manual could also be a bit more explicit and describe how to deallocate a Process object so that the traced process does not crash later on.) Those new breakpoints are coming from thread_db_process::initThreadDB() for TD_CREATE and TD_DESTROY events. I filed an upstream bug about wanting a true read-only mode. https://github.com/dyninst/dyninst/issues/181 As just pointed out in upstream 181, there actually is a control for threads too: Dyninst::ProcControlAPI::ThreadTracking::setDefaultTrackThreads(false); And manual refresh is similarly: proc->getThreadTracking()->refreshThreads(); I'm not sure how we both overlooked that. It seems to work for me -- I now see no calls to ptrace(PTRACE_POKETEXT,...) nor to process_vm_writev(...). This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |