Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
It would be nice if some just started mariabackup reports its process id like a DB server does.
|
|
Some main use case would be during testing (RQG, MTR might need that too).
|
|
Use cases met during RQG testing:
|
The source DB server is under high load.
|
mariabackup --backup data to some other location is running concurrent.
|
The main RQG process detects whatever non expected behavior of
|
- mariabackup (some RQG timeout related to mariabackup gets exceeded)
|
Observed example (2024):
|
mariabackup --backup could hang endless if some concurrent InnoDB log resizing happens
|
- whatever != mariabackup
|
Than the test including all its running processes (DB server, mariabackup etc.)
|
need to be finished and the resources (ports, stuff in filesystem) freed.
|
If not the following bad things could happen later
|
- The archiving (tar) of the remains of the failing test meets changing files
|
--> rotten traces, cores etc.
|
- The next test using the same resources (ports etc.) collides with not yet stopped
|
DB server, mariabackup etc. and shows mysterious fake errors.
|
The main RQG process takes care of its children but the pids of grand children and
|
grand grand children are sometimes unknown.
|
Process chains look like
|
a) main RQG - DB starter (pid is known) - maybe bash - maybe rr
|
- mariadbd (pid in error log + pidfile)
|
The current RQG can handle some hanging mariadbd well by attacking
|
the mariadbd process and waiting till the DB starter (child) can be reaped.
|
b) main RQG - reporter (pid is known) - maybe bash - maybe rr - mariabackup (pid unknown)
|
|
Experiments with
|
test setup leading to endless hanging mariabackup --backup
|
+ mariabackup writing a message about its pid to STDERR
|
+ new lean code in the RQG component checking mariabackup
|
were successful.
|
|
Experiments with alternative solutions for discovering the pid of mariabackup via
|
- fuser <some file opened by mariabackup>
|
Observation: rr will open that file too -> more ugly code
|
Fear: What to do if mariabackup hangs before that file is opened at all?
|
- ps or pstree command and
|
- walk along the parent - child relationships till reaching mariabackup or
|
- inspect the processes belonging to the processgroup till reaching ... or
|
- collect all processes running mariabackup (there are concurrent RQG tests)
|
and search for specific data in command line content
|
were made.
|
But all these alternative solutions are extreme biased to Linux, require rather
|
ugly Perl code and seem to be quite error prone.
|
|
Many thanks in advance
|
|