Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Strange process with only a letter..?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Duncan Mac Leod
Guru
Guru


Joined: 02 May 2004
Posts: 312
Location: Germany

PostPosted: Mon Apr 01, 2024 3:58 pm    Post subject: Strange process with only a letter..? Reply with quote

I have four Gentoo boxes, three of them I 've updated within the last 48h.

Two boxes are showing a process only with a letter 'U'...
Code:

  815 pts/0    Ss     0:00 -bash
  817 pts/0    S      0:00 su
  818 pts/0    S      0:00 U

and
Code:

 39954 pts/0    Ss     0:00 -bash
 39956 pts/0    S      0:00 su
 39978 pts/0    S      0:00 U

the other box shows a letter 'V'...
Code:

 2709 pts/0    Ss     0:00 -bash
 2711 pts/0    S      0:00 su
 2712 pts/0    S      0:00 V

The 4th box which I did not touch since the end of Jan 2024 does not show such a letter...
Code:

12955 pts/0    Ss     0:00 -bash
12957 pts/0    S      0:00 su
12958 pts/0    S      0:00 bash

Was this triggered by an update, which introduces such 'letters' ?

[Moderator edit: added [code] tags to preserve output layout -- after logrusx reminded OP to do so. -Hu]
Back to top
View user's profile Send private message
kgdrenefort
Apprentice
Apprentice


Joined: 19 Sep 2023
Posts: 216
Location: Somewhere in the 77

PostPosted: Mon Apr 01, 2024 6:27 pm    Post subject: Reply with quote

Hi,

while watching the ps output, saw the state column, is it where you find these ?

Regards,
GASPARD DE RENEFORT Kévin
_________________
wiki/User:Kgdrenefort/captain_logs My system info
G. does not have problems, only learning opportunities. - NeddyS.
If your installation isn't valuable to you, feel free to continue to ignore the instructions. - figue.
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1584

PostPosted: Mon Apr 01, 2024 6:59 pm    Post subject: Re: Strange process with only a letter..? Reply with quote

Duncan Mac Leod wrote:
I have four Gentoo boxes, three of them I 've updated within the last 48h.

Two boxes are showing a process only with a letter 'U'...

Code:
  815 pts/0    Ss     0:00 -bash
  817 pts/0    S      0:00 su
  818 pts/0    S      0:00 U

and

 39954 pts/0    Ss     0:00 -bash
 39956 pts/0    S      0:00 su
 39978 pts/0    S      0:00 U

the other box shows a letter 'V'...

 2709 pts/0    Ss     0:00 -bash
 2711 pts/0    S      0:00 su
 2712 pts/0    S      0:00 V

The 4th box which I did not touch since the end of Jan 2024 does not show such a letter...

12955 pts/0    Ss     0:00 -bash
12957 pts/0    S      0:00 su
12958 pts/0    S      0:00 bash


Was this triggered by an update, which introduces such 'letters' ?


Use code tags to preserve formatting. When you ask for help, don't make people stare, because they might as well just move on. Share the commands you're running. Think what your helper would need to help him or her to help you. Incomplete questions will only prevent you from getting help.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21724

PostPosted: Mon Apr 01, 2024 7:24 pm    Post subject: Reply with quote

Extending on logrusx's comments, I would want to see:
  • uname -r on all 4 machines
  • ps --version, assuming this is ps output in the opening post
  • bash --version, assuming that the weirdly named processes are supposed to be bash, as it is on the good machine.
  • The exact ps invocation that produced this output
  • A list of what was updated on the bad machines
Back to top
View user's profile Send private message
Duncan Mac Leod
Guru
Guru


Joined: 02 May 2004
Posts: 312
Location: Germany

PostPosted: Tue Apr 02, 2024 3:00 pm    Post subject: Reply with quote

I have found the "cause"...

Upgrade from sys-apps/util-linux-2.38.1-r3 to sys-apps/util-linux-2.39.3-r5 introduces this "behavior".

When I use su to change to root, bash process appears in two entries under util-linux-2.38.1-r3:
Code:

12955 pts/0    Ss     0:00 -bash
12957 pts/0    S      0:00 su
12958 pts/0    S      0:00 bash


Under sys-apps/util-linux-2.39.3-r5 only one process is shown as bash, the other uses 'V' or 'U'.

Code:

 2709 pts/0    Ss     0:00 -bash
 2711 pts/0    S      0:00 su
 2712 pts/0    S      0:00 V


or

Code:

 39954 pts/0    Ss     0:00 -bash
 39956 pts/0    S      0:00 su
 39978 pts/0    S      0:00 U
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4249
Location: Bavaria

PostPosted: Tue Apr 02, 2024 3:34 pm    Post subject: Reply with quote

Hmmm ... I can see it also ... when I do a "wrong" su:
Code:
$ su root
Passwort:
 /home/peter #
 /home/peter # ps a
  PID TTY      STAT   TIME COMMAND
 2396 tty1     Ss+    0:00 /sbin/agetty --noclear 38400 tty1 linux
 2397 tty2     Ss+    0:00 /sbin/agetty 38400 tty2 linux
 2398 tty3     Ss+    0:00 /sbin/agetty 38400 tty3 linux
 2399 tty4     Ss+    0:00 /sbin/agetty 38400 tty4 linux
 2400 tty5     Ss+    0:00 /sbin/agetty 38400 tty5 linux
 2401 tty6     Ss+    0:00 /sbin/agetty 38400 tty6 linux
 4949 pts/1    Ss     0:00 /bin/bash
 4963 pts/1    S      0:00 su -
 4966 pts/1    S      0:00 -bash
32514 pts/1    S      0:00 su - peter
32515 pts/1    S+     0:00 -bash
32565 pts/2    Ss     0:00 /bin/bash
32568 pts/2    S      0:00 su root
32572 pts/2    S      0:00 U
32574 pts/2    R+     0:00 ps a
 /home/peter # exit
exit
 ~ $ su - root
Passwort:
Letzte Anmeldung: Dienstag, den 02. April 2024, 11:07:47 CEST auf pts/1
 ~ # ps a
  PID TTY      STAT   TIME COMMAND
 2396 tty1     Ss+    0:00 /sbin/agetty --noclear 38400 tty1 linux
 2397 tty2     Ss+    0:00 /sbin/agetty 38400 tty2 linux
 2398 tty3     Ss+    0:00 /sbin/agetty 38400 tty3 linux
 2399 tty4     Ss+    0:00 /sbin/agetty 38400 tty4 linux
 2400 tty5     Ss+    0:00 /sbin/agetty 38400 tty5 linux
 2401 tty6     Ss+    0:00 /sbin/agetty 38400 tty6 linux
 4949 pts/1    Ss     0:00 /bin/bash
 4963 pts/1    S      0:00 su -
 4966 pts/1    S      0:00 -bash
32514 pts/1    S      0:00 su - peter
32515 pts/1    S+     0:00 -bash
32565 pts/2    Ss     0:00 /bin/bash
32581 pts/2    S      0:00 su - root
32584 pts/2    S      0:00 -bash
32586 pts/2    R+     0:00 ps a

The same is true the other way:
Code:
# su peter
 /root $
 /root $ ps a
  PID TTY      STAT   TIME COMMAND
 2396 tty1     Ss+    0:00 /sbin/agetty --noclear 38400 tty1 linux
 2397 tty2     Ss+    0:00 /sbin/agetty 38400 tty2 linux
 2398 tty3     Ss+    0:00 /sbin/agetty 38400 tty3 linux
 2399 tty4     Ss+    0:00 /sbin/agetty 38400 tty4 linux
 2400 tty5     Ss+    0:00 /sbin/agetty 38400 tty5 linux
 2401 tty6     Ss+    0:00 /sbin/agetty 38400 tty6 linux
 4949 pts/1    Ss     0:00 /bin/bash
 4963 pts/1    S      0:00 su -
 4966 pts/1    S      0:00 -bash
32502 pts/1    S      0:00 su peter
32503 pts/1    S      0:00 V
32505 pts/1    R+     0:00 ps a
 /root $
 /root $ exit
exit
 ~ # su - peter
Letzte Anmeldung: Dienstag, den 02. April 2024, 10:06:17 CEST auf tty2
 ~ $ ps a
  PID TTY      STAT   TIME COMMAND
 2396 tty1     Ss+    0:00 /sbin/agetty --noclear 38400 tty1 linux
 2397 tty2     Ss+    0:00 /sbin/agetty 38400 tty2 linux
 2398 tty3     Ss+    0:00 /sbin/agetty 38400 tty3 linux
 2399 tty4     Ss+    0:00 /sbin/agetty 38400 tty4 linux
 2400 tty5     Ss+    0:00 /sbin/agetty 38400 tty5 linux
 2401 tty6     Ss+    0:00 /sbin/agetty 38400 tty6 linux
 4949 pts/1    Ss     0:00 /bin/bash
 4963 pts/1    S      0:00 su -
 4966 pts/1    S      0:00 -bash
32514 pts/1    S      0:00 su - peter
32515 pts/1    S      0:00 -bash
32524 pts/1    R+     0:00 ps a

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1584

PostPosted: Tue Apr 02, 2024 8:37 pm    Post subject: Reply with quote

pietinger wrote:
Hmmm ... I can see it also ... when I do a "wrong" su:


Same here:

Code:
$ su
Password:
# ps a
    PID TTY      STAT   TIME COMMAND
   1455 tty2     Ssl+   0:00 /usr/libexec/gdm-wayland-session /usr/bin/gnome-session
   1459 tty2     Sl+    0:00 /usr/libexec/gnome-session-binary
   6543 pts/0    Ss     0:00 bash
 125407 pts/3    Ss     0:00 bash
 845273 pts/0    S      0:00 su -
 845277 pts/0    S+     0:00 -bash
 849542 tty3     Ss+    0:00 /sbin/agetty -o -p -- \u --noclear - linux
 951721 pts/0    S      0:00 dbus-launch --autolaunch=ad76001815d85b86d7541a83618bbdaf --binary-syntax --close-stderr
1196589 pts/1    Ss+    0:00 bash
1227413 pts/3    S      0:00 su
1227416 pts/3    S      0:00 U
1227420 pts/3    R+     0:00 ps a
#
exit
$ su -
Password:
Last login: Thu Mar 28 21:23:42 EET 2024 on pts/3
# ps -a
    PID TTY          TIME CMD
   1459 tty2     00:00:00 gnome-session-b
 845273 pts/0    00:00:00 su
 845277 pts/0    00:00:00 bash
 951721 pts/0    00:00:00 dbus-launch
1227422 pts/3    00:00:00 su
1227426 pts/3    00:00:00 bash
1227428 pts/3    00:00:00 ps


Yesterday when I tested it I didn't see it because I don't do wrong su :)

p.s. the right su is "su -" because you don't want something from the environment of your regular user to mess portage or some other root thing. The dash instructs su to start a clean session as opposed to preserving the user's environment.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Duncan Mac Leod
Guru
Guru


Joined: 02 May 2004
Posts: 312
Location: Germany

PostPosted: Tue Apr 02, 2024 9:43 pm    Post subject: Reply with quote

logrusx wrote:

p.s. the right su is "su -" because you don't want something from the environment of your regular user to mess portage or some other root thing. The dash instructs su to start a clean session as opposed to preserving the user's environment.


Ugh - shame on me! I used su (you call it 'wrong' su) for almost 20 years never breaking my Gentoo box (so far). Didn't know the difference...

Do you know if there are any problems/side-effects on Gentoo using "su" and not "su -"? Never encountered any problems using portage doing system upgrades or managing my system.

Never had the 'V' or 'U' before upgrading from sys-apps/util-linux-2.38.1-r3 to sys-apps/util-linux-2.39.3-r5. Thank you for testing.
Back to top
View user's profile Send private message
colo-des
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2011
Posts: 97

PostPosted: Tue Apr 02, 2024 10:56 pm    Post subject: Reply with quote

We would have to investigate, and go to the source code, maybe it is a new functionality.
Code:
$ pstree -p
$ pldd PID U/V
$ equery belongs libraries
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21724

PostPosted: Tue Apr 02, 2024 11:21 pm    Post subject: Reply with quote

Duncan Mac Leod wrote:
Do you know if there are any problems/side-effects on Gentoo using "su" and not "su -"? Never encountered any problems using portage doing system upgrades or managing my system.
Yes, there are side effects, which is why we routinely chastise people for doing it wrong. The most common side effect is that a user's personal environment variables confuse Portage into doing the wrong thing, so emerge from a /bin/su - works fine, but emerge from su (no dash) fails a build.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1688

PostPosted: Tue Apr 02, 2024 11:39 pm    Post subject: Reply with quote

Yes there are problems if you don't use --login (aka -) with su.
These include permission problems for files created in $HOME as well as security issues. The latter being as simple as someone creating $HOME/.hack/emerge (or ls or any common command), adding it to the start of the user's path, then waiting for some admin to just use "su"
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1584

PostPosted: Wed Apr 03, 2024 4:01 am    Post subject: Reply with quote

Duncan Mac Leod wrote:

Do you know if there are any problems/side-effects on Gentoo using "su" and not "su -"? Never encountered any problems using portage doing system upgrades or managing my system.


Portage side, if there were issues you would have already posted a thread about them and would already have known the above.

Security side - I don't know.

Best Regards,
Georgi
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 325
Location: Naarm/Melbourne, Australia

PostPosted: Wed Apr 03, 2024 5:31 am    Post subject: Reply with quote

Aside from the issues already mentioned, not using `-l` can result in odd behaviours that aren't show-stoppers / don't seem to be particularly significant (at least in the moment): not just when using Portage, but in a variety of other cases as well, making it more difficult to troubleshoot problems.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum