❔ dotnet build linux uses up all free memory
Hi! trying to build a .net core 2 application from csproj on linux (debian) and when I do dotnet build appears to just hang at a certain point (see attached log) and slowly consume more and more RAM until my system runs out. I'm not sure why this is?
56 Replies
Csproj says nothing unfortunately
It's just the configuration of the project, it doesn't actually contain any code.
$paste
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
But you've got a memory leak it seems.
Is the memory consumption increased by a fixed amount?
no it seems to fluctuate
slowly at first and getting exponentially worse over time
Is that all?
If so, then it must be a memory leak within the library.
yea, but it's not building
it's memory leaking during the build process
that's what confuses me
Oh, I see.
yea if it was runtime i'd know what to do
hell, i contributed a lot to its c++ core
but at build time with dotnet idk much :p
If you build on Windows, does it behave similarly?
i don't have windows, but others who have compiled said it works fine for them
Are they on Windows or Linux (or some other platform)?
they're on windows
I see.
It may be a platform issue, bug in the dotnet compiler
Are you able to spin up a VM?
i spun up a debian container to build this in
windows or linux vm?
Windows.
you can try other version of .net too
I guess
what version should i try?
which version do you use?
the csproj says to use netstandard2.0
well
i made it do that after i submitted the logs here
same result btw
Which SDK do you have
compiler is part of SDK
if the bug is in the compiler, it's a bug in the SDK
dotnet --list-sdks
oh!
btw did you install it via apt or script? or some other way
/r/m/n/M/x/n/n/A/StereoKitTestcreative naming of directories 😄
from their repo using apt
on debian
I see
fish shortens the dir names in the prompt
I see, I also use fish but another prompt, didn't know
i use the starship prompt
huh weird
it's configured differently
makes sense
anyway, I guess you can try .NET SDK 6
ok
uninstall 7?
hmm
I guess you can try the following
damn poor people without nix
you can download the binaries from MS' website for .net 6
and try to run dotnet build
overwriting PATH and DOTNET_ROOT with the path to the binaries for .net 6
or, if you can, trying it on some other OS (e. g. Ubuntu and Windows are favored by .NET devs) I guess may also give some insight
another one!
i have nix btw
not nixos, but i do have nix
so if you want me to try that i can
oh well, then yeah you can try shell
remember, i'm running a debian distrobox container in an arch host system
I've never used distrobox, but that ig shouldn't matter
but i did try dotnet in arch and it had the same problem
oh I see
you also tried 7?
i only tried 7
trying 6 now
you can try copying these two dotnet* files
https://github.com/WhiteBlackGoose/dotfiles/tree/nixos/envs
and do
nix-shell dotnet.nix
but remove .net sdk 7 from dotnet.nix first
(these aren't flakes yet, haven't had time for it yet)fair
doesn't seem to work :S
same problem?
or what
same problem
I see
maybe it's just the project itself?
like
stereokit
because i can build the program just fine without stereokit
dunno, try to make a minimal repro
this is the minimal repro
make a console with only one packge: stereokit
I see
then you can report it somewhere
but I see you have two csproj files
one is test
does it fail on non-test one?
no the test is the repro
the other one is the library i'm using
stereokit
ahh
ig you need to report it
to somewhere
to StereoKit prolly?
or sdk
not sure
yea i asked the stereokit person
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.