Bug #29436
closedkatello-host-tools-tracer stats paths abusively, leading to a hang or slowness of yum command
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1752880
Description of problem:
When having the katello-host-tools-tracer package installed on the system, many processes are scanned when a yum operation is performed.
In particular it seems that arguments of these processes are collected, then stat() is issued on the arguments, which is usually non-sense:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
15160 15:09:27.340215 stat("--no-daemon", 0x7ffec78c75f0) = 1 ENOENT (No such file or directory) <0.000012> 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
15160 15:09:27.376073 stat("--keep-baud", 0x7ffec78c75f0) = -1 ENOENT (No such file or directory) <0.000012>
15160 15:09:27.380001 stat("--noclear", 0x7ffec78c75f0) = -1 ENOENT (No such file or directory) <0.000013>
...
-------
If for some reason a process argument looks like a path name on a remote location which is not accessible (e.g. an automount), this makes the yum process hang indefinitely.
Version-Release number of selected component (if applicable):
katello-host-tools-tracer-3.5.0-2.el7sat.noarch
katello-host-tools-tracer-3.3.5-5.el7sat.noarch
How reproducible:
Always (the "dumb" stats calls at least)
Steps to Reproduce:
1. Execute the following python code
- strace
fttTvyy -o /tmp/tracer.strace -s 4096 -e stat -python << EOF
import katello.tracer
print katello.tracer.query_affected_apps()
EOF
2. Check the strace for "ENOENT"
- grep -w ENOENT /tmp/tracer.strace | grep -v "/"
Actual results:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
...
15160 15:09:27.206950 stat("--system", 0x7ffec78c75f0) = 1 ENOENT (No such file or directory) <0.000011> 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
15160 15:09:27.206999 stat("--address=systemd:", 0x7ffec78c75f0) = -1 ENOENT (No such file or directory) <0.000010>
15160 15:09:27.207050 stat("--nofork", 0x7ffec78c75f0) = -1 ENOENT (No such file or directory) <0.000010>
15160 15:09:27.207092 stat("--nopidfile", 0x7ffec78c75f0) = -1 ENOENT (No such file or directory) <0.000012>
15160 15:09:27.207136 stat("--systemd-activation", 0x7ffec78c75f0) = -1 ENOENT (No such file or directory) <0.000019>
...
-------
Expected results:
No stat() done on process arguments, in particular if these are known remote paths
Additional info:
I don't know exactly when these stat calls are performed. It looks like this is done when updating some packages.
Updated by Jonathon Turel over 4 years ago
- Subject changed from katello-host-tools-tracer stats paths abusively, leading to a hang or slowness of yum command to katello-host-tools-tracer stats paths abusively, leading to a hang or slowness of yum command
- Status changed from New to Ready For Testing
- Assignee set to Jonathon Turel
- Target version set to Katello 3.16.0
- Pull request https://github.com/FrostyX/tracer/pull/135 added
Updated by Jonathon Turel over 4 years ago
- Status changed from Ready For Testing to Closed