Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fping plugin causing growing fping defunct/zombie processes #133

Closed
mattlan opened this issue Sep 15, 2021 · 4 comments · Fixed by #151
Closed

fping plugin causing growing fping defunct/zombie processes #133

mattlan opened this issue Sep 15, 2021 · 4 comments · Fixed by #151
Labels
Milestone

Comments

@mattlan
Copy link

mattlan commented Sep 15, 2021

vaping version: 1.4.2
pypy version: 7.3.5 (python 3.7.10)
fping version: 3.10

vaping config:

probes:
  - name: latency
    type: std_fping
    output:
      - prometheus
    testing_hosts:
      hosts:
        - host: 1.1.1.1
          name: Cloudflare DNS
plugins:
  - name: std_fping
    type: fping
    count: 10
    interval: 3s
    output:
      - prometheus
  - name: prometheus
    type: prometheus
    port: 9090

As summary notes, when leveraging the fping plugin I am seeing these continually grow over time until the vaping process eventually dies.

root     15904  0.0  0.0      0     0 pts/0    Z    12:39   0:00 [fping] <defunct>
root     15968  0.0  0.0      0     0 pts/0    Z    12:40   0:00 [fping] <defunct>
root     15974  0.0  0.0      0     0 pts/0    Z    12:40   0:00 [fping] <defunct>
root     15979  0.0  0.0      0     0 pts/0    Z    12:40   0:00 [fping] <defunct>
root     15991  0.0  0.0      0     0 pts/0    Z    12:40   0:00 [fping] <defunct>

I believe I've resolved this locally by changing these lines to this:

with self.popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as proc:
    for line in iter(proc.stdout.readline, b""):
        data.append(self.parse_verbose(line.decode("utf-8")))

If I get a chance this week will submit a PR, but just noting this in case anyone else runs into this in the meantime.

@vegu
Copy link
Contributor

vegu commented Sep 16, 2021

Thanks for the report - will look at this asap.

@vegu vegu added the bug label Sep 16, 2021
@vegu
Copy link
Contributor

vegu commented Sep 21, 2021

@mattlan Not having any luck reproducing on centos 7 with python 3.7.4 or python 3.9.0, also tried with and without --debug flag

Proposed fix looks reasonable though, will discuss with @grizz

@mattlan
Copy link
Author

mattlan commented Sep 21, 2021

Odd, maybe something specific to pypy? It was happening every time I ran it for me, then went away when I made the referenced change.

@mattlan
Copy link
Author

mattlan commented Sep 21, 2021

I also have a few internal hosts as part of my testing_hosts, in case that also matters. I omitted them from my attached config.

@vegu vegu added this to the Next release milestone Nov 12, 2021
@vegu vegu mentioned this issue Feb 21, 2022
@vegu vegu closed this as completed in #151 Mar 16, 2022
vegu added a commit that referenced this issue Mar 16, 2022
* adjust changelog

* fix issue with fping defunct/zombie processes (#133)

* changelog

* drop py3.6 support

* poetry relock

* run pyupgrade

* linting

* fix test workflow

* lint tests

* custom layout example

* documentation on custom layouts (#148)

* fix rtd

* rename file

* poetry relock

* changelog

* poetry relock

* linting

* remove py3.6

* fix mtr test

* linting

* Update layout.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants