Project

General

Profile

Actions

Bug #4749

closed

ilbd_run_probe() has several problems with resource releasing

Added by Serghei Samsi over 8 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
networking
Start date:
2015-11-10
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

ILB daemon RSS continuously grows if it has active rules with health-check.
RSS growth during an hour:
102657 daemon 3604K 2280K sleep 59 0 0:00:00 0.1% ilbd/1
102657 daemon 3604K 2328K sleep 59 0 0:00:00 0.0% ilbd/1
102657 daemon 3604K 2584K sleep 59 0 0:00:00 0.0% ilbd/1
102657 daemon 3608K 2620K sleep 59 0 0:00:02 0.8% ilbd/1
102657 daemon 3736K 2748K sleep 59 0 0:00:17 0.0% ilbd/1

truss output shows that the problem in ilbd_run_probe() which doesn't release resources after usage of posix_spawn_file_actions_* and posix_spawnattr_*:

/1@1:    2.6014 -> libc:posix_spawn_file_actions_init(0x8047c9c, 0x4, 0x82, 0x1789)
/1@1:    2.6168 <- libc:posix_spawn_file_actions_init() = 0
/1@1:    2.6184 -> libc:posix_spawnattr_init(0x8047c98, 0x4, 0x82, 0x1789)
/1@1:    2.6345   -> libc:lmalloc()
/1@1:    2.6498     -> libc:getbucketnum()
/1@1:    2.6659     <- libc:getbucketnum() = 0
/1@1:    2.6674     -> libc:lmutex_lock()
/1@1:    2.6831     <- libc:lmutex_lock() = 0xfef2c1c0
/1@1:    2.6846     -> libc:lmutex_unlock()
/1@1:    2.7017     <- libc:lmutex_unlock() = 0
/1@1:    2.7032   <- libc:lmalloc() = 0xfeace680

Another detected problem is double-freeing memory due to incorrect position of destroy_argv() on line 1359 if test condition evaluates to true on line 1367 (file usr/src/cmd/cmd-inet/usr.lib/ilbd/ilbd_hc.c)


Subtasks 1 (0 open1 closed)

Bug #6452: ilbd leaks lmalloc() memory due to posix_spawn() sloppinessClosedDan McDonald2015-11-10

Actions
Actions

Also available in: Atom PDF