New issue
Advanced search Search tips

Issue 788240 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

base_unittests PartitionAllocTest.Purge fails on Linux

Project Member Reported by fdegros@chromium.org, Nov 23 2017

Issue description

I recently upgraded my workstation to Rodete.

Since then, PartitionAllocTest.Purge and PartitionAllocTest.PurgeDiscardable in base_unittests started failing.

$ ninja -j 560 -l 56 -C out/Default base_unittests && out/Default/base_unittests --gtest_filter=PartitionAllocTest.Purge*

IMPORTANT DEBUGGING NOTE: batches of tests are run inside their
own process. For debugging a test inside a debugger, use the
--gtest_filter=<your_test_name> flag along with
--single-process-tests.
Using sharding settings from environment. This is shard 0/1
Using 1 parallel jobs.
Note: Google Test filter = PartitionAllocTest.Purge:PartitionAllocTest.PurgeDiscardable
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from PartitionAllocTest
[ RUN      ] PartitionAllocTest.Purge
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
[  FAILED  ] PartitionAllocTest.Purge (1 ms)
[ RUN      ] PartitionAllocTest.PurgeDiscardable
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
[  FAILED  ] PartitionAllocTest.PurgeDiscardable (2 ms)
[----------] 2 tests from PartitionAllocTest (3 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (3 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] PartitionAllocTest.Purge
[  FAILED  ] PartitionAllocTest.PurgeDiscardable

 2 FAILED TESTS
Failed to get out-of-band test success data, dumping full stdio below:

Note: Google Test filter = PartitionAllocTest.Purge
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from PartitionAllocTest
[ RUN      ] PartitionAllocTest.Purge
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
[  FAILED  ] PartitionAllocTest.Purge (1 ms)
[----------] 1 test from PartitionAllocTest (1 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (1 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] PartitionAllocTest.Purge

 1 FAILED TEST
[1/2] PartitionAllocTest.Purge (1 ms)
Note: Google Test filter = PartitionAllocTest.PurgeDiscardable
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from PartitionAllocTest
[ RUN      ] PartitionAllocTest.PurgeDiscardable
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:252: Failure
      Expected: inCore
      Which is: false
To be equal to: ret
      Which is: '\x1' (1)
[  FAILED  ] PartitionAllocTest.PurgeDiscardable (2 ms)
[----------] 1 test from PartitionAllocTest (2 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (3 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] PartitionAllocTest.PurgeDiscardable

 1 FAILED TEST
Failed to get out-of-band test success data, dumping full stdio below:

[2/2] PartitionAllocTest.PurgeDiscardable (0 ms)
2 tests failed:
    PartitionAllocTest.Purge (../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1715)
    PartitionAllocTest.PurgeDiscardable (../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1809)
Tests took 0 seconds.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 28 2017

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

commit 8ccf7c9c718a25007ed3d089f775427ef1b1d9f7
Author: François Degros <fdegros@chromium.org>
Date: Tue Nov 28 00:46:09 2017

Changed local function CheckPageInCore to macro CHECK_PAGE_IN_CORE.

This way, if one of the CHECK_PAGE_IN_CORE fails, we get a more accurate message
with a useful line number, and not just a line number within the (now removed)
local function CheckPageInCore.

Also fixed the way mincore is used. According to mincore's documentation:

int mincore(void *addr, size_t length, unsigned char *vec);

The vec argument must point to an array containing at least (length+PAGE_SIZE-1)
/ PAGE_SIZE bytes. On return, the least significant bit of each byte will be set
if the corresponding page is currently resident in memory, and be clear
otherwise. The settings of the other bits in each byte are undefined; these bits
are reserved for possible later use.

Change-Id: I47f11e896a21944033314a84c6775d3d2ff70a24
Bug:  788240 
Reviewed-on: https://chromium-review.googlesource.com/788473
Commit-Queue: François Degros <fdegros@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519485}
[modify] https://crrev.com/8ccf7c9c718a25007ed3d089f775427ef1b1d9f7/base/allocator/partition_allocator/partition_alloc_unittest.cc

With the improved error messages:


IMPORTANT DEBUGGING NOTE: batches of tests are run inside their
own process. For debugging a test inside a debugger, use the
--gtest_filter=<your_test_name> flag along with
--single-process-tests.
Using sharding settings from environment. This is shard 0/1
Using 1 parallel jobs.
Note: Google Test filter = PartitionAllocTest.Purge:PartitionAllocTest.PurgeDiscardable
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from PartitionAllocTest
[ RUN      ] PartitionAllocTest.Purge
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1759: Failure
      Expected: IsPageInCore(ptr - kPointerOffset)
      Which is: true
To be equal to: false
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1760: Failure
      Expected: IsPageInCore(bigPtr - kPointerOffset)
      Which is: true
To be equal to: false
[  FAILED  ] PartitionAllocTest.Purge (1 ms)
[ RUN      ] PartitionAllocTest.PurgeDiscardable
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1844: Failure
      Expected: IsPageInCore(ptr2 - kPointerOffset)
      Which is: true
To be equal to: false
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1878: Failure
      Expected: IsPageInCore(ptr1 - kPointerOffset)
      Which is: true
To be equal to: false
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1917: Failure
      Expected: IsPageInCore(ptr1 - kPointerOffset + kSystemPageSize)
      Which is: true
To be equal to: false
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1919: Failure
      Expected: IsPageInCore(ptr1 - kPointerOffset + (kSystemPageSize * 3))
      Which is: true
To be equal to: false
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1954: Failure
      Expected: IsPageInCore(ptr1 - kPointerOffset + (kSystemPageSize * 61))
      Which is: true
To be equal to: false
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1955: Failure
      Expected: IsPageInCore(ptr1 - kPointerOffset + (kSystemPageSize * 62))
      Which is: true
To be equal to: false
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1956: Failure
      Expected: IsPageInCore(ptr1 - kPointerOffset + (kSystemPageSize * 63))
      Which is: true
To be equal to: false
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:2010: Failure
      Expected: IsPageInCore(ptr1 - kPointerOffset + kSystemPageSize)
      Which is: true
To be equal to: false
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:2012: Failure
      Expected: IsPageInCore(ptr1 - kPointerOffset + (kSystemPageSize * 3))
      Which is: true
To be equal to: false
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:2072: Failure
      Expected: IsPageInCore(ptr1 - kPointerOffset + (kSystemPageSize * 2))
      Which is: true
To be equal to: false
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:2073: Failure
      Expected: IsPageInCore(ptr1 - kPointerOffset + (kSystemPageSize * 3))
      Which is: true
To be equal to: false
[  FAILED  ] PartitionAllocTest.PurgeDiscardable (2 ms)
[----------] 2 tests from PartitionAllocTest (4 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (4 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] PartitionAllocTest.Purge
[  FAILED  ] PartitionAllocTest.PurgeDiscardable

 2 FAILED TESTS
[1/2] PartitionAllocTest.Purge (1 ms)
[2/2] PartitionAllocTest.PurgeDiscardable (2 ms)
2 tests failed:
    PartitionAllocTest.Purge (../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1721)
    PartitionAllocTest.PurgeDiscardable (../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1815)
Tests took 0 seconds.
Status: Available (was: Untriaged)
Owner: thomasanderson@chromium.org
Status: Started (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 21 2018

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

commit 4599b1909ea3418fa578a070de63a35b3250af5b
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Wed Feb 21 18:34:30 2018

Fix PartitionAllocTest.Purge{Discardable} on kernels >= 4.5

This CL skips CHECK_PAGE_IN_CORE when the kernel supports MADV_FREE.  In this
case, there's no way to tell if a page is in core because it needs to be, or if
it just hasn't been reclaimed by the OS yet.  This check already does nothing on
non-Linux platforms anyway.

This is needed to green-up base_unittests on the Linux Xenial bot.

BUG= 788240 
R=thakis

Change-Id: I36d93e533136464b203d9088270e45a759d661da
Reviewed-on: https://chromium-review.googlesource.com/924112
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538154}
[modify] https://crrev.com/4599b1909ea3418fa578a070de63a35b3250af5b/base/allocator/partition_allocator/partition_alloc_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment