Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1347860 > unrolled thread
| Started by | Dmitry Vyukov <dvyukov@google.com> |
|---|---|
| First post | 2016-03-02 10:00 +0100 |
| Last post | 2016-03-02 20:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: net/sctp: sock memory leak Dmitry Vyukov <dvyukov@google.com> - 2016-03-02 10:00 +0100
Re: net/sctp: sock memory leak Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2016-03-02 20:50 +0100
| From | Dmitry Vyukov <dvyukov@google.com> |
|---|---|
| Date | 2016-03-02 10:00 +0100 |
| Subject | Re: net/sctp: sock memory leak |
| Message-ID | <r8aNs-5fM-7@gated-at.bofh.it> |
On Fri, Jan 15, 2016 at 8:11 PM, Dmitry Vyukov <dvyukov@google.com> wrote: > On Fri, Jan 15, 2016 at 7:46 PM, Marcelo Ricardo Leitner > <marcelo.leitner@gmail.com> wrote: >> On Wed, Dec 30, 2015 at 09:42:27PM +0100, Dmitry Vyukov wrote: >>> Hello, >>> >>> The following program leads to a leak of two sock objects: >> ... >>> >>> On commit 8513342170278468bac126640a5d2d12ffbff106 (Dec 28). >> >> I'm afraid I cannot reproduce this one? >> I enabled dynprintk at sctp_destroy_sock and it does print twice when I >> run this test app. >> Also added debugs to check association lifetime, and then it was >> destroyed. Same for endpoint. >> >> Checking with trace-cmd, both calls to sctp_close() resulted in >> sctp_destroy_sock() being called. >> >> As for sock_hold/put, they are matched too. >> >> Ideas? Log is below for double checking > > > Hummm... I can reproduce it pretty reliably. > > [ 197.459024] kmemleak: 11 new suspected memory leaks (see > /sys/kernel/debug/kmemleak) > [ 307.494874] kmemleak: 409 new suspected memory leaks (see > /sys/kernel/debug/kmemleak) > [ 549.784022] kmemleak: 125 new suspected memory leaks (see > /sys/kernel/debug/kmemleak) > > I double checked via /proc/slabinfo: > > SCTPv6 4373 4420 2368 13 8 : tunables 0 0 > 0 : slabdata 340 340 0 > > SCTPv6 starts with almost 0, but grows infinitely while I run the > program in a loop. > > Here is my SCTP related configs: > > CONFIG_IP_SCTP=y > CONFIG_NET_SCTPPROBE=y > CONFIG_SCTP_DBG_OBJCNT=y > # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5 is not set > # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set > CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE=y > # CONFIG_SCTP_COOKIE_HMAC_MD5 is not set > # CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set > > I am on commit 67990608c8b95d2b8ccc29932376ae73d5818727 and I don't > seem to have any sctp-related changes on top. Still happens on 4.5-rc6. Marcelo, try to apply my config (if yours differs), run the program in a parallel loop and check /proc/slabinfo (or kmemleak).
[toc] | [next] | [standalone]
| From | Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> |
|---|---|
| Date | 2016-03-02 20:50 +0100 |
| Message-ID | <r8kWu-4gV-7@gated-at.bofh.it> |
| In reply to | #1347860 |
On Wed, Mar 02, 2016 at 09:56:51AM +0100, Dmitry Vyukov wrote: > On Fri, Jan 15, 2016 at 8:11 PM, Dmitry Vyukov <dvyukov@google.com> wrote: > > On Fri, Jan 15, 2016 at 7:46 PM, Marcelo Ricardo Leitner > > <marcelo.leitner@gmail.com> wrote: > >> On Wed, Dec 30, 2015 at 09:42:27PM +0100, Dmitry Vyukov wrote: > >>> Hello, > >>> > >>> The following program leads to a leak of two sock objects: > >> ... > >>> > >>> On commit 8513342170278468bac126640a5d2d12ffbff106 (Dec 28). > >> > >> I'm afraid I cannot reproduce this one? > >> I enabled dynprintk at sctp_destroy_sock and it does print twice when I > >> run this test app. > >> Also added debugs to check association lifetime, and then it was > >> destroyed. Same for endpoint. > >> > >> Checking with trace-cmd, both calls to sctp_close() resulted in > >> sctp_destroy_sock() being called. > >> > >> As for sock_hold/put, they are matched too. > >> > >> Ideas? Log is below for double checking > > > > > > Hummm... I can reproduce it pretty reliably. > > > > [ 197.459024] kmemleak: 11 new suspected memory leaks (see > > /sys/kernel/debug/kmemleak) > > [ 307.494874] kmemleak: 409 new suspected memory leaks (see > > /sys/kernel/debug/kmemleak) > > [ 549.784022] kmemleak: 125 new suspected memory leaks (see > > /sys/kernel/debug/kmemleak) > > > > I double checked via /proc/slabinfo: > > > > SCTPv6 4373 4420 2368 13 8 : tunables 0 0 > > 0 : slabdata 340 340 0 > > > > SCTPv6 starts with almost 0, but grows infinitely while I run the > > program in a loop. > > > > Here is my SCTP related configs: > > > > CONFIG_IP_SCTP=y > > CONFIG_NET_SCTPPROBE=y > > CONFIG_SCTP_DBG_OBJCNT=y > > # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5 is not set > > # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set > > CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE=y > > # CONFIG_SCTP_COOKIE_HMAC_MD5 is not set > > # CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set > > > > I am on commit 67990608c8b95d2b8ccc29932376ae73d5818727 and I don't > > seem to have any sctp-related changes on top. > > > Still happens on 4.5-rc6. > > Marcelo, try to apply my config (if yours differs), run the program in > a parallel loop and check /proc/slabinfo (or kmemleak). Hi Dmitry, I'm just back from PTOs. Will get back to this asap. Thanks, Marcelo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web