lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 Mar 2024 10:28:41 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
	Adrian Hunter <adrian.hunter@...el.com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Ian Rogers <irogers@...gle.com>, Ingo Molnar <mingo@...hat.com>,
	Jiri Olsa <jolsa@...nel.org>, Marco Elver <elver@...gle.com>,
	Mark Rutland <mark.rutland@....com>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v2 0/4] perf: Make SIGTRAP and __perf_pending_irq() work
 on RT.

On Wed, Mar 13, 2024 at 09:13:03AM +0100, Sebastian Andrzej Siewior wrote:
> On 2024-03-12 18:42:38 [-0300], Arnaldo Carvalho de Melo wrote:
> …
> > But:
> > 
> > [acme@...e ~]$ pidof exec_child
> > 24273 24271 24270 24269 24268 24267 24266 24265 24264 24263 24262 24261 24260 24259 
> …
> 
> > [root@...e ~]# cat /proc/24263/stack
> > [<0>] irqentry_exit_to_user_mode+0x1c9/0x1e0
> > [<0>] asm_sysvec_apic_timer_interrupt+0x16/0x20
> > [root@...e ~]#
> …
> > [acme@...e ~]$ ps ax|grep exec_child| wc -l
> > 504
> > [acme@...e ~]$ ps ax|grep exec_child| tail
> >   24264 pts/0    R      0:04 exec_child
> >   24265 pts/0    R      0:04 exec_child
> >   24266 pts/0    R      0:04 exec_child
> >   24267 pts/0    R      0:04 exec_child
> >   24268 pts/0    R      0:04 exec_child
> >   24269 pts/0    R      0:04 exec_child
> >   24270 pts/0    R      0:04 exec_child
> >   24271 pts/0    R      0:04 exec_child
> >   24273 pts/0    R      0:04 exec_child
> >   26704 pts/1    S+     0:00 grep --color=auto exec_child
> > [acme@...e ~]$
> > 
> > All in 'R' state.
> > 
> > [root@...e ~]# killall exec_child
> > exec_child: no process found
> > [root@...e ~]# ps ax | grep exec_child | head -5
> >   22964 pts/0    R      0:06 exec_child
> >   23046 pts/0    R      0:05 exec_child
> >   23128 pts/0    R      0:05 exec_child
> >   23129 pts/0    R      0:05 exec_child
> >   23181 pts/0    R      0:05 exec_child
> > [root@...e ~]# kill 22964 23046 23128 23129 23181
> > [root@...e ~]# ps ax | grep exec_child | head -5
> >   23182 pts/0    R      0:06 exec_child
> >   23196 pts/0    R      0:06 exec_child
> >   23197 pts/0    R      0:06 exec_child
> >   23210 pts/0    R      0:06 exec_child
> >   23213 pts/0    R      0:06 exec_child
> > [root@...e ~]#
 
> You can't kill them?

I can, they remain in R state and I can kill them with 'kill `pidof exec_child`'
 
> > at the end they disappeared, on this last run.

> > But if I do a 'killall remove_on_exec' and stop that loop (control+C/Z)
> > we get all those exec_child running a seemingly eternal loop:
> 
> Is this new or was it there? Is this VM or bare metal?

bare metal.
 
> One part I don't get: did you let it run or did you kill it?

If I let them run they will finish and exit, no exec_child remains.

If I instead try to stop the loop that goes on forking the 100 of them,
then the exec_child remain spinning.

> `exec_child' spins until a signal is received or the parent kills it. So


> it shouldn't remain there for ever. And my guess, that it is in spinning
> in userland and not in kernel.

Checking that now, the stack is the one I posted:

> > [root@...e ~]# cat /proc/24263/stack
> > [<0>] irqentry_exit_to_user_mode+0x1c9/0x1e0
> > [<0>] asm_sysvec_apic_timer_interrupt+0x16/0x20
> > [root@...e ~]#

> I tried it on bare metal and VM and couldn't reproduce this.

All my tests are in bare metal.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ