Bug#945213: Info received (Bug#945213: linux-image-5.2.0-3-amd64: OOM handling broken if hugepages are enabled)

2019-11-24 Thread Anton Ivanov

[0.00] Linux version 5.2.0-3-amd64 (debian-kernel@lists.debian.org) 
(gcc version 8.3.0 (Debian 8.3.0-22)) #1 SMP Debian 5.2.17-1 (2019-09-26)
[0.00] Command line: BOOT_IMAGE=diskless/amd64/vmlinuz-5.2.0-3-amd64 
initrd=diskless/amd64/initrd.img-5.2.0-3-amd64 root=/dev/nfs ip=dhcp 
nfsroot=192.168.3.3:/exports/boot/buster-bess mitigations=off rw  --
[0.00] random: get_random_u32 called from bsp_init_amd+0x20b/0x2b0 with 
crng_init=0
[0.00] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point 
registers'
[0.00] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[0.00] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[0.00] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
[0.00] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, 
using 'standard' format.
[0.00] BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009e7ff] usable
[0.00] BIOS-e820: [mem 0x0009e800-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000e-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x9dc43fff] usable
[0.00] BIOS-e820: [mem 0x9dc44000-0x9ddc] reserved
[0.00] BIOS-e820: [mem 0x9ddd-0x9ddd] ACPI data
[0.00] BIOS-e820: [mem 0x9dde-0x9e13bfff] ACPI NVS
[0.00] BIOS-e820: [mem 0x9e13c000-0x9e694fff] reserved
[0.00] BIOS-e820: [mem 0x9e695000-0x9e695fff] usable
[0.00] BIOS-e820: [mem 0x9e696000-0x9e89bfff] ACPI NVS
[0.00] BIOS-e820: [mem 0x9e89c000-0x9ecb1fff] usable
[0.00] BIOS-e820: [mem 0x9ecb2000-0x9eff3fff] reserved
[0.00] BIOS-e820: [mem 0x9eff4000-0x9eff] usable
[0.00] BIOS-e820: [mem 0xfec0-0xfec00fff] reserved
[0.00] BIOS-e820: [mem 0xfec1-0xfec10fff] reserved
[0.00] BIOS-e820: [mem 0xfed0-0xfed00fff] reserved
[0.00] BIOS-e820: [mem 0xfed8-0xfed8] reserved
[0.00] BIOS-e820: [mem 0xff00-0x] reserved
[0.00] BIOS-e820: [mem 0x00011000-0x00015eff] usable
[0.00] NX (Execute Disable) protection: active
[0.00] SMBIOS 2.7 present.
[0.00] DMI: System manufacturer System Product Name/F2A55, BIOS 5301 
10/10/2012
[0.00] tsc: Fast TSC calibration using PIT
[0.00] tsc: Detected 3501.783 MHz processor
[0.003478] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.003479] e820: remove [mem 0x000a-0x000f] usable
[0.003485] last_pfn = 0x15f000 max_arch_pfn = 0x4
[0.003490] MTRR default type: uncachable
[0.003490] MTRR fixed ranges enabled:
[0.003491]   0-9 write-back
[0.003492]   A-B write-through
[0.003493]   C-D2FFF write-protect
[0.003494]   D3000-E7FFF uncachable
[0.003494]   E8000-F write-protect
[0.003495] MTRR variable ranges enabled:
[0.003496]   0 base  mask 8000 write-back
[0.003497]   1 base 8000 mask E000 write-back
[0.003498]   2 base 9F00 mask FF00 uncachable
[0.003498]   3 disabled
[0.003499]   4 disabled
[0.003499]   5 disabled
[0.003500]   6 disabled
[0.003500]   7 disabled
[0.003501] TOM2: 00015f00 aka 5616M
[0.003713] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT
[0.003882] e820: update [mem 0x9f00-0x] usable ==> reserved
[0.003887] last_pfn = 0x9f000 max_arch_pfn = 0x4
[0.007940] found SMP MP-table at [mem 0x000fd870-0x000fd87f]
[0.030016] Using GB pages for direct mapping
[0.030018] BRK [0x133801000, 0x133801fff] PGTABLE
[0.030020] BRK [0x133802000, 0x133802fff] PGTABLE
[0.030021] BRK [0x133803000, 0x133803fff] PGTABLE
[0.030074] BRK [0x133804000, 0x133804fff] PGTABLE
[0.030076] BRK [0x133805000, 0x133805fff] PGTABLE
[0.030380] BRK [0x133806000, 0x133806fff] PGTABLE
[0.030449] BRK [0x133807000, 0x133807fff] PGTABLE
[0.030551] BRK [0x133808000, 0x133808fff] PGTABLE
[0.030642] BRK [0x133809000, 0x133809fff] PGTABLE
[0.030767] BRK [0x13380a000, 0x13380afff] PGTABLE
[0.030857] BRK [0x13380b000, 0x13380bfff] PGTABLE
[0.030919] BRK [0x13380c000, 0x13380cfff] PGTABLE
[0.031040] RAMDISK: [mem 0x7e75-0x7fff]
[0.031046] ACPI: Early table checksum verification disabled
[0.039448] ACPI: RSDP 0x000F0490 24 (v02 ALASKA)
[0.039451] ACPI: XSDT 0x9DDD8078 64 (v01 ALASKA A M I
01072009 AMI  00010013)
[0.039457] ACPI: FACP 0x9DDDE868 00010C (v05 ALASKA A M I
01072009 AMI  00010013)
[0.039461] ACPI BIOS 

Bug#945213: linux-image-5.2.0-3-amd64: OOM handling broken if hugepages are enabled

2019-11-22 Thread Anton Ivanov

On 22/11/2019 19:32, Ben Hutchings wrote:

Control: reassign -1 src:linux 5.2.17-1
Control: tag -1 moreinfo

On Thu, 2019-11-21 at 08:58 +, Anton Ivanov wrote:

Package: linux-image-5.2.0-3-amd64
Version: 5.2.17+1
Severity: important

Dear Maintainer,

Dear Maintainer,

OOM handling appears to be broken in 5.2.17-1 if hugepages are enabled.

Test system: AMD A4-5300, 40G RAM, no swap, booted disklessly.

Without hugepages enabled can compile dpdk without any issues. With huge
pages enabled it will reproducibly OOM when trying to link one of the
libraries. There are 20G+ free RAM at that point according to free with the
rest being mostly used as buffers.

It is sufficient to just enable huge pages to trigger this (2G out of 40G),
they are not allocated or used by anything.

What do you mean by "if hugepages are enabled"?  hugetlbfs and THP are
enabled by default.


$ tail -2 sysctl.conf

vm.nr_hugepages=1024

If you do not have that, compile completes fine. If you have that 
compile blows up when linking one of the dpdk libraries. At that point 
the machine has ~ 20G free RAM.

You need to provide a log of the OOM messages.


Ack. I will re-run the tests tomorrow and update the bug with detailed 
logs and the OOM.




Ben.



--
Anton R. Ivanov
https://www.kot-begemot.co.uk/



Bug#945213: linux-image-5.2.0-3-amd64: OOM handling broken if hugepages are enabled

2019-11-22 Thread Ben Hutchings
Control: reassign -1 src:linux 5.2.17-1
Control: tag -1 moreinfo

On Thu, 2019-11-21 at 08:58 +, Anton Ivanov wrote:
> Package: linux-image-5.2.0-3-amd64
> Version: 5.2.17+1
> Severity: important
> 
> Dear Maintainer,
> 
> Dear Maintainer,
> 
> OOM handling appears to be broken in 5.2.17-1 if hugepages are enabled.
> 
> Test system: AMD A4-5300, 40G RAM, no swap, booted disklessly.
> 
> Without hugepages enabled can compile dpdk without any issues. With huge
> pages enabled it will reproducibly OOM when trying to link one of the
> libraries. There are 20G+ free RAM at that point according to free with the
> rest being mostly used as buffers.
> 
> It is sufficient to just enable huge pages to trigger this (2G out of 40G),
> they are not allocated or used by anything. 

What do you mean by "if hugepages are enabled"?  hugetlbfs and THP are
enabled by default.

You need to provide a log of the OOM messages.

Ben.

-- 
Ben Hutchings
I say we take off; nuke the site from orbit.
It's the only way to be sure.




signature.asc
Description: This is a digitally signed message part


Processed: Re: Bug#945213: linux-image-5.2.0-3-amd64: OOM handling broken if hugepages are enabled

2019-11-22 Thread Debian Bug Tracking System
Processing control commands:

> reassign -1 src:linux 5.2.17-1
Bug #945213 [linux-image-5.2.0-3-amd64] linux-image-5.2.0-3-amd64: OOM handling 
broken if hugepages are enabled
Bug reassigned from package 'linux-image-5.2.0-3-amd64' to 'src:linux'.
No longer marked as found in versions 5.2.17+1.
Ignoring request to alter fixed versions of bug #945213 to the same values 
previously set
Bug #945213 [src:linux] linux-image-5.2.0-3-amd64: OOM handling broken if 
hugepages are enabled
Marked as found in versions linux/5.2.17-1.
> tag -1 moreinfo
Bug #945213 [src:linux] linux-image-5.2.0-3-amd64: OOM handling broken if 
hugepages are enabled
Added tag(s) moreinfo.

-- 
945213: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=945213
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#945213: linux-image-5.2.0-3-amd64: OOM handling broken if hugepages are enabled

2019-11-21 Thread Anton Ivanov
Package: linux-image-5.2.0-3-amd64
Version: 5.2.17+1
Severity: important

Dear Maintainer,

Dear Maintainer,

OOM handling appears to be broken in 5.2.17-1 if hugepages are enabled.

Test system: AMD A4-5300, 40G RAM, no swap, booted disklessly.

Without hugepages enabled can compile dpdk without any issues. With huge
pages enabled it will reproducibly OOM when trying to link one of the
libraries. There are 20G+ free RAM at that point according to free with the
rest being mostly used as buffers.

It is sufficient to just enable huge pages to trigger this (2G out of 40G),
they are not allocated or used by anything. 


-- System Information:
Debian Release: 10.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled