Re: Review Request 36627: WIP: Fixed cgroups oom killer test on Ubuntu 14.04

2015-07-24 Thread Artem Harutyunyan

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36627/
---

(Updated July 24, 2015, 5:32 p.m.)


Review request for mesos, Benjamin Hindman and Joris Van Remoortere.


Changes
---

Added a fix for flaky cgroups memory pressure test.


Bugs: MESOS-2660
https://issues.apache.org/jira/browse/MESOS-2660


Repository: mesos


Description
---

See summary.


Diffs (updated)
-

  src/tests/cgroups_tests.cpp 9f5028f831a5a2fd4f7f0a0b7459c184ea9598fb 
  src/tests/memory_test_helper.cpp 8093e66c45cacc4bf0295a3448c128a1aa7c751a 

Diff: https://reviews.apache.org/r/36627/diff/


Testing
---

It seems there is still one more cgroups memory test failing on more test 
failing on my box. I'd like to fix that too and commit it together with this 
one. 

sudo make check

Verified that the process actually gets killed by oom-killer:

```
# tail -f /var/log/syslog

Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052405] 
lt-memory-test- invoked oom-killer: gfp_mask=0xd0, order=0, oom_score_adj=0
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052408] 
lt-memory-test- cpuset=/ mems_allowed=0
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052411] CPU: 7 PID: 
76599 Comm: lt-memory-test- Tainted: G   OE 3.16.0-41-generic 
#57~14.04.1-Ubuntu
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052413] Hardware 
name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, 
BIOS 6.00 05/20/2014
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052413]  
88022efc1000 8801fd2efc30 81765721 880231f10a30
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052415]  
8801fd2efcb8 8175f2d5 8802366f30c0 8801e9405b00
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052416]  
8801fd2efc80 81165067 880231f10ee8 880231f10a30
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052418] Call Trace:
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052424]  
[81765721] dump_stack+0x45/0x56
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052426]  
[8175f2d5] dump_header+0x7f/0x1f1
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052430]  
[81165067] ? find_lock_task_mm+0x47/0xa0
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052432]  
[811654e5] oom_kill_process+0x205/0x360
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052434]  
[812eb975] ? security_capable_noaudit+0x15/0x20
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052437]  
[811ca2e1] mem_cgroup_oom_synchronize+0x581/0x5e0
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052439]  
[811c97c0] ? mem_cgroup_try_charge_mm+0xa0/0xa0
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052440]  
[81165ce4] pagefault_out_of_memory+0x14/0x80
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052442]  
[8175d97f] mm_fault_error+0x67/0x140
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052445]  
[8105b28c] __do_page_fault+0x4ec/0x560
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052449]  
[810a6208] ? __enqueue_entity+0x78/0x80
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052450]  
[810a7f35] ? set_next_entity+0x95/0xb0
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052452]  
[81011627] ? __switch_to+0x167/0x580
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052454]  
[8105b331] do_page_fault+0x31/0x70
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052456]  
[8176fe68] page_fault+0x28/0x30
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052457] Task in 
/mesos_test killed as a result of limit of /mesos_test
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052459] memory: 
usage 65536kB, limit 65536kB, failcnt 24
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052460] memory+swap: 
usage 0kB, limit 18014398509481983kB, failcnt 0
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052461] kmem: usage 
0kB, limit 18014398509481983kB, failcnt 0
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052461] Memory 
cgroup stats for /mesos_test: cache:0KB rss:65536KB rss_huge:63488KB 
mapped_file:0KB writeback:0KB inactive_anon:0KB active_anon:0KB 
inactive_file:0KB active_file:0KB unevictable:65536KB
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052467] [ pid ]   
uid  tgid total_vm  rss nr_ptes swapents oom_score_adj name
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052574] [76599] 
0 765998245231766 1221 0 lt-memory-test-
Jul 22 14:56:00 harutyunyan-virtual-machine kernel: 

Re: Review Request 36627: WIP: Fixed cgroups oom killer test on Ubuntu 14.04

2015-07-23 Thread Marco Massenzio

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36627/#review92862
---



src/tests/memory_test_helper.cpp (line 87)
https://reviews.apache.org/r/36627/#comment147116

micro-nit: missing an `a` in `posix_memlign`


- Marco Massenzio


On July 23, 2015, 5:38 p.m., Artem Harutyunyan wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/36627/
 ---
 
 (Updated July 23, 2015, 5:38 p.m.)
 
 
 Review request for mesos, Benjamin Hindman and Joris Van Remoortere.
 
 
 Bugs: MESOS-2660
 https://issues.apache.org/jira/browse/MESOS-2660
 
 
 Repository: mesos
 
 
 Description
 ---
 
 See summary.
 
 
 Diffs
 -
 
   src/tests/memory_test_helper.cpp 8093e66c45cacc4bf0295a3448c128a1aa7c751a 
 
 Diff: https://reviews.apache.org/r/36627/diff/
 
 
 Testing
 ---
 
 It seems there is still one more cgroups memory test failing on more test 
 failing on my box. I'd like to fix that too and commit it together with this 
 one. 
 
 sudo make check
 
 Verified that the process actually gets killed by oom-killer:
 
 ```
 # tail -f /var/log/syslog
 
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052405] 
 lt-memory-test- invoked oom-killer: gfp_mask=0xd0, order=0, oom_score_adj=0
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052408] 
 lt-memory-test- cpuset=/ mems_allowed=0
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052411] CPU: 7 
 PID: 76599 Comm: lt-memory-test- Tainted: G   OE 3.16.0-41-generic 
 #57~14.04.1-Ubuntu
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052413] Hardware 
 name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, 
 BIOS 6.00 05/20/2014
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052413]  
 88022efc1000 8801fd2efc30 81765721 880231f10a30
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052415]  
 8801fd2efcb8 8175f2d5 8802366f30c0 8801e9405b00
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052416]  
 8801fd2efc80 81165067 880231f10ee8 880231f10a30
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052418] Call Trace:
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052424]  
 [81765721] dump_stack+0x45/0x56
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052426]  
 [8175f2d5] dump_header+0x7f/0x1f1
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052430]  
 [81165067] ? find_lock_task_mm+0x47/0xa0
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052432]  
 [811654e5] oom_kill_process+0x205/0x360
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052434]  
 [812eb975] ? security_capable_noaudit+0x15/0x20
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052437]  
 [811ca2e1] mem_cgroup_oom_synchronize+0x581/0x5e0
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052439]  
 [811c97c0] ? mem_cgroup_try_charge_mm+0xa0/0xa0
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052440]  
 [81165ce4] pagefault_out_of_memory+0x14/0x80
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052442]  
 [8175d97f] mm_fault_error+0x67/0x140
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052445]  
 [8105b28c] __do_page_fault+0x4ec/0x560
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052449]  
 [810a6208] ? __enqueue_entity+0x78/0x80
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052450]  
 [810a7f35] ? set_next_entity+0x95/0xb0
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052452]  
 [81011627] ? __switch_to+0x167/0x580
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052454]  
 [8105b331] do_page_fault+0x31/0x70
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052456]  
 [8176fe68] page_fault+0x28/0x30
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052457] Task in 
 /mesos_test killed as a result of limit of /mesos_test
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052459] memory: 
 usage 65536kB, limit 65536kB, failcnt 24
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052460] 
 memory+swap: usage 0kB, limit 18014398509481983kB, failcnt 0
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052461] kmem: 
 usage 0kB, limit 18014398509481983kB, failcnt 0
 Jul 22 14:56:00 harutyunyan-virtual-machine kernel: [17440.052461] Memory 
 cgroup stats for /mesos_test: cache:0KB rss:65536KB rss_huge:63488KB 
 mapped_file:0KB writeback:0KB inactive_anon:0KB active_anon:0KB