New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 653480 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 15 days ago
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Memory leak in BluetoothStructTraitsTest.DeserializeBluetoothAdvertisement

Project Member Reported by finnur@chromium.org, Oct 6 2016

Issue description

Maybe I should have just reverted the change, but I am feeling generous today and just disabled the test instead... :)
Please look into this quickly.

https://build.chromium.org/p/chromium.memory/builders/Linux%20Chromium%20OS%20ASan%20LSan%20Tests%20%281%29/builds/16702

Copied here for convenience:

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0xab785b in operator new(unsigned long) (/b/swarm_slave/w/iruUsHhy/out/Release/components_unittests+0xab785b)
    #1 0x13eb4afe in allocate build/linux/ubuntu_precise_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/ext/new_allocator.h:92:27
    #2 0x13eb4afe in _M_allocate build/linux/ubuntu_precise_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_vector.h:150
    #3 0x13eb4afe in _Vector_base build/linux/ubuntu_precise_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_vector.h:115
    #4 0x13eb4afe in vector build/linux/ubuntu_precise_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_vector.h:238
    #5 0x13eb4afe in Resize mojo/public/cpp/bindings/array_traits_stl.h:56
    #6 0x13eb4afe in mojo::internal::ArraySerializer<mojo::ArrayDataView<arc::mojom::BluetoothUUIDDataView>, std::vector<device::BluetoothUUID, std::allocator<device::BluetoothUUID> >, mojo::internal::ArrayIterator<mojo::ArrayTraits<std::vector<device::BluetoothUUID, std::allocator<device::BluetoothUUID> > >, std::vector<device::BluetoothUUID, std::allocator<device::BluetoothUUID> >, false>, void>::DeserializeElements(mojo::internal::Array_Data<mojo::internal::Pointer<arc::mojom::internal::BluetoothUUID_Data> >*, std::vector<device::BluetoothUUID, std::allocator<device::BluetoothUUID> >*, mojo::internal::SerializationContext*) mojo/public/cpp/bindings/lib/array_serialization.h:392
    #7 0x13eb41fc in Deserialize mojo/public/cpp/bindings/lib/array_serialization.h:540:12
    #8 0x13eb41fc in Deserialize<mojo::ArrayDataView<arc::mojom::BluetoothUUIDDataView>, mojo::internal::Array_Data<mojo::internal::Pointer<arc::mojom::internal::BluetoothUUID_Data> > *, std::vector<device::BluetoothUUID, std::allocator<device::BluetoothUUID> >, mojo::internal::SerializationContext *&, nullptr> mojo/public/cpp/bindings/lib/serialization_forward.h:70
    #9 0x13eb41fc in bool arc::mojom::BluetoothAdvertisingDataDataView::ReadServiceUuids<std::vector<device::BluetoothUUID, std::allocator<device::BluetoothUUID> > >(std::vector<device::BluetoothUUID, std::allocator<device::BluetoothUUID> >*) out/Release/gen/components/arc/common/bluetooth.mojom-shared.h:3635
    #10 0x13eb2d54 in Read components/arc/bluetooth/bluetooth_struct_traits.cc:161:19
    #11 0x13eb2d54 in Deserialize out/Release/gen/components/arc/common/bluetooth.mojom-shared.h:5563
    #12 0x13eb2d54 in Deserialize<arc::mojom::BluetoothAdvertisingDataDataView, arc::mojom::internal::BluetoothAdvertisingData_Data *, std::unique_ptr<(anonymous namespace)::AdvertisementEntry, std::default_delete<(anonymous namespace)::AdvertisementEntry> >, mojo::internal::SerializationContext *&, nullptr> mojo/public/cpp/bindings/lib/serialization_forward.h:70
    #13 0x13eb2d54 in DeserializeElements mojo/public/cpp/bindings/lib/array_serialization.h:486
    #14 0x13eb2d54 in Deserialize mojo/public/cpp/bindings/lib/array_serialization.h:540
    #15 0x13eb2d54 in Deserialize<mojo::ArrayDataView<arc::mojom::BluetoothAdvertisingDataDataView>, mojo::internal::Array_Data<arc::mojom::internal::BluetoothAdvertisingData_Data> *&, std::vector<std::unique_ptr<(anonymous namespace)::AdvertisementEntry, std::default_delete<(anonymous namespace)::AdvertisementEntry> >, std::allocator<std::unique_ptr<(anonymous namespace)::AdvertisementEntry, std::default_delete<(anonymous namespace)::AdvertisementEntry> > > >, mojo::internal::SerializationContext *&, nullptr> mojo/public/cpp/bindings/lib/serialization_forward.h:70
    #16 0x13eb2d54 in ReadData<std::vector<std::unique_ptr<(anonymous namespace)::AdvertisementEntry, std::default_delete<(anonymous namespace)::AdvertisementEntry> >, std::allocator<std::unique_ptr<(anonymous namespace)::AdvertisementEntry, std::default_delete<(anonymous namespace)::AdvertisementEntry> > > > > out/Release/gen/components/arc/common/bluetooth.mojom-shared.h:913
    #17 0x13eb2d54 in mojo::StructTraits<arc::mojom::BluetoothAdvertisementDataView, std::unique_ptr<device::BluetoothAdvertisement::Data, std::default_delete<device::BluetoothAdvertisement::Data> > >::Read(arc::mojom::BluetoothAdvertisementDataView, std::unique_ptr<device::BluetoothAdvertisement::Data, std::default_delete<device::BluetoothAdvertisement::Data> >*) components/arc/bluetooth/bluetooth_struct_traits.cc:220
    #18 0x50cfad2 in Deserialize out/Release/gen/components/arc/common/bluetooth.mojom-shared.h:4776:12
    #19 0x50cfad2 in Deserialize<arc::mojom::BluetoothAdvertisementDataView, arc::mojom::internal::BluetoothAdvertisement_Data *&, std::unique_ptr<device::BluetoothAdvertisement::Data, std::default_delete<device::BluetoothAdvertisement::Data> >, mojo::internal::SerializationContext *, nullptr> mojo/public/cpp/bindings/lib/serialization_forward.h:70
    #20 0x50cfad2 in bool mojo::internal::StructDeserializeImpl<arc::mojom::BluetoothAdvertisementDataView, mojo::Array<unsigned char>, std::unique_ptr<device::BluetoothAdvertisement::Data, std::default_delete<device::BluetoothAdvertisement::Data> > >(mojo::Array<unsigned char> const&, std::unique_ptr<device::BluetoothAdvertisement::Data, std::default_delete<device::BluetoothAdvertisement::Data> >*) mojo/public/cpp/bindings/lib/serialization.h:97
    #21 0x50bd91e in Deserialize<std::unique_ptr<device::BluetoothAdvertisement::Data, std::default_delete<device::BluetoothAdvertisement::Data> > > out/Release/gen/components/arc/common/bluetooth.mojom.h:1409:12
    #22 0x50bd91e in ConvertFromMojo<arc::mojom::BluetoothAdvertisement, std::unique_ptr<device::BluetoothAdvertisement::Data, std::default_delete<device::BluetoothAdvertisement::Data> > > components/arc/bluetooth/bluetooth_struct_traits_unittest.cc:36
    #23 0x50bd91e in mojo::BluetoothStructTraitsTest_DeserializeBluetoothAdvertisement_Test::TestBody() components/arc/bluetooth/bluetooth_struct_traits_unittest.cc:104
    #24 0xa93942b in HandleExceptionsInMethodIfSupported<testing::Test, void> testing/gtest/src/gtest.cc:2458:12
    #25 0xa93942b in testing::Test::Run() testing/gtest/src/gtest.cc:2474
    #26 0xa93b4bb in testing::TestInfo::Run() testing/gtest/src/gtest.cc:2656:11
    #27 0xa93c276 in testing::TestCase::Run() testing/gtest/src/gtest.cc:2774:28
    #28 0xa9502c6 in testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4647:43
    #29 0xa94f927 in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12
    #30 0xa94f927 in testing::UnitTest::Run() testing/gtest/src/gtest.cc:4255
    #31 0xa0bbfbb in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46
    #32 0xa0bbfbb in base::TestSuite::Run() base/test/test_suite.cc:246
    #33 0xa0c2988 in Run base/callback.h:64:12
    #34 0xa0c2988 in base::(anonymous namespace)::LaunchUnitTestsInternal(base::Callback<int (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, int, int, bool, base::Callback<void (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) base/test/launcher/unit_test_launcher.cc:210
    #35 0xa0c265e in base::LaunchUnitTests(int, char**, base::Callback<int (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) base/test/launcher/unit_test_launcher.cc:452:10
    #36 0xabab7b in main components/test/run_all_unittests.cc:154:10
    #37 0x7f96e8e327ec in __libc_start_main /build/eglibc-oqps9y/eglibc-2.15/csu/libc-start.c:226
 
Components: OS>Systems>Bluetooth
Leak was discovered on 'Linux Chromium OS ASan LSan Tests (1)'.

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c0b0d871d078b6615fc17fad42cd96ca1a118e62

commit c0b0d871d078b6615fc17fad42cd96ca1a118e62
Author: finnur <finnur@chromium.org>
Date: Thu Oct 06 11:18:27 2016

Bluetooth: Disabling test due to leak.

TBR=ejcaruso
BUG= 653480 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2394153002
Cr-Commit-Position: refs/heads/master@{#423499}

[modify] https://crrev.com/c0b0d871d078b6615fc17fad42cd96ca1a118e62/components/arc/bluetooth/bluetooth_struct_traits_unittest.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5d4e1efc09097e67a2199f14423a4a4eb167b6e5

commit 5d4e1efc09097e67a2199f14423a4a4eb167b6e5
Author: gab <gab@chromium.org>
Date: Thu Oct 06 13:19:01 2016

Revert of Bluetooth: Disabling test due to leak. (patchset #1 id:20001 of https://codereview.chromium.org/2394153002/ )

Reason for revert:
CLs with leaks should be reverted, not their test disabled IMO: https://codereview.chromium.org/2389393005/

Original issue's description:
> Bluetooth: Disabling test due to leak.
>
> TBR=ejcaruso
> BUG= 653480 
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
>
> Committed: https://crrev.com/c0b0d871d078b6615fc17fad42cd96ca1a118e62
> Cr-Commit-Position: refs/heads/master@{#423499}

TBR=ejcaruso@chromium.org,finnur@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 653480 

Review-Url: https://codereview.chromium.org/2395573004
Cr-Commit-Position: refs/heads/master@{#423505}

[modify] https://crrev.com/5d4e1efc09097e67a2199f14423a4a4eb167b6e5/components/arc/bluetooth/bluetooth_struct_traits_unittest.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c0b0d871d078b6615fc17fad42cd96ca1a118e62

commit c0b0d871d078b6615fc17fad42cd96ca1a118e62
Author: finnur <finnur@chromium.org>
Date: Thu Oct 06 11:18:27 2016

Bluetooth: Disabling test due to leak.

TBR=ejcaruso
BUG= 653480 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2394153002
Cr-Commit-Position: refs/heads/master@{#423499}

[modify] https://crrev.com/c0b0d871d078b6615fc17fad42cd96ca1a118e62/components/arc/bluetooth/bluetooth_struct_traits_unittest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5d4e1efc09097e67a2199f14423a4a4eb167b6e5

commit 5d4e1efc09097e67a2199f14423a4a4eb167b6e5
Author: gab <gab@chromium.org>
Date: Thu Oct 06 13:19:01 2016

Revert of Bluetooth: Disabling test due to leak. (patchset #1 id:20001 of https://codereview.chromium.org/2394153002/ )

Reason for revert:
CLs with leaks should be reverted, not their test disabled IMO: https://codereview.chromium.org/2389393005/

Original issue's description:
> Bluetooth: Disabling test due to leak.
>
> TBR=ejcaruso
> BUG= 653480 
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
>
> Committed: https://crrev.com/c0b0d871d078b6615fc17fad42cd96ca1a118e62
> Cr-Commit-Position: refs/heads/master@{#423499}

TBR=ejcaruso@chromium.org,finnur@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 653480 

Review-Url: https://codereview.chromium.org/2395573004
Cr-Commit-Position: refs/heads/master@{#423505}

[modify] https://crrev.com/5d4e1efc09097e67a2199f14423a4a4eb167b6e5/components/arc/bluetooth/bluetooth_struct_traits_unittest.cc

I see the most recent patch was reverted. What is the next step here?
Cc: mcchou@chromium.org josephsih@chromium.org

Comment 8 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840
Status: Fixed (was: Assigned)
The relanded patch https://codereview.chromium.org/2394683007/ had the fix for the memory leaks, so nothing else needs to be done here. Weird that it didn't show up.
Oh, I guess I didn't add this issue. Whoops!

Sign in to add a comment