From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10555 invoked by alias); 22 Jan 2015 22:19:34 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 10079 invoked by uid 48); 22 Jan 2015 22:18:40 -0000 From: "serhei.public at gmail dot com" To: systemtap@sourceware.org Subject: [Bug dyninst/15566] Support multiple stap --dyninst sessions on the same processes Date: Thu, 22 Jan 2015 22:19:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: dyninst X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: serhei.public at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00054.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=15566 --- Comment #4 from Serhei Makarov --- I was working a while ago on getting several Stapdyn modules to run in the same `stapdyn` loader process. I've put up a forward-ported implementation of my earlier code, rebased onto a fairly recent instance of the master branch, at https://github.com/serhei/systemtap/commits/serhei/multiplexing The overall architecture within the loader is explained by a comment near the top of https://github.com/serhei/systemtap/blob/serhei/multiplexing/stapdyn/mutator.h There are no regressions with the single-module case, but multiple modules have a range of problems and limitations. In increasing order of difficulty: - There needs to be a proper naming scheme implemented for distinguishing shared memory belonging to different script modules. This could be the PID of the stapdyn command that launched the module (so the full SHM name would be something like "stapdyn.."). - dlopen()ing multiple instances of the same module, currently fails completely. This is a regression relative to the earlier version. - A script which calls exit(), exits all other scripts running in the same `stapdyn` process. There are similar further things to add, in terms of adequately separating the effects of script errors, directing the output of different scripts to different places, etc. I think I will have to admit defeat on getting this functionality into Systemtap for the time being. I had some work-in-progress on sharing the Dyninst session via a server-daemon rather than via a toy 'stapdyn -M' option, but it does not seem useful to put more effort into it until the basic multiplexing functionality is working more reliably. -- You are receiving this mail because: You are the assignee for the bug.