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

Issue 779645 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Fuchsia
Pri: 3
Type: Bug

Blocking:
issue 750938



Sign in to add a comment

PartitionAllocTest.RepeatedReturnNull[Direct] fails under Fuchsia, due to unimplemented SetAddressSpaceLimits

Project Member Reported by w...@chromium.org, Oct 30 2017

Issue description

These two tests run correctly under Fuchsia/x64, but OOM under ARM64.

Under x64 the tests are skipped due to IsLargeMemoryDevice() returning false; the function checks whether the available system memory is >= 2GiB, and when we run a 2048MiB QEMU+KVM VM, we get slightly less than 2GiB available memory.

Under ARM64 the RepeatedReturnNullDirect test reports:
[00004.744] 02636.02678> [ RUN      ] PartitionAllocTest.RepeatedReturnNullDirect
[00004.750] 02636.02678> ../../base/allocator/partition_allocator/partition_alloc_unittest.cc:181: Failure
[00004.750] 02636.02678> Value of: SetAddressSpaceLimit()
[00004.750] 02636.02678>   Actual: false
[00004.750] 02636.02678> Expected: true
and then OOMs shortly thereafter.


 

Comment 1 by w...@chromium.org, Oct 30 2017

Components: Internals>PlatformIntegration
Owner: w...@chromium.org
Status: Assigned (was: Untriaged)
Note that increasing the QEMU memory allocation from 2048 to e.g. 2100MiB causes x64 to fail in the same way as ARM64; there are two issues:

- The IsLargeMemoryDevice() check might be better tweaked to check for just-under-2GiB of available physical memory, since many systems allocate some physical memory for low-level device use e.g. gfx.
- The SetAddressSpaceLimit() expectation should be an ASSERT, since the test cannot reasonably function without that.

Then, we should also implement SetAddressSpaceLimit() under Fuchsia. :)
Cc: kulakowski@chromium.org
get/setrlimit() (what this test wants) is peripherally mentioned in internal ZX-357, but not implemented yet in any case.

Comment 3 by palmer@chromium.org, Oct 30 2017

Cc: palmer@chromium.org

Comment 4 by w...@chromium.org, Oct 30 2017

Summary: PartitionAllocTest.RepeatedReturnNull[Direct] fails under Fuchsia, due to unimplemented SetAddressSpaceLimits (was: PartitionAllocTest.RepeatedReturnNull[Direct] OOMs under Fuchsia/ARM64)
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 30 2017

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

commit 7c466ad1b46ec7b3be6d33cb5280a996c3741d47
Author: Wez <wez@chromium.org>
Date: Mon Oct 30 21:55:33 2017

Enable base_unittests on Fuchsia/ARM64 bots.

This requires filtering out some tests:
- Some PartitionAllocTests which fail under ARM64, and were just
  being skipped under x64.
- BuildTime.InThePast which current fails under ARM64.

Bug:  772031 , 779645,  779668 
Change-Id: Ic764f276d8298bf309c815af6b60eed4ea5d3c4f
Reviewed-on: https://chromium-review.googlesource.com/744315
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512637}
[modify] https://crrev.com/7c466ad1b46ec7b3be6d33cb5280a996c3741d47/testing/buildbot/chromium.fyi.json
[modify] https://crrev.com/7c466ad1b46ec7b3be6d33cb5280a996c3741d47/testing/buildbot/filters/fuchsia.base_unittests.filter

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 31 2017

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

commit 9f6146f114f54aa361a3bacfffd53efe700a4d44
Author: Wez <wez@chromium.org>
Date: Tue Oct 31 16:21:13 2017

Clean up preconditions for PartitionAlloc large-memory tests.

- Tweak IsLargeMemoryDevice() to treat devices with _almost_ 2GiB of
  available memory as "large", to allow for e.g. some memory being
  reserved for use by devices.
- ASSERT, rather than EXPECT, that SetAddressSpaceLimit() succeeds,
  so that the test will fail fast rather than trying to run, and
  proceeding to OOM the host system.

Bug: 779645
Change-Id: I12eb4cabda28b2fbdb7ef8c5cdee9fb4a60c2781
Reviewed-on: https://chromium-review.googlesource.com/744300
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512845}
[modify] https://crrev.com/9f6146f114f54aa361a3bacfffd53efe700a4d44/base/allocator/partition_allocator/partition_alloc_unittest.cc

Comment 7 by w...@chromium.org, Oct 31 2017

Labels: -Pri-2 -M-64 Pri-3
Owner: ----
Status: Available (was: Assigned)

Comment 8 by w...@chromium.org, Oct 31 2017

Blocking: 750938
Marking this as a blocker for the sandbox, since we use the equivalent of the test's SetAddressSpaceLimits() as part of the sandbox policy.
Project Member

Comment 9 by bugdroid1@chromium.org, Apr 11 2018

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

commit e9841805b29de75e69766f7be352b2d6d69d99be
Author: Wez <wez@chromium.org>
Date: Wed Apr 11 02:06:46 2018

Disable PartitionAllocReturnNullTest.* under Fuchsia, and remove filter.

Fuchsia does not support setrlimit(), which is required for these tests
to run under 64-bit systems.

Bug: 779645
Change-Id: Ia2c910d641656986c2a88d5d8992e6dcd347a498
Reviewed-on: https://chromium-review.googlesource.com/1006191
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Albert J. Wong <ajwong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549724}
[modify] https://crrev.com/e9841805b29de75e69766f7be352b2d6d69d99be/base/allocator/partition_allocator/partition_alloc_unittest.cc
[modify] https://crrev.com/e9841805b29de75e69766f7be352b2d6d69d99be/testing/buildbot/filters/fuchsia.base_unittests.filter

We don't currently have a mechanism to limit the amount of address space used by a process. If we do get one, it will not be spelled rlimit.

Comment 11 by jln@chromium.org, Apr 11 2018

I confirm it's fine to not worry about this for now on Fuchsia. Eventually, we'll want a way to limit address space usage for a given process in Zircon and we can then implement these things.

Sign in to add a comment