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

ssl_check memory leak #5624

Closed
ilyam8 opened this issue Mar 13, 2019 · 4 comments
Closed

ssl_check memory leak #5624

ilyam8 opened this issue Mar 13, 2019 · 4 comments
Assignees
Labels
area/collectors Everything related to data collection bug collectors/python.d

Comments

@ilyam8
Copy link
Member

ilyam8 commented Mar 13, 2019

Bug report summary

ssl_check module has memory leak

looks like that is the problem:

memory leak in SSLSocket.getpeercert()

https://bugs.python.org/issue29738

Screenshot_20190313_190814

^^ i use update_every 1 in my test

OS / Environment

debian9.6, Python 2.7.13 (default, Sep 26 2018, 18:42:22)

Netdata version (ouput of netdata -V)

netdata v1.12.2-40-g97699c5c

Component Name

collectors/python.d.plugin/sslcheck

Steps To Reproduce
  • run ssl_check module
  • wait
  • profit memory leak

https://bugs.python.org/issue25569

import socket
import ssl
import sys


def main():
    ctx = ssl.create_default_context()
    s = socket.create_connection(('www.bing.com', 443))
    s = ctx.wrap_socket(s, server_hostname='www.bing.com')
    while True:
        s.getpeercert()

        sys.stderr.write('.')
        sys.stderr.flush()


if __name__ == '__main__':
    main()
Expected behavior

no memory leak

@ilyam8
Copy link
Member Author

ilyam8 commented Mar 13, 2019

@p-thurner

@ilyam8
Copy link
Member Author

ilyam8 commented Mar 13, 2019

python version will be removed, this module will be rewritten in go

@ilyam8 ilyam8 self-assigned this Mar 13, 2019
@ghost
Copy link

ghost commented Mar 13, 2019

oh. pity :/ will you take care of the rewrite in go? I'm not much fluent in golang.

@ilyam8
Copy link
Member Author

ilyam8 commented Mar 13, 2019

yes 👍

ilyam8 added a commit that referenced this issue Mar 13, 2019
##### Summary

Fixes: #5624

> memory leak in SSLSocket.getpeercert()

https://bugs.python.org/issue29738

##### Component Name
[collectors/python.d.plugin/sslcheck](https://github.com/netdata/netdata/tree/master/collectors/python.d.plugin/sslcheck)
##### Additional Information
This was referenced Mar 14, 2019
ilyam8 added a commit that referenced this issue Mar 15, 2019
##### Summary

rename

> health/health.d/sslcheck.conf → health/health.d/x509check.conf

**Why**

sslcheck module (#5365) was removed(#5626) because of memory leak bug (#5624).

The module was rewritten in go (#5631, netdata/go.d.plugin#166). New module name - `x509check`. 

This PR changes name of the alarm.
jackyhuang85 pushed a commit to jackyhuang85/netdata that referenced this issue Jan 1, 2020
##### Summary

Fixes: netdata#5624

> memory leak in SSLSocket.getpeercert()

https://bugs.python.org/issue29738

##### Component Name
[collectors/python.d.plugin/sslcheck](https://github.com/netdata/netdata/tree/master/collectors/python.d.plugin/sslcheck)
##### Additional Information
jackyhuang85 pushed a commit to jackyhuang85/netdata that referenced this issue Jan 1, 2020
##### Summary

rename

> health/health.d/sslcheck.conf → health/health.d/x509check.conf

**Why**

sslcheck module (netdata#5365) was removed(netdata#5626) because of memory leak bug (netdata#5624).

The module was rewritten in go (netdata#5631, netdata/go.d.plugin#166). New module name - `x509check`. 

This PR changes name of the alarm.
@ilyam8 ilyam8 added collectors/python.d area/collectors Everything related to data collection and removed area/external/python labels Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collectors Everything related to data collection bug collectors/python.d
Projects
None yet
Development

No branches or pull requests

1 participant