Cannot run SystemTap as unprivileged user on Ubuntu

sirius@sonnenkinder.org sirius@sonnenkinder.org
Tue Mar 6 09:42:00 GMT 2012


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.



More information about the Systemtap mailing list