public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "sirius@sonnenkinder.org" <sirius@sonnenkinder.org>
To: systemtap@sourceware.org
Subject: Cannot run SystemTap as unprivileged user on Ubuntu
Date: Tue, 06 Mar 2012 09:42:00 -0000	[thread overview]
Message-ID: <4F55DBDE.3070109@sonnenkinder.org> (raw)

Hello list,

I have a problem with running SystemTap as unprivileged user on Ubuntu 
12.04.

Executing the following probe as root works fine[0]:

     stap -e 'probe vfs.read {printf("read performed\n"); exit()}'

However, running it as user (in 'stapusr' and stapdev' groups), 
fails[1]. Doing the same in Fedora 17 Alpha succeeds.

The module gets loaded, but stapio is never run, and the removal of the 
module seems to fail as well, as it's still loaded when stap exits.

This happens with distro SystemTap 1.6 and a 3.2.9-based distro kernel. 
All the suggested config options are set in the Ubuntu kernel[2] (except 
of CONFIG_UTRACE, though that's not necessary for that test I guess). I 
also used a tailored 3.3-rc5 vanilla kernel with UTRACE patched in, same 
result.

I tried again with disabled security model AppArmor, no joy.

I then tested the 3/3/2012 snapshot of SystemTap. That slightly changed 
the output* but not the end result: it didn't work[3].

There are no dmesg errors (see working[4] and failing[5] -DDEBUG_TRANS 
output).

I'll also add the Fedora 17 Alpha kernel config, in case there are some 
weird incompatibility config issues[6], but I tested a vanilla 3.3-rc5 
kernel with Fedora's config and it failed too.

An Ubuntu dev and an Ubuntu kernel hacker are experiencing the same, 
latter suggesting:

     "I suspect it is some user space foo config that we're missing"

Any suggestions are appreciated.

Regards

Hernando Torque

0: Working as root: http://paste.ubuntu.com/871163/
1: Failing as user: http://paste.ubuntu.com/871165/
2: Ubuntu kernel config: http://paste.ubuntu.com/871166/
3: Ubuntu with snapshot: http://paste.ubuntu.com/871190/
4: 1.6 dmesg working: http://paste.ubuntu.com/871168/
    Snapshot dmesg working: http://paste.ubuntu.com/871169/
5: 1.6 dmesg failing: http://paste.ubuntu.com/871172/
    Snapshot dmesg failing: http://paste.ubuntu.com/871173/
6: Fedora kernel config: http://paste.ubuntu.com/871175/

*) In my opinion, the message

     "Error, '$module' is not a zombie systemtap module."

is not really helpful to an end user. What does it mean? Why did it 
happen? Since it is visible without adding a -v parameter, I suggest 
making it more descriptive.

             reply	other threads:[~2012-03-06  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06  9:42 sirius [this message]
2012-03-13  9:52 ` Timo Juhani Lindfors
2012-03-13 10:30   ` sirius

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F55DBDE.3070109@sonnenkinder.org \
    --to=sirius@sonnenkinder.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).