I ran the program pstree -p 31872 which printed the following output:
The man page for pstree says:
Child threads of a process are found under the parent process and are shown with the process name in curly braces, e.g.
(The above is displayed differently because of the missing -p option, which disables compaction.)
Running pstree 31872 without -p gives:
When I try to observe those PIDS using ps, no results are found. However, the pids, exist in /proc.
My question is, why would threads have different pids? I would expect them to be the same (31872) as the process. The same behavior is observed when running htop.