[Python-modules-team] Bug#881581: python3-pyqt5: PyQt5 Leaks memory on dereference of QStyleOptionTab

Jay Kamat jaygkamat at gmail.com
Mon Nov 13 06:24:29 UTC 2017


Package: python3-pyqt5
Version: 5.7+dfsg-5
Severity: normal

Dear Maintainer,


The version of PyQt5 in the Debian stretch archives seems to leak memory on 
deference of a QStyleOptionTab.

I have created a simple python file to reproduce the issue:

		import resource
		from PyQt5.QtWidgets import QStyleOptionTab
		import tracemalloc

		before = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
		print(before)

		opt = QStyleOptionTab()

		for i in range(10000000):
			a = opt.rect

		after = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
		print(after)

		if after > before + 10000:
			print("you seem to be leaking memory?")
		else:
			print("you're probably fine...")

On a normal system, this snippet should print "you're probably fine...",
but on debian stable it prints "you seem to be leaking memory?".

This issue also affects fedora25.

Is it possible that a patch could be prepared for this, or is it too
late for that in stable now? I think this has been fixed in testing, but
I have not verified it.

Here is the original issue where I found and debugged the problem:
https://github.com/qutebrowser/qutebrowser/issues/3280

This currently affects:

- Debian Stable
- Ubuntu zesty
- Fedora 25

And curiously, the 5.7.1 PyQt5 on pypi does not suffer from this.

Please let me know if you need any additional information.

-Jay

-- System Information:
Debian Release: 9.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-pyqt5 depends on:
ii  libc6                            2.24-11+deb9u1
ii  libgcc1                          1:6.3.0-18
ii  libpython3.5                     3.5.3-1
ii  libqt5core5a [qtbase-abi-5-7-1]  5.7.1+dfsg-3+b1
ii  libqt5dbus5                      5.7.1+dfsg-3+b1
ii  libqt5designer5                  5.7.1-1
ii  libqt5gui5                       5.7.1+dfsg-3+b1
ii  libqt5help5                      5.7.1-1
ii  libqt5network5                   5.7.1+dfsg-3+b1
ii  libqt5printsupport5              5.7.1+dfsg-3+b1
ii  libqt5test5                      5.7.1+dfsg-3+b1
ii  libqt5widgets5                   5.7.1+dfsg-3+b1
ii  libqt5xml5                       5.7.1+dfsg-3+b1
ii  libstdc++6                       6.3.0-18
ii  python3                          3.5.3-1
ii  python3-sip [sip-py3api-11.3]    4.18.1+dfsg-2

python3-pyqt5 recommends no packages.

Versions of packages python3-pyqt5 suggests:
pn  python3-pyqt5-dbg  <none>

-- no debconf information



More information about the Python-modules-team mailing list