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-next>] [day] [month] [year] [list]
Message-ID: <20230923093037.961232-1-yangjihong1@huawei.com>
Date:   Sat, 23 Sep 2023 09:30:33 +0000
From:   Yang Jihong <yangjihong1@...wei.com>
To:     <peterz@...radead.org>, <mingo@...hat.com>, <acme@...nel.org>,
        <mark.rutland@....com>, <alexander.shishkin@...ux.intel.com>,
        <jolsa@...nel.org>, <namhyung@...nel.org>, <irogers@...gle.com>,
        <adrian.hunter@...el.com>, <linux-perf-users@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
CC:     <yangjihong1@...wei.com>
Subject: [PATCH 0/4] perf bench messaging: Kill child processes when exit abnormally in process mode

If perf bench messaging in process mode exits abnormally, the forked child
processes does not exit.

The test result is as follows:

  # perf bench sched messaging -l 1000000 -g 1 &
  [4] 553
  # Running 'sched/messaging' benchmark:
  # kill -15 533
  # ps -ef | grep perf
  root         425     371  0 09:11 pts/0    00:00:00 perf bench sched messaging -l 1000000 -g 1
  root         426     425 17 09:11 pts/0    00:01:56 perf bench sched messaging -l 1000000 -g 1
  root         427     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         428     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         429     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         430     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         431     425 17 09:11 pts/0    00:01:56 perf bench sched messaging -l 1000000 -g 1
  root         432     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         433     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         434     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         435     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         436     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         437     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         438     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         439     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         440     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         441     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         442     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         443     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         444     425 17 09:11 pts/0    00:01:54 perf bench sched messaging -l 1000000 -g 1
  root         445     425 17 09:11 pts/0    00:01:55 perf bench sched messaging -l 1000000 -g 1
  root         446     425 16 09:11 pts/0    00:01:50 perf bench sched messaging -l 1000000 -g 1
  root         447     425 16 09:11 pts/0    00:01:49 perf bench sched messaging -l 1000000 -g 1
  root         448     425 16 09:11 pts/0    00:01:50 perf bench sched messaging -l 1000000 -g 1
  root         449     425 16 09:11 pts/0    00:01:49 perf bench sched messaging -l 1000000 -g 1
  root         450     425 16 09:11 pts/0    00:01:50 perf bench sched messaging -l 1000000 -g 1
  root         451     425 16 09:11 pts/0    00:01:50 perf bench sched messaging -l 1000000 -g 1
  root         452     425 16 09:11 pts/0    00:01:50 perf bench sched messaging -l 1000000 -g 1
  root         453     425 16 09:11 pts/0    00:01:49 perf bench sched messaging -l 1000000 -g 1
  root         454     425 16 09:11 pts/0    00:01:49 perf bench sched messaging -l 1000000 -g 1
<SNIP>

Capture signals SIGINT and SIGTERM to kill child processes in signal handler

Yang Jihong (4):
  perf bench messaging: Fix coding style issues for sched-messaging
  perf bench messaging: Factor out create_worker()
  perf bench messaging: Store chlid process pid when creating worker for
    process mode
  perf bench messaging: Kill child processes when exit abnormally in
    process mode

 tools/perf/bench/sched-messaging.c | 102 ++++++++++++++++++-----------
 1 file changed, 64 insertions(+), 38 deletions(-)

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ