New issue
Advanced search Search tips

Issue 800241 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Jan 2018
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

The PartitionAllocTest.DumpMemoryStats case in base_unittests failed on Loongson.

Reported by wangqing...@loongson.cn, Jan 9 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux mips64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3096.2 Safari/537.36

Steps to reproduce the problem:
1. build base_unittests
2. run base_unittests

What is the expected behavior?
passed this test case.

What went wrong?
Note: Google Test filter = PartitionAllocTest.DumpMemoryStats
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from PartitionAllocTest
[ RUN      ] PartitionAllocTest.DumpMemoryStats
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1648: Failure
Value of: stats->active_bytes
  Actual: 73728
Expected: 65536u + 1 + kExtraAllocSize
Which is: 65537
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1649: Failure
Value of: stats->resident_bytes
  Actual: 147456
Expected: slot_size
Which is: 73728
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1651: Failure
Value of: stats->discardable_bytes
  Actual: 65536
Expected: kSystemPageSize
Which is: 16384
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1652: Failure
Value of: stats->num_full_pages
  Actual: 0
Expected: 1u
Which is: 1
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1653: Failure
Value of: stats->num_active_pages
  Actual: 1
Expected: 0u
Which is: 0
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1675: Failure
Value of: stats->resident_bytes
  Actual: 147456
Expected: slot_size
Which is: 73728
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1676: Failure
Value of: stats->decommittable_bytes
  Actual: 147456
Expected: slot_size
Which is: 73728
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1685: Failure
Value of: ptr2
  Actual: 0x4be80000
Expected: ptr
Which is: 0x4be50000
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1702: Failure
Value of: stats->active_bytes
  Actual: 0
Expected: 65536u + kSystemPageSize + 1 + kExtraAllocSize
Which is: 81921
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1703: Failure
Value of: stats->resident_bytes
  Actual: 147456
Expected: slot_size
Which is: 73728
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1704: Failure
Value of: stats->decommittable_bytes
  Actual: 147456
Expected: 0u
Which is: 0
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1706: Failure
Value of: stats->num_full_pages
  Actual: 0
Expected: 1u
Which is: 1
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1708: Failure
Value of: stats->num_empty_pages
  Actual: 1
Expected: 0u
Which is: 0
[  FAILED  ] PartitionAllocTest.DumpMemoryStats (9 ms)
[----------] 1 test from PartitionAllocTest (9 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (9 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] PartitionAllocTest.DumpMemoryStats
 1 FAILED TEST

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 60.0.3096.2  Channel: n/a
OS Version: 
Flash Version:
 
Initial patch that Fix PartitionAlloc test: PartitionAllocTest.DumpMemoryStats failed on Loongson has just been submitted for a review.

It can be viewed at:
https://chromium-review.googlesource.com/c/chromium/src/+/856259
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 9 2018

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

commit c86c9748abc1d6e3b8cc192121ce9ba945f13de2
Author: Wang Qing <wangqing-hf@loongson.cn>
Date: Tue Jan 09 09:41:19 2018

Fix PartitionAlloc test: PartitionAllocTest.DumpMemoryStats failed on Loongson.

The bug comes from test unit: base_unittests
The failed case: PartitionAllocTest.DumpMemoryStats

Due to system pagesize is 16384 on Loongson make the function:
PartitionPageGetRawSizePtr return nullptr, thus resulting in
PartitionAllocTest.DumpMemoryStats case failed on Loongson.

Bug:  800241 

R= haraken@chromium.org

Change-Id: I408a0c17ea85c36a670037da7dfb480ca7c299c2
Reviewed-on: https://chromium-review.googlesource.com/856259
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: 汪 清 <wangqing-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#527945}
[modify] https://crrev.com/c86c9748abc1d6e3b8cc192121ce9ba945f13de2/base/allocator/partition_allocator/partition_alloc_unittest.cc

Status: Fixed (was: Unconfirmed)

Sign in to add a comment