C
C#2y ago
Nova

❔ 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
Buddy
Buddy2y ago
Csproj says nothing unfortunately It's just the configuration of the project, it doesn't actually contain any code. $paste
MODiX
MODiX2y ago
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!
Buddy
Buddy2y ago
But you've got a memory leak it seems. Is the memory consumption increased by a fixed amount?
Nova
NovaOP2y ago
no it seems to fluctuate slowly at first and getting exponentially worse over time
Nova
NovaOP2y ago
Nova
NovaOP2y ago
references https://github.com/StereoKit/StereoKit locally which is a submodule in the repo
Buddy
Buddy2y ago
Is that all? If so, then it must be a memory leak within the library.
Nova
NovaOP2y ago
yea, but it's not building it's memory leaking during the build process that's what confuses me
Buddy
Buddy2y ago
Oh, I see.
Nova
NovaOP2y ago
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
Buddy
Buddy2y ago
If you build on Windows, does it behave similarly?
Nova
NovaOP2y ago
i don't have windows, but others who have compiled said it works fine for them
Buddy
Buddy2y ago
Are they on Windows or Linux (or some other platform)?
Nova
NovaOP2y ago
they're on windows
Buddy
Buddy2y ago
I see. It may be a platform issue, bug in the dotnet compiler catshrug Are you able to spin up a VM?
Nova
NovaOP2y ago
i spun up a debian container to build this in windows or linux vm?
Buddy
Buddy2y ago
Windows.
WhiteBlackGoose
you can try other version of .net too I guess
Nova
NovaOP2y ago
what version should i try?
WhiteBlackGoose
which version do you use?
Nova
NovaOP2y ago
the csproj says to use netstandard2.0 well i made it do that after i submitted the logs here same result btw
WhiteBlackGoose
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
Nova
NovaOP2y ago
oh!
/r/m/n/M/x/n/n/A/StereoKitTest ❯❯❯ dotnet --list-sdks ✘ 1✘ 137
7.0.302 [/usr/share/dotnet/sdk]
/r/m/n/M/x/n/n/A/StereoKitTest ❯❯❯ dotnet --list-sdks ✘ 1✘ 137
7.0.302 [/usr/share/dotnet/sdk]
WhiteBlackGoose
btw did you install it via apt or script? or some other way
/r/m/n/M/x/n/n/A/StereoKitTest
creative naming of directories 😄
Nova
NovaOP2y ago
from their repo using apt on debian
WhiteBlackGoose
I see
Nova
NovaOP2y ago
fish shortens the dir names in the prompt
WhiteBlackGoose
I see, I also use fish but another prompt, didn't know
Nova
NovaOP2y ago
i use the starship prompt
Nova
NovaOP2y ago
huh weird
WhiteBlackGoose
it's configured differently
Nova
NovaOP2y ago
makes sense
WhiteBlackGoose
anyway, I guess you can try .NET SDK 6
Nova
NovaOP2y ago
ok uninstall 7?
WhiteBlackGoose
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
Nova
NovaOP2y ago
another one! i have nix btw not nixos, but i do have nix so if you want me to try that i can
WhiteBlackGoose
oh well, then yeah you can try shell
Nova
NovaOP2y ago
remember, i'm running a debian distrobox container in an arch host system
WhiteBlackGoose
I've never used distrobox, but that ig shouldn't matter
Nova
NovaOP2y ago
but i did try dotnet in arch and it had the same problem
WhiteBlackGoose
oh I see you also tried 7?
Nova
NovaOP2y ago
i only tried 7 trying 6 now
WhiteBlackGoose
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)
Nova
NovaOP2y ago
fair doesn't seem to work :S
WhiteBlackGoose
same problem? or what
Nova
NovaOP2y ago
same problem
WhiteBlackGoose
I see
Nova
NovaOP2y ago
maybe it's just the project itself? like stereokit because i can build the program just fine without stereokit
WhiteBlackGoose
dunno, try to make a minimal repro
Nova
NovaOP2y ago
this is the minimal repro
WhiteBlackGoose
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?
Nova
NovaOP2y ago
no the test is the repro the other one is the library i'm using stereokit
WhiteBlackGoose
ahh ig you need to report it to somewhere to StereoKit prolly? or sdk not sure
Nova
NovaOP2y ago
yea i asked the stereokit person
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server