Bug#820093: tiptop: does not display any task when running as root

2016-04-06 Thread Tomasz Buchert
Hi again Lucas,

so I did some digging and it seems that it actually works the same way
in Grid5000 and my machine.

If you add a user (eg., adduser test) and then start some processes as
by user, they will be shown in "tiptop -i -U", if you run it by root.

If you look into the code, when run by root, tiptop shows all
processes of *non-root* users. The relevant code is in process.c:340:

if (((my_uid != 0) && (uid == my_uid)) || /* not root, monitor mine */
((my_uid == 0) && (uid != 0)))/* I am root, monitor all others*/
  skip_by_user = 0;

What happens is that if the user running tiptop is root (my_uid == 0)
*and* the process to watch is owned by root (uid == 0) then the
process wil be skipped.  This is consistent on my personal machine, where
when run by root, tiptop shows only my regular user's processes.

This is still buggy, there seems to way to trace root processes AFAICT.
Moreover, the "-K" option (show kernel processes) seems to not work at all.
I'm letting the upstream know about it.

Cheers,
Tomasz

PS. I also found another, unrelated bug which I'm going to submit now.


signature.asc
Description: PGP signature


Bug#820093: tiptop: does not display any task when running as root

2016-04-06 Thread Tomasz Buchert
On 05/04/16 14:24, Lucas Nussbaum wrote:
> Package: tiptop
> Version: 2.2-2
> Severity: important
> 
> Hi Tomasz!

Hi Lucas!
Thank you for this report.

> 
> When trying to run tiptop on Grid'5000 (jessie-x64-min environment), as root,
> it does not display any tasks. (it says "Tasks:   0 total,   0 displayed" at
> the top)
>
> When running as a normal user, it works fine.

I confirm this.

> 
> I tried to compile version 2.3, and the problem also occurs.
>

Ok.

> However, on my laptop (4.4.0-1-amd64 kernel), everything works as expected.

I confirm also that on 4.4.6 (personal build) it works ok.

> Please let me know if you need help to reproduce this bug.

No need to. Ok, the first obvious lead is to test other kernels.
I'll try to compile 4.4.6 and install it in Grid5000.

> 
> - Lucas

Cheers,
Tomasz

> 
> 
> -- System Information:
> Debian Release: 8.2
>   APT prefers stable
>   APT policy: (500, 'stable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 3.16.0-4-amd64 (SMP w/16 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: 
> LC_ALL set to en_US.UTF-8)
> Shell: /bin/sh linked to /bin/bash
> Init: systemd (via /run/systemd/system)
> 
> Versions of packages tiptop depends on:
> ii  libc62.19-18+deb8u4
> ii  libncurses5  5.9+20140913-1+b1
> ii  libtinfo55.9+20140913-1+b1
> ii  libxml2  2.9.1+dfsg1-5+deb8u1
> 
> tiptop recommends no packages.
> 
> tiptop suggests no packages.
> 
> -- no debconf information
> 


signature.asc
Description: PGP signature


Bug#820093: tiptop: does not display any task when running as root

2016-04-05 Thread Lucas Nussbaum
Package: tiptop
Version: 2.2-2
Severity: important

Hi Tomasz!

When trying to run tiptop on Grid'5000 (jessie-x64-min environment), as root,
it does not display any tasks. (it says "Tasks:   0 total,   0 displayed" at
the top)

When running as a normal user, it works fine.

I tried to compile version 2.3, and the problem also occurs.

However, on my laptop (4.4.0-1-amd64 kernel), everything works as expected.

Please let me know if you need help to reproduce this bug.

- Lucas


-- System Information:
Debian Release: 8.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/16 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages tiptop depends on:
ii  libc62.19-18+deb8u4
ii  libncurses5  5.9+20140913-1+b1
ii  libtinfo55.9+20140913-1+b1
ii  libxml2  2.9.1+dfsg1-5+deb8u1

tiptop recommends no packages.

tiptop suggests no packages.

-- no debconf information