Project

General

Profile

Bug #29436

katello-host-tools-tracer stats paths abusively, leading to a hang or slowness of yum command

Added by Jonathon Turel 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
High
Category:
Tooling
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

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>
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>
...
-------
8< ---------------- 8< ---------------- 8< ---------------- 8< --------

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

  1. 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"

  1. 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>
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>
...
-------
8< ---------------- 8< ---------------- 8< ---------------- 8< --------

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.

History

#1 Updated by Jonathon Turel 7 months ago

  • Target version set to Katello 3.16.0
  • Assignee set to Jonathon Turel
  • Status changed from New to Ready For Testing
  • 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
  • Pull request https://github.com/FrostyX/tracer/pull/135 added

#2 Updated by Jonathon Turel 7 months ago

  • Category set to Tooling

#3 Updated by James Jeffers 7 months ago

  • Triaged changed from No to Yes

#4 Updated by Jonathon Turel 7 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF