This is the mail archive of the mailing list for the systemtap project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem setting up systemtap 1.6 client/server on Ubutu 11.10

Hi Josh,

I had "compose in HTML" set in thunderbird, but never had message screwed up so badly before. I disabled HTML, hope it will prevent messages from screwing again.

I applied the pacth you mentioned and was able to build and setup client/server. I used my laptop as a server. The only minor discrepancy - server was not discovered automatically, so I need add "--use-server IP" to stap command. I like client/server a lot - much nicer then manually copying modules around or install all debug symbols on system under test.

I need to test more the scripts and the build and will put client/server setups scripts to that list, hopefully next week. I will also put prebuilt .deb packages into PPA, so ubuntu users would be able to use version 1.6 of the systemtap now, while it makes its way to official pool. It is currently 1.4

Thank you very match for your help,


On 10/21/2011 02:18 AM, Josh Stone wrote:
For some reason, your mailer or the list server mangled your reply, but
picking out pieces...

Alex Wolfson wrote:
Hi Josh,

Thank you for the feedback.

I found the place when stap-serverd is failing
it is in stap-serverd.cxx

static void
initialize (int argc, char **argv) {
    string login = getlogin ();
getlogin returns NULL

|getlogin| is an unsafe and deprecated way of determining the logged-in
user. It's probably trying to open a record of logged-in users, perhaps
|utmp| or something. The correct way to determine the user you're
running as (which might not be the same as the logged-in user, but is
almost always better to use anyway) is |getpwuid(getuid())|

So after I replaced

string login = getlogin ();


struct passwd *pwd;
pwd = getpwuid(getuid());
string login = pwd->pw_name;

I can now manualy run


without std::logic_error

Looks like this bug is specific ether to Ubuntu or my setup.

I hope to find time to finish my script next week and provide a patch
for getlogin and whatever else will show up.
Probably replacing getlogin() call is a good idea anyway.



It looks like we did run into this bug, and Dave already fixed it:

commit 3845290458cd498e490078318ae5306911cb47a9
Author: Dave Brolley<>
Date:   Tue Sep 13 11:07:11 2011 -0400

RHBZ 737095: Unable to start a systemtap server

     - Don't use getlogin to obtain user name because it can fail.
     - Establish server log before issuing any messages.
     - Failure of avahi to advertise is now only a warning. Avahi is not
       always available and the server can still be used directly.

There are two other commits mentioned in the bug too, but this is the
one make a similar getlogin change as you propose.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]