Bug 499493 - run tps under valgrind
Summary: run tps under valgrind
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Dogtag Certificate System
Classification: Retired
Component: TPS
Version: unspecified
Hardware: All
OS: Linux
urgent
medium
Target Milestone: ---
Assignee: Jenny Severance
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 443788
TreeView+ depends on / blocked
 
Reported: 2009-05-06 21:00 UTC by Chandrasekar Kannan
Modified: 2015-01-04 23:38 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-07-22 23:35:04 UTC
Embargoed:


Attachments (Terms of Use)
Valgrind logs with full leak check (190.00 KB, application/x-tar)
2009-06-29 20:22 UTC, Jenny Severance
no flags Details
valgrind logs startup with no signing (70.00 KB, application/x-tar)
2009-07-06 16:01 UTC, Jenny Severance
no flags Details
valgrind logs restart log signing enabled (90.00 KB, application/x-tar)
2009-07-06 16:02 UTC, Jenny Severance
no flags Details
valgrind logs tpsclient activitiy (150.00 KB, application/x-tar)
2009-07-06 16:03 UTC, Jenny Severance
no flags Details
valgrind logs admin activity (90.00 KB, application/x-tar)
2009-07-06 16:05 UTC, Jenny Severance
no flags Details

Description Chandrasekar Kannan 2009-05-06 21:00:02 UTC
we prefer to run tps under valgrind to detect
for memory leaks while doing some importans tasks like.

- card enrollment
- card format
- card pin reset
- tps admin/agent/operator actions
 -- list certs
 -- show certs
 -- mark token lost/destroyed
 -- add/list/del users/groups

Comment 9 Ade Lee 2009-05-27 19:56:00 UTC
[builder@dhcp231-124 dogtag-src]$ svn ci -m "Bugzilla Bug #499493 - run tps under valgrind" pki/dogtag/tps pki/base/tps 
Sending        pki/base/tps/src/authentication/LDAP_Authentication.cpp
Sending        pki/base/tps/src/cms/CertEnroll.cpp
Sending        pki/base/tps/src/engine/RA.cpp
Sending        pki/base/tps/src/include/engine/RA.h
Sending        pki/base/tps/src/modules/tokendb/mod_tokendb.cpp
Sending        pki/base/tps/src/modules/tps/AP_Session.cpp
Sending        pki/base/tps/src/msg/RA_Extended_Login_Response_Msg.cpp
Sending        pki/base/tps/src/processor/RA_Enroll_Processor.cpp
Sending        pki/base/tps/src/processor/RA_Format_Processor.cpp
Sending        pki/base/tps/src/processor/RA_Pin_Reset_Processor.cpp
Sending        pki/base/tps/src/processor/RA_Processor.cpp
Sending        pki/base/tps/src/tus/tus_db.c
Sending        pki/dogtag/tps/pki-tps.spec
Transmitting file data .............
Committed revision 500.

Comment 12 Ade Lee 2009-06-29 19:26:39 UTC
Jenny, 

Please rerun the test and add the argument 
--leak-check=full 

to the set of arguments to valgrind.  This will provide the information I need to see where the leaks you found occur.

Comment 13 Jenny Severance 2009-06-29 19:28:45 UTC
sure!

Comment 14 Jenny Severance 2009-06-29 20:22:38 UTC
Created attachment 349870 [details]
Valgrind logs with full leak check

Attaching valgrind logs with full leak check enabled.

Comment 16 Jack Magne 2009-07-01 17:30:19 UTC
Ade, this patch looks good. One caveat, there is a specific function you can use to free a SECItem. Look here: http://www.mozilla.org/projects/security/pki/nss/ref/ssl/ssltyp.html#1030620

Take a look at that and see if it would better fit the bill for deleting that signedResult variable.

Attachement: (id=350138) +jmagne.

Comment 17 Ade Lee 2009-07-01 18:32:56 UTC
Jack's change added ..

[builder@dhcp231-124 pki]$ svn ci -m "Bugzilla Bug #499493 - Run TPS under valgrind" base/tps dogtag/tps
Sending        base/tps/src/engine/RA.cpp
Sending        base/tps/src/main/ConfigStore.cpp
Sending        dogtag/tps/pki-tps.spec
Transmitting file data ...
Committed revision 666.

Comment 19 Jenny Severance 2009-07-06 16:01:27 UTC
Created attachment 350630 [details]
valgrind logs startup with no signing

attached valgrind logs - startup with no signing

Comment 20 Jenny Severance 2009-07-06 16:02:17 UTC
Created attachment 350631 [details]
valgrind logs restart log signing enabled

valgrind logs restart with log signing enabled.

Comment 21 Jenny Severance 2009-07-06 16:03:25 UTC
Created attachment 350632 [details]
valgrind logs tpsclient activitiy

valgrind logs with tpsclient activity
1. restart tps
2. format token
3. enroll token
4. reset pin

Comment 22 Jenny Severance 2009-07-06 16:05:42 UTC
Created attachment 350633 [details]
valgrind logs admin activity

valgrind logs with admin activity:
1. restart tps with log signing
2. list/search tokens
3. add token
4. add user
5. edit user add all profiles
6. edit token re-enroll
7. delete token
8. delete user
9. list/search/delete activity
10. edit audit signing configuration - selected events

Comment 23 Ade Lee 2009-07-06 16:53:48 UTC
after looking at the logs uploaded by Jenny - confirmed that the only leaks observed are those on startup.

Recommend that we close this bug as verified and clone as a medium priority bug for 8.1 to fix startup leaks.

Comment 24 Jenny Severance 2009-07-06 17:06:07 UTC
Verified:
remaining leaks are in startup and being address by bug 481670 - see attached valgrind logs


Note You need to log in before you can comment on or make changes to this bug.