From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> To: Dmitry Vyukov <dvyukov@google.com> Cc: Vlad Yasevich <vyasevich@gmail.com>, Neil Horman <nhorman@tuxdriver.com>, "David S. Miller" <davem@davemloft.net>, linux-sctp@vger.kernel.org, netdev <netdev@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>, syzkaller <syzkaller@googlegroups.com>, Kostya Serebryany <kcc@google.com>, Alexander Potapenko <glider@google.com>, Sasha Levin <sasha.levin@oracle.com>, Eric Dumazet <edumazet@google.com> Subject: Re: net/sctp: sock memory leak Date: Fri, 15 Jan 2016 16:46:20 -0200 [thread overview] Message-ID: <20160115184620.GE6074@mrl.redhat.com> (raw) In-Reply-To: <CACT4Y+bf9h=vVSb82Jdv2GeV1MQPg15LW_AcV2BOw-XbMfNetw@mail.gmail.com> 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 [ 1112.558217] sctp_endpoint_init(ffff88000015d400) sock_hold sk:ffff8800336da000 [ 1112.558539] sctp_endpoint_hold(ffff88000015d400) [ 1112.558544] sctp_association_init(ffff8800b2db9000) sock_hold sk:ffff8800336da000 [ 1112.558878] sctp_association_hold(ffff8800b2db9000) [ 1112.558957] sctp_association_hold(ffff8800b2db9000) [ 1112.559062] sctp_association_hold(ffff8800b2db9000) [ 1112.559079] sctp_association_hold(ffff8800b2db9000) [ 1112.658745] sctp_endpoint_init(ffff88000015e200) sock_hold sk:ffff8800336dc800 [ 1112.658815] sctp_endpoint_put(ffff88000015d400) [ 1112.658819] sctp_assoc_migrate(ffff8800b2db9000) sock_put sk:ffff8800336da000 oldsk:ffff8800336da000 [ 1112.658822] sctp_endpoint_hold(ffff88000015e200) [ 1112.658824] sctp_assoc_migrate(ffff8800b2db9000) sock_hold sk:ffff8800336dc800 [ 1112.659627] sctp_association_put(ffff8800b2db9000) [ 1112.659673] sctp_association_free(ffff8800b2db9000) [ 1112.659691] sctp_association_put(ffff8800b2db9000) [ 1112.659735] sctp_transport_put(ffff8800b3426000) [ 1112.659737] sctp_transport_destroy(ffff8800b3426000) [ 1112.659741] sctp_association_put(ffff8800b2db9000) [ 1112.659745] sctp_association_put(ffff8800b2db9000) [ 1112.659757] sctp_association_put(ffff8800b2db9000) [ 1112.659759] sctp_association_destroy(ffff8800b2db9000) [ 1112.659761] sctp_endpoint_put(ffff88000015e200) [ 1112.659773] sctp_association_destroy(ffff8800b2db9000) sock_put sk:ffff8800336dc800 [ 1112.659814] sctp_close sock_hold sk:ffff8800336dc800 [ 1112.659818] sctp: sctp_destroy_sock: sk:ffff8800336dc800 [ 1112.659823] sctp_endpoint_put(ffff88000015e200) [ 1112.659825] sctp_endpoint_destroy(ffff88000015e200) [ 1112.659841] sctp_endpoint_destroy(ffff88000015e200) sock_put sk:ffff8800336dc800 [ 1112.659852] sctp_close sock_put sk:ffff8800336dc800 [ 1112.662437] sctp_close sock_hold sk:ffff8800336da000 [ 1112.662443] sctp: sctp_destroy_sock: sk:ffff8800336da000 [ 1112.662448] sctp_endpoint_put(ffff88000015d400) [ 1112.662450] sctp_endpoint_destroy(ffff88000015d400) [ 1112.662466] sctp_endpoint_destroy(ffff88000015d400) sock_put sk:ffff8800336da000 [ 1112.662476] sctp_close sock_put sk:ffff8800336da000 [ 1112.677226] sctp_transport_destroy_rcu(ffff8800b3426000)
WARNING: multiple messages have this Message-ID (diff)
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> To: Dmitry Vyukov <dvyukov@google.com> Cc: Vlad Yasevich <vyasevich@gmail.com>, Neil Horman <nhorman@tuxdriver.com>, "David S. Miller" <davem@davemloft.net>, linux-sctp@vger.kernel.org, netdev <netdev@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>, syzkaller <syzkaller@googlegroups.com>, Kostya Serebryany <kcc@google.com>, Alexander Potapenko <glider@google.com>, Sasha Levin <sasha.levin@oracle.com>, Eric Dumazet <edumazet@google.com> Subject: Re: net/sctp: sock memory leak Date: Fri, 15 Jan 2016 18:46:20 +0000 [thread overview] Message-ID: <20160115184620.GE6074@mrl.redhat.com> (raw) In-Reply-To: <CACT4Y+bf9h=vVSb82Jdv2GeV1MQPg15LW_AcV2BOw-XbMfNetw@mail.gmail.com> 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 [ 1112.558217] sctp_endpoint_init(ffff88000015d400) sock_hold sk:ffff8800336da000 [ 1112.558539] sctp_endpoint_hold(ffff88000015d400) [ 1112.558544] sctp_association_init(ffff8800b2db9000) sock_hold sk:ffff8800336da000 [ 1112.558878] sctp_association_hold(ffff8800b2db9000) [ 1112.558957] sctp_association_hold(ffff8800b2db9000) [ 1112.559062] sctp_association_hold(ffff8800b2db9000) [ 1112.559079] sctp_association_hold(ffff8800b2db9000) [ 1112.658745] sctp_endpoint_init(ffff88000015e200) sock_hold sk:ffff8800336dc800 [ 1112.658815] sctp_endpoint_put(ffff88000015d400) [ 1112.658819] sctp_assoc_migrate(ffff8800b2db9000) sock_put sk:ffff8800336da000 oldsk:ffff8800336da000 [ 1112.658822] sctp_endpoint_hold(ffff88000015e200) [ 1112.658824] sctp_assoc_migrate(ffff8800b2db9000) sock_hold sk:ffff8800336dc800 [ 1112.659627] sctp_association_put(ffff8800b2db9000) [ 1112.659673] sctp_association_free(ffff8800b2db9000) [ 1112.659691] sctp_association_put(ffff8800b2db9000) [ 1112.659735] sctp_transport_put(ffff8800b3426000) [ 1112.659737] sctp_transport_destroy(ffff8800b3426000) [ 1112.659741] sctp_association_put(ffff8800b2db9000) [ 1112.659745] sctp_association_put(ffff8800b2db9000) [ 1112.659757] sctp_association_put(ffff8800b2db9000) [ 1112.659759] sctp_association_destroy(ffff8800b2db9000) [ 1112.659761] sctp_endpoint_put(ffff88000015e200) [ 1112.659773] sctp_association_destroy(ffff8800b2db9000) sock_put sk:ffff8800336dc800 [ 1112.659814] sctp_close sock_hold sk:ffff8800336dc800 [ 1112.659818] sctp: sctp_destroy_sock: sk:ffff8800336dc800 [ 1112.659823] sctp_endpoint_put(ffff88000015e200) [ 1112.659825] sctp_endpoint_destroy(ffff88000015e200) [ 1112.659841] sctp_endpoint_destroy(ffff88000015e200) sock_put sk:ffff8800336dc800 [ 1112.659852] sctp_close sock_put sk:ffff8800336dc800 [ 1112.662437] sctp_close sock_hold sk:ffff8800336da000 [ 1112.662443] sctp: sctp_destroy_sock: sk:ffff8800336da000 [ 1112.662448] sctp_endpoint_put(ffff88000015d400) [ 1112.662450] sctp_endpoint_destroy(ffff88000015d400) [ 1112.662466] sctp_endpoint_destroy(ffff88000015d400) sock_put sk:ffff8800336da000 [ 1112.662476] sctp_close sock_put sk:ffff8800336da000 [ 1112.677226] sctp_transport_destroy_rcu(ffff8800b3426000)
next prev parent reply other threads:[~2016-01-15 18:46 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-12-30 20:42 net/sctp: sock memory leak Dmitry Vyukov 2015-12-30 20:42 ` Dmitry Vyukov 2015-12-30 20:47 ` Marcelo Ricardo Leitner 2015-12-30 20:47 ` Marcelo Ricardo Leitner 2016-01-15 18:46 ` Marcelo Ricardo Leitner [this message] 2016-01-15 18:46 ` Marcelo Ricardo Leitner 2016-01-15 19:11 ` Dmitry Vyukov 2016-01-15 19:11 ` Dmitry Vyukov 2016-01-15 21:40 ` [PATCH net] sctp: do sanity checks before migrating the asoc Marcelo Ricardo Leitner 2016-01-15 21:40 ` Marcelo Ricardo Leitner 2016-01-19 14:19 ` Vlad Yasevich 2016-01-19 14:19 ` Vlad Yasevich 2016-01-19 15:59 ` Marcelo Ricardo Leitner 2016-01-19 15:59 ` Marcelo Ricardo Leitner 2016-01-19 18:37 ` Vlad Yasevich 2016-01-19 18:37 ` Vlad Yasevich 2016-01-19 19:31 ` Marcelo Ricardo Leitner 2016-01-19 19:31 ` Marcelo Ricardo Leitner 2016-01-19 19:55 ` Vlad Yasevich 2016-01-19 19:55 ` Vlad Yasevich 2016-01-19 20:08 ` Marcelo Ricardo Leitner 2016-01-19 20:08 ` Marcelo Ricardo Leitner 2016-02-03 16:13 ` Dmitry Vyukov 2016-02-03 16:13 ` Dmitry Vyukov 2016-02-04 9:47 ` Marcelo Ricardo Leitner 2016-02-04 9:47 ` Marcelo Ricardo Leitner 2016-03-02 8:56 ` net/sctp: sock memory leak Dmitry Vyukov 2016-03-02 8:56 ` Dmitry Vyukov 2016-03-02 19:42 ` Marcelo Ricardo Leitner 2016-03-02 19:42 ` Marcelo Ricardo Leitner
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20160115184620.GE6074@mrl.redhat.com \ --to=marcelo.leitner@gmail.com \ --cc=davem@davemloft.net \ --cc=dvyukov@google.com \ --cc=edumazet@google.com \ --cc=glider@google.com \ --cc=kcc@google.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-sctp@vger.kernel.org \ --cc=netdev@vger.kernel.org \ --cc=nhorman@tuxdriver.com \ --cc=sasha.levin@oracle.com \ --cc=syzkaller@googlegroups.com \ --cc=vyasevich@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.