Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.
/ MemoryHole Public archive

Repro from dotnet bug when running in Docker.

Notifications You must be signed in to change notification settings

Cryowatt/MemoryHole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MemoryHole

Repro from dotnet bug when running in Docker.

How to run

In powershell core:

./Start-Test.ps1

Optionally, you can add the -Verbose argument to show the docker build/run steps.

What this application does

This application allocates memory in chunks of 32mb inside of a MemoryFailPoint. The expected behaviour is the MemoryFailPoint should throw a InsufficientMemoryException before the application would normally throw an OutOfMemoryException, allowing the application to fail gracefully.

Expected behaviour

When running natively in Windows the application will consume memory until all of the available physical and virtual memory are depleated. The MemoryFailPoint throws an InsufficientMemoryException on the next iteration. The try/catch block catches the exception and the application exits normally. My expectation is that the dotnet runtime should function the same way in a docker container.

Actual behaviour in a docker container

The MemoryFailPoint never throws an InsufficientMemoryException in a docker container. If run from a container that wasn't started with a --memory argument set, the container is eventually killed with an exit code of 137, but docker doesn't not report it as OOMKilled. With --memory set, the container exits with 137 again, but with OOMKilled: True.

About

Repro from dotnet bug when running in Docker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published