Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heap-use-after-free when shutting down envoy. #733

Closed
fengli79 opened this issue Apr 11, 2017 · 3 comments
Closed

heap-use-after-free when shutting down envoy. #733

fengli79 opened this issue Apr 11, 2017 · 3 comments
Labels
Milestone

Comments

@fengli79
Copy link
Contributor

fengli79 commented Apr 11, 2017

caught SIGTERM
main dispatch loop exited
exiting
WARNING: ThreadSanitizer: heap-use-after-free (pid=806410)
Read of size 8 at 0x7b54000006c0 by main thread:
 #0 event_del third_party/libevent/src/event.c:2288:2
 #1 Event::ImplBase::~ImplBase() third_party/envoy/src/source/common/event/event_impl_base.cc:9:3
 #2 ~FileEventImpl third_party/envoy/src/source/common/event/file_event_impl.h:13:7
 #3 Event::FileEventImpl::~FileEventImpl() third_party/envoy/src/source/common/event/file_event_impl.h:13
 #4 operator() unique_ptr.h:76:2
 #5 ~unique_ptr unique_ptr.h:236
 #6 ~HotRestartImpl third_party/envoy/src/source/exe/hot_restart.h:79
 #7 Server::HotRestartImpl::~HotRestartImpl() third_party/envoy/src/source/exe/hot_restart.h:79
 #8 operator() unique_ptr.h:76:2
 #9 ~unique_ptr unique_ptr.h:236
 #10 main third_party/envoy/src/source/exe/main.cc:57
Previous write of size 8 at 0x7b54000006c0 by main thread:
 #0 free third_party/llvm/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:629:3
 #1 event_mm_free_ third_party/libevent/src/event.c:2826:3
 #2 event_base_free third_party/libevent/src/event.c:842
 #3 ~unique_ptr unique_ptr.h:236:4
 #4 Event::DispatcherImpl::~DispatcherImpl() third_party/envoy/src/source/common/event/dispatcher_impl.cc:25
 #5 Event::DispatcherImpl::~DispatcherImpl() third_party/envoy/src/source/common/event/dispatcher_impl.cc:25:35
 #6 operator() unique_ptr.h:76:2
 #7 ~unique_ptr unique_ptr.h:236
 #8 Server::ConnectionHandlerImpl::~ConnectionHandlerImpl() third_party/envoy/src/source/server/connection_handler_impl.cc:19 
 #9 Server::InstanceImpl::~InstanceImpl() third_party/envoy/src/source/server/server.cc:356:32
 #10 main third_party/envoy/src/source/exe/main.cc:57:1
SUMMARY: ThreadSanitizer: heap-use-after-free third_party/libevent/src/event.c:2288:2 in event_del

I get a tsan heap use after free error. Which happens when shutting down envoy with sigterm.

@mattklein123 mattklein123 added this to the 1.3.0 milestone Apr 11, 2017
@mattklein123
Copy link
Member

@fengli79 per offline discussion are you going to post PR to fix? Otherwise I can do it.

@fengli79
Copy link
Contributor Author

Yes, I'm going to submit a PR to fix this.

@mattklein123
Copy link
Member

fixed by #758

rshriram pushed a commit to rshriram/envoy that referenced this issue Oct 30, 2018
mattklein123 pushed a commit that referenced this issue Jun 9, 2022
)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
mattklein123 pushed a commit that referenced this issue Jun 9, 2022
)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Pradeep Rao <[email protected]>
mattklein123 pushed a commit that referenced this issue Jun 9, 2022
)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Pradeep Rao <[email protected]>
mattklein123 pushed a commit that referenced this issue Jun 9, 2022
)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Pradeep Rao <[email protected]>
mattklein123 pushed a commit that referenced this issue Jun 9, 2022
)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Pradeep Rao <[email protected]>
LukeShu pushed a commit to datawire/envoy that referenced this issue Jun 9, 2022
…nvoyproxy#733)

commit 618d2c7f79d201c508555bcbdaca5538a6e94824
Author: Pradeep Rao <[email protected]>
Date:   Fri May 20 18:09:49 2022 +0000

    Fix format.

    Signed-off-by: Pradeep Rao <[email protected]>

commit e57c2fc29690522ee571c27c2309612fcfa60c5a
Author: Pradeep Rao <[email protected]>
Date:   Thu May 19 18:56:28 2022 +0000

    Fix release note.

    Signed-off-by: Pradeep Rao <[email protected]>

commit 7a89437589334d58cc0a80d3104714c921b9d9f0
Author: Pradeep Rao <[email protected]>
Date:   Mon May 16 18:16:51 2022 +0000

    Fix format.

    Signed-off-by: Pradeep Rao <[email protected]>

commit a0abc80be4f180f8a26bb3ec10cd4500a31dc5d1
Author: Pradeep Rao <[email protected]>
Date:   Thu May 12 17:10:56 2022 +0000

    decompressors: stop decompressing upon excessive compression ratio (envoyproxy#733)

    Signed-off-by: Pradeep Rao <[email protected]>

Signed-off-by: Pradeep Rao <[email protected]>
Backported-by: Luke Shumaker <[email protected]>
GregHanson pushed a commit to istio/envoy that referenced this issue Jun 9, 2022
…nvoyproxy#733)

commit 411f83bafbb959d621f47984551242b8a4e8813e
Author: Pradeep Rao <[email protected]>
Date:   Fri May 20 18:11:53 2022 +0000

    Fix format.

    Signed-off-by: Pradeep Rao <[email protected]>

commit b242a55f39e1d325e7a9c9fc74f8b1f6d83f3043
Author: Pradeep Rao <[email protected]>
Date:   Thu May 19 18:53:53 2022 +0000

    Fix release note.

    Signed-off-by: Pradeep Rao <[email protected]>

commit 85e9f11a7ddb9610c6553abdb5e651704b83f98d
Author: Pradeep Rao <[email protected]>
Date:   Mon May 16 18:19:07 2022 +0000

    Fix format.

    Signed-off-by: Pradeep Rao <[email protected]>

commit 0bb11b8e6b16125a31176c68d2ce473b12dbb24c
Author: Pradeep Rao <[email protected]>
Date:   Thu May 12 17:08:31 2022 +0000

    decompressors: stop decompressing upon excessive compression ratio (envoyproxy#733)

    Signed-off-by: Pradeep Rao <[email protected]>

Signed-off-by: Pradeep Rao <[email protected]>
GregHanson pushed a commit to istio/envoy that referenced this issue Jun 9, 2022
…nvoyproxy#733)

commit 1f6ff7d0ef5adaaca3b00f17db38a0f327fb133f
Author: Pradeep Rao <[email protected]>
Date:   Thu May 19 18:27:11 2022 +0000

    Fix release notes.

    Signed-off-by: Pradeep Rao <[email protected]>

commit f1cda77410934fe9a192cedfd4d0cbfd31390642
Author: Pradeep Rao <[email protected]>
Date:   Thu May 12 17:05:49 2022 +0000

    decompressors: stop decompressing upon excessive compression ratio (envoyproxy#733)

    Signed-off-by: Pradeep Rao <[email protected]>

Signed-off-by: Pradeep Rao <[email protected]>
GregHanson pushed a commit to istio/envoy that referenced this issue Jun 9, 2022
…nvoyproxy#733)

commit 00f4c446c2e6c72d169796d1abdef048d95254a8
Author: Ryan Hamilton <[email protected]>
Date:   Tue May 17 03:04:04 2022 +0000

    Format

    Signed-off-by: Ryan Hamilton <[email protected]>

commit a9acd313655ad305be0cf8d735954d03a7f5bfd7
Author: Pradeep Rao <[email protected]>
Date:   Thu May 19 16:03:44 2022 +0000

    Fix release notes.

    Signed-off-by: Pradeep Rao <[email protected]>

commit 045d804b60c07181b5c45223ec01519876bbbea5
Author: Ryan Hamilton <[email protected]>
Date:   Mon May 16 21:25:24 2022 +0000

    Fix ZstdDecompressorImpl

    Signed-off-by: Ryan Hamilton <[email protected]>

commit c2f76d68a29f3fd02ab6b66ba32a11ecfe0e65d8
Author: Pradeep Rao <[email protected]>
Date:   Thu May 12 16:30:25 2022 +0000

    decompressors: stop decompressing upon excessive compression ratio (envoyproxy#733)

    Signed-off-by: Pradeep Rao <[email protected]>

Signed-off-by: Pradeep Rao <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this issue Jun 10, 2022
…nvoyproxy#733)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Pradeep Rao <[email protected]>

Signed-off-by: Ryan Northey <[email protected]>
mattklein123 pushed a commit that referenced this issue Jun 10, 2022
)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Pradeep Rao <[email protected]>

Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this issue Jun 13, 2022
…nvoyproxy#733)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Pradeep Rao <[email protected]>

Signed-off-by: Ryan Northey <[email protected]>
nfuden pushed a commit to solo-io/envoy-fork that referenced this issue Jun 13, 2022
…nvoyproxy#733)

commit 618d2c7f79d201c508555bcbdaca5538a6e94824
Author: Pradeep Rao <[email protected]>
Date:   Fri May 20 18:09:49 2022 +0000

    Fix format.

    Signed-off-by: Pradeep Rao <[email protected]>

commit e57c2fc29690522ee571c27c2309612fcfa60c5a
Author: Pradeep Rao <[email protected]>
Date:   Thu May 19 18:56:28 2022 +0000

    Fix release note.

    Signed-off-by: Pradeep Rao <[email protected]>

commit 7a89437589334d58cc0a80d3104714c921b9d9f0
Author: Pradeep Rao <[email protected]>
Date:   Mon May 16 18:16:51 2022 +0000

    Fix format.

    Signed-off-by: Pradeep Rao <[email protected]>

commit a0abc80be4f180f8a26bb3ec10cd4500a31dc5d1
Author: Pradeep Rao <[email protected]>
Date:   Thu May 12 17:10:56 2022 +0000

    decompressors: stop decompressing upon excessive compression ratio (envoyproxy#733)

    Signed-off-by: Pradeep Rao <[email protected]>

Signed-off-by: Pradeep Rao <[email protected]>
tyxia referenced this issue in tyxia/envoy Jun 14, 2022
)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Tianyu Xia <[email protected]>
mattklein123 pushed a commit that referenced this issue Jun 15, 2022
)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Pradeep Rao <[email protected]>

Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this issue Jun 16, 2022
…nvoyproxy#733)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Pradeep Rao <[email protected]>

Signed-off-by: Ryan Northey <[email protected]>
mattklein123 pushed a commit that referenced this issue Jun 17, 2022
)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Pradeep Rao <[email protected]>

Signed-off-by: Ryan Northey <[email protected]>
Amila-Rukshan pushed a commit to Amila-Rukshan/envoy that referenced this issue Jun 28, 2022
…nvoyproxy#733)

Signed-off-by: Dmitry Rozhkov <[email protected]>
Co-authored-by: Ryan Hamilton <[email protected]>
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Amila Senadheera <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants