Score:2

Multiple instances of app in htop

in flag

Why does htop show two instances of my GUI app TradeClient?

enter image description here

while I started only one instance?

System: Ubuntu 22.04 VPS with X11 (I connect with VNC)

What is its CPU usage?

EDIT1

htop -t

enter image description here

EDIT2

without gdb:

enter image description here

Hack Saw avatar
tz flag
Try htop -t. My guess is that your app is starting a helper thread of some kind. The -t will show which is the parent.
Alexey Starinsky avatar
in flag
@HackSaw There are multiple threads, see EDIT1
Hack Saw avatar
tz flag
It's running under gdb? What's it look like when it's not running in a debugger?
Alexey Starinsky avatar
in flag
@HackSaw yes, see EDIT2
Alexey Starinsky avatar
in flag
@HackSaw I am not sure how threads work on Linux, but on Windows a process with multiple threads has a single PID and is displayed in Task Manager in a single line, but `htop` shows two different PIDs in two separate lines.
Hack Saw avatar
tz flag
Yeah, the thing that htop is telling us is that the first instance is the parent of the second instance. That is to say, the parent forked a new process for whatever reason. The thing I'm not sure about is the involvement of gdb, which is running those instances.
Hack Saw avatar
tz flag
It is to be noted, though, that apps forking themselves for a variety of reasons is pretty common. In Linux the difference between a thread and a process is whether it shares memory with the parent. Processes have their own memory space.
Hack Saw avatar
tz flag
Is this the email client from sourceforge? It appears to fork a bunch of processes to watch various email providers for new messages.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.