← Back to team overview

kernel-packages team mailing list archive

[Bug 1389787] Re: 3.11 memory consumption leads to HANG (not sure if 3.13 suffers from this).

 

For This specific back trace...

Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152776] [<ffffffff8128eb02>] ext4_es_lru_del+0x32/0x80 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152781] [<ffffffff81270595>] ext4_clear_inode+0x45/0x90 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152786] [<ffffffff81257621>] ext4_evict_inode+0x81/0x510 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152792] [<ffffffff811ce490>] evict+0xc0/0x1d0 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152795] [<ffffffff811ce5e1>] dispose_list+0x41/0x50 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152797] [<ffffffff8174756f>] ? _raw_spin_trylock+0xf/0x30 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152800] [<ffffffff811cf5d5>] prune_icache_sb+0x185/0x340 
... 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152842] [<ffffffff81173ff0>] handle_mm_fault+0x2a0/0x3e0 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152847] [<ffffffff8174b9ff>] __do_page_fault+0x1af/0x560 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152850] [<ffffffff811b8de7>] ? cp_new_stat+0x107/0x120 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152856] [<ffffffff810ca06c>] ? do_futex+0x7c/0x1b0 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152858] [<ffffffff811b91b5>] ? SYSC_newstat+0x25/0x30 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152861] [<ffffffff8174bde7>] do_page_fault+0x37/0x70 

Which I DO NOT have a dump for (not sure if there is any old dump for
this backtrace).

For this backtrace...

I can see memory pressure seems to be big and the page fault incurs in
(signalled also by the fact that the page reclaiming is going through
"slowest_path" : __alloc_pages_nodemask -> alloc_pages_slowpath ->
__alloc_pages_direct_reclaim -> __perform_reclaim -> try_to_free_pages)
- seeing that direct_reclaim is a synchronous and blocking way of
handling page faults. This explains why dropping caches might be helping
here, since the path for the page allocation is different on such
conditions.

Moving a bit...

Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152812] [<ffffffff8115af04>] shrink_slab+0x154/0x300 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152816] [<ffffffff8115dbf8>] do_try_to_free_pages+0x218/0x290 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152819] [<ffffffff8115dfa4>] try_to_free_pages+0xe4/0x1a0 

trying to shrink slab structure to free some memory so a frame can be
allocated to the page fault that just happened.

Moving further.. it gets to the point that aged cache pages are scanned
(LRU) to check if they can be freed AND we got probably into a page
filebacked (pagecache / demand paging) that had its "shrink" function
called (to flush data, free cache, update filesystem master block, etc):

# update filesystem super block 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152800] [<ffffffff811cf5d5>] prune_icache_sb+0x185/0x340 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152806] [<ffffffff811b7703>] prune_super+0x193/0x1b0 

# calling inode evict function (to free inode page) 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152781] [<ffffffff81270595>] ext4_clear_inode+0x45/0x90 
Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152786] [<ffffffff81257621>] ext4_evict_inode+0x81/0x510 

Finally we arrive at ext4_es_lru_del(struct inode *inode):

1023 spin_lock(&sbi->s_es_lru_lock);

The task is hang and someone is holding this lock. I would have to have
this core to know who and why.

Continuing preliminary analysis for other backtraces / dumps on other
comment...

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1389787

Title:
  3.11 memory consumption leads to HANG (not sure if 3.13 suffers from
  this).

Status in “linux” package in Ubuntu:
  New

Bug description:
  It was brought to my attention the following stack traces (occurring
  several times on different machines):

  crash> bt 
  PID: 2877 TASK: ffff881009b42ee0 CPU: 1 COMMAND: "git" 
  #0 [ffff880c0c6bb9d0] machine_kexec at ffffffff8104b141 
  #1 [ffff880c0c6bba40] crash_kexec at ffffffff810d5a58 
  #2 [ffff880c0c6bbb10] oops_end at ffffffff81748b38 
  #3 [ffff880c0c6bbb40] no_context at ffffffff8172dd02 
  #4 [ffff880c0c6bbb90] __bad_area_nosemaphore at ffffffff8172dee4 
  #5 [ffff880c0c6bbbf0] bad_area at ffffffff8172df5d 
  #6 [ffff880c0c6bbc20] __do_page_fault at ffffffff8174bda8 
  #7 [ffff880c0c6bbd30] do_page_fault at ffffffff8174bde7 
  #8 [ffff880c0c6bbd60] page_fault at ffffffff81747e98 
  [exception RIP: kmem_cache_alloc_trace+106] 
  RIP: ffffffff8119b22a RSP: ffff880c0c6bbe18 RFLAGS: 00010206 
  RAX: 0000000000000000 RBX: ffff88008407e0c0 RCX: 00000000031b6bc9 
  RDX: 00000000031b6bc8 RSI: 00000000000080d0 RDI: 00000000000173c0 
  RBP: ffff880c0c6bbe68 R8: ffff88081fa373c0 R9: 0000000000000000 
  R10: 0000000000000000 R11: 0000000000000202 R12: ffff88081f403800 
  R13: 0000000000629050 R14: ffffffff811bcfe4 R15: 00000000000080d0 
  ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 
  #9 [ffff880c0c6bbe70] alloc_pipe_info at ffffffff811bcfe4 
  #10 [ffff880c0c6bbe90] get_pipe_inode at ffffffff811bd0aa 
  #11 [ffff880c0c6bbeb0] create_pipe_files at ffffffff811bd648 
  #12 [ffff880c0c6bbef0] __do_pipe_flags at ffffffff811bd7d2 
  #13 [ffff880c0c6bbf30] sys_pipe2 at ffffffff811bd8f0 
  #14 [ffff880c0c6bbf70] sys_pipe at ffffffff811bd980 
  #15 [ffff880c0c6bbf80] system_call_fastpath at ffffffff8175099d 
  RIP: 00007f2d245da7e7 RSP: 00007fff6a4cfb18 RFLAGS: 00010283 
  RAX: 0000000000000016 RBX: ffffffff8175099d RCX: 000000000000001c 
  RDX: 00007f2d248aeac0 RSI: 0000000000000000 RDI: 00007fff6a4cfad0 
  RBP: 0000000000000002 R8: 0000000000000000 R9: 0000000000000000 
  R10: 0000000000000000 R11: 0000000000000202 R12: ffffffff811bd980 
  R13: ffff880c0c6bbf78 R14: 0000000000000000 R15: 000000000232efc0 
  ORIG_RAX: 0000000000000016 CS: 0033 SS: 002b

  AND

  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152703] SysRq : Show backtrace of all active CPUs 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152708] sending NMI to all CPUs: 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152714] NMI backtrace for cpu 0 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152720] CPU: 0 PID: 13579 Comm: python Tainted: GF I 3.11.0-15-generic #25~precise1-Ubuntu 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152721] Hardware name: HP ProLiant BL460c G7, BIOS I27 05/05/2011 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152724] task: ffff880085f50000 ti: ffff880a64afa000 task.ti: ffff880a64afa000 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152725] RIP: 0010:[<ffffffff81050ff5>] [<ffffffff81050ff5>] __ticket_spin_lock+0x25/0x30 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152736] RSP: 0018:ffff880a64afb748 EFLAGS: 00000293 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152737] RAX: 000000000000db25 RBX: ffff880be8576480 RCX: 000000018066002a 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152739] RDX: 000000000000db2e RSI: 0000000000000001 RDI: ffff880be8576480 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152740] RBP: ffff880a64afb748 R08: 0000000000000000 R09: ffffea002407db00 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152741] R10: ffffffff8128d8ed R11: 0000000000000001 R12: ffff8807572480b0 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152743] R13: ffff8807572481b8 R14: 00000000ffffffff R15: ffff8805e9c77908 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152745] FS: 00007ff00d4db700(0000) GS:ffff880c0ba00000(0000) knlGS:0000000000000000 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152746] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152748] CR2: 00007fb66906d8e0 CR3: 000000053b3dd000 CR4: 00000000000007f0 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152749] Stack: 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152750] ffff880a64afb758 ffffffff8174759e ffff880a64afb778 ffffffff8128eb02 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152756] ffff8807572480b0 ffff880757248200 ffff880a64afb798 ffffffff81270595 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152759] ffff880a64afb798 ffff8807572480b0 ffff880a64afb7c8 ffffffff81257621 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152763] Call Trace: 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152770] [<ffffffff8174759e>] _raw_spin_lock+0xe/0x20 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152776] [<ffffffff8128eb02>] ext4_es_lru_del+0x32/0x80 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152781] [<ffffffff81270595>] ext4_clear_inode+0x45/0x90 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152786] [<ffffffff81257621>] ext4_evict_inode+0x81/0x510 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152792] [<ffffffff811ce490>] evict+0xc0/0x1d0 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152795] [<ffffffff811ce5e1>] dispose_list+0x41/0x50 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152797] [<ffffffff8174756f>] ? _raw_spin_trylock+0xf/0x30 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152800] [<ffffffff811cf5d5>] prune_icache_sb+0x185/0x340 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152806] [<ffffffff811b7703>] prune_super+0x193/0x1b0 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152812] [<ffffffff8115af04>] shrink_slab+0x154/0x300 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152816] [<ffffffff8115dbf8>] do_try_to_free_pages+0x218/0x290 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152819] [<ffffffff8115dfa4>] try_to_free_pages+0xe4/0x1a0 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152823] [<ffffffff811520b8>] __alloc_pages_nodemask+0x618/0x9a0 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152827] [<ffffffff817336c8>] ? mem_cgroup_update_tree+0x9c/0x121 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152831] [<ffffffff811920a3>] alloc_pages_vma+0xa3/0x150 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152837] [<ffffffff81170249>] do_wp_page+0xc9/0x7c0 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152840] [<ffffffff81172d8c>] handle_pte_fault+0x1ec/0x230 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152842] [<ffffffff81173ff0>] handle_mm_fault+0x2a0/0x3e0 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152847] [<ffffffff8174b9ff>] __do_page_fault+0x1af/0x560 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152850] [<ffffffff811b8de7>] ? cp_new_stat+0x107/0x120 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152856] [<ffffffff810ca06c>] ? do_futex+0x7c/0x1b0 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152858] [<ffffffff811b91b5>] ? SYSC_newstat+0x25/0x30 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152861] [<ffffffff8174bde7>] do_page_fault+0x37/0x70 
  Oct 15 14:19:08 LGEARND8B5 kernel: [796493.152864] [<ffffffff81747e98>] page_fault+0x28/0x30

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1389787/+subscriptions


References