Closed
Bug 397487
Opened 17 years ago
Closed 17 years ago
AddrInfo not freed on strsclnt shutdown.
Categories
(NSS :: Tools, defect, P2)
Tracking
(Not tracked)
RESOLVED
WONTFIX
3.12
People
(Reporter: slavomir.katuscak+mozilla, Unassigned)
References
Details
(Keywords: memory-leak)
Variable addrInfo allocated in client_main by PR_GetAddrInfoByName is not freed on strsclnt shutdown. Block in use (biu): Found 7 blocks totaling 78 bytes (1.92% of total; avg block size 11) At time of each allocation, the call stack was: [1] _strdup() at 0xb4d4b313 [2] gettoken() at 0xb9d20e16 [3] fgetnetconfig() at 0xb9d20c25 [4] getnetlist() at 0xb9d20900 [5] setnetconfig() at 0xb9d1452d [6] __rpc_getconfip() at 0xb9d4806f [7] getipnodebyname() at 0xb9d2fd05 [8] get_addr() at 0xb8904484 [9] getaddrinfo() at 0xb890416e [10] PR_GetAddrInfoByName() at line 2045 in "prnetdb.c" [11] client_main() at line 1108 in "strsclnt.c" [12] main() at line 1469 in "strsclnt.c" Block in use (biu): Found block of size 64 bytes at address 0x80c8c10 (1.57% of total) At time of allocation, the call stack was: [1] calloc() at 0xb4d308a0 [2] fgetnetconfig() at 0xb9d20b4e [3] getnetlist() at 0xb9d208ec [4] setnetconfig() at 0xb9d1452d [5] __rpc_getconfip() at 0xb9d4806f [6] getipnodebyname() at 0xb9d2fd05 [7] get_addr() at 0xb8904484 [8] getaddrinfo() at 0xb890416e [9] PR_GetAddrInfoByName() at line 2045 in "prnetdb.c" [10] client_main() at line 1108 in "strsclnt.c" [11] main() at line 1469 in "strsclnt.c"
Comment 1•17 years ago
|
||
Slavo, we need to know the command with which these leaks can be reproduced. The leak that occurred 7 times is the one of greatest concern. These leaks may be in NSS or NSPR or an underlying OS library.
Reporter | ||
Comment 2•17 years ago
|
||
These leaks are from strsclnt vs. selfserv tests from strsclnt side (only). In function client_main there is part where PR_GetAddrInfoByName() is called and then PR_FreeAddrInfo(). Seems that this part is called everytime when strsclnt starts (from client_main()).
Comment 3•17 years ago
|
||
Wan-Teh, please look at this, if you have time. This is either a) a bug in the application program, not freeing something allocated at its requests, or b) a bug in NSPR, not freeing something allocated at its requests, or c) a bug in the underlying libc. Can you identify which of those cases is (are) relevant here?
Priority: -- → P2
Target Milestone: --- → 3.12
Comment 4•17 years ago
|
||
It seems to be c) a bug in the underlying libc. Each invocation of strsclnt only calls PR_GetAddrInfoByName once. So the 7 calls to _strdup are probably done in a loop inside fgetnetconfig().
Comment 5•17 years ago
|
||
If this is a bug in the underlying libc, then we cannot fix it in NSS or in NSPR. So -> WONTFIX.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Comment 7•17 years ago
|
||
I changed the leak stack pattern for this bug to detect all the leaks in this particular libc code, so that as new stacks appear that have this same cause, they will not turn the tree orange. Such a change is not normal for this file, but in this case, since the cause of this leak is outside of our control, we can just ignore all occurrences of it. Checking in tests/memleak/ignored; new revision: 1.28; previous revision: 1.27
You need to log in
before you can comment on or make changes to this bug.
Description
•