This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 790693

Summary: 4 functions with reference leaks within sssd (src/python/pyhbac.c)
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: sssdAssignee: Stephen Gallagher <sgallagh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: dmalcolm, jhrozek, lslebodn, preichl, sbose, sgallagh, ssorce
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.12.3-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 790854 (view as bug list) Environment:
Last Closed: 2015-01-17 18:57:54 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 789472, 790854    

Description Dave Malcolm 2012-02-15 03:16:53 EST
Description of problem:
I've been writing an experimental static analysis tool to detect bugs commonly
occurring within C Python extension modules:
  https://fedorahosted.org/gcc-python-plugin/
  http://gcc-python-plugin.readthedocs.org/en/latest/cpychecker.html

I ran the latest version of the tool (in git master; post 0.9) on sssd-1.6.2-5.fc16.src.rpm, and it reports various errors, 4 of which appear to be genuine memory leaks.

You can see a list of errors here, triaged into categories (from most
significant to least significant):
http://fedorapeople.org/~dmalcolm/gcc-python-plugin/2012-02-15/sssd-1.6.2-5.fc16/

Note that the 4 bugs reported in the top-most category ("Reference count too low") appear to be false positives due to bugs in the tool.

I believe that the 3 errors reported within the second category ("Reference leaks") *are* genuine memory leaks.

Within the third category ("Possible reference leaks"), I believe that the first two errors are false positives, but the third appears to be a genuine leak:
  src/python/pysss.c:PySssLocalObject_new: ob_refcnt of '*self' is 1 too high

The fourth category ("Returning (PyObject*)NULL without setting an exception") appear to all be false positives: the checker doesn't know that PyErr_SetSssError(ret) sets an exception.

There may of course be other bugs in my checker tool.

Hope this is helpful; let me know if you need help reading the logs that the tool generates - I know that it could use some improvement.

Version-Release number of selected component (if applicable):
sssd-1.6.2-5.fc16
gcc-python-plugin post-0.9 git 073d390de53ef52136bd90e5ac06f1ef833d047d running the checker manually in an *f16* chroot; automated build failed with 
checking whether we are cross compiling... configure: error: in `/builddir/build/BUILD/sssd-1.6.2':
configure: error: cannot run C compiled programs.

which seemed to be due to "-specs=/usr/lib/rpm/redhat/redhat-hardened-ld" in LDFLAGS ; could be due to using f16 chroot, rather than rawhide/f17.

[1] http://fedoraproject.org/wiki/Features/StaticAnalysisOfPythonRefcounts
Comment 1 Stephen Gallagher 2012-02-15 08:17:38 EST
Upstream ticket:
https://fedorahosted.org/sssd/ticket/1195
Comment 2 Fedora End Of Life 2013-04-03 15:44:19 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 4 Jakub Hrozek 2015-01-07 10:45:56 EST
* master: c52d7c41e4127a84f487777c0efa6996f6389c51
Comment 5 Fedora Update System 2015-01-09 15:13:02 EST
sssd-1.12.3-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/sssd-1.12.3-2.fc21
Comment 6 Fedora End Of Life 2015-01-09 17:25:56 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 7 Fedora Update System 2015-01-10 06:55:55 EST
sssd-1.12.3-2.fc21 has been pushed to the Fedora 21 testing repository.
Comment 8 Fedora Update System 2015-01-17 18:57:54 EST
sssd-1.12.3-2.fc21 has been pushed to the Fedora 21 stable repository.