-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process.MainModule.FileName incorrect with kernel 5.0.0-27-generic (causing MSBuild to be broken) #30774
Comments
Opening an issue here as the MSBuild team believes this is not related to MSBuild itself. I don't have time to dig into this myself (I just reverted to the previous kernel) but thought I'd be good to have a corefx issue open for this. |
Interesting. Perhaps @tmds has thoughts about what we may be doing wrong here. |
We read this from the 5.0.0-25-generic (working):
5.0.0-27-generic (broken):
|
@tmds, presumably then this is a Linux bug? |
if it is, then sdk and runtime containers should be updated accordingly to prevent any other duplicate issues. |
Yes, I think so too, specific to the 5.0.0-27-generic on Ubuntu. |
OK, I opened https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843018 . I hope that's the right location to report Ubuntu kernel bugs. If anyone knows about a better way of contacting the Ubuntu team, let me know :). |
PS: There's a "Does this bug affect you?" link at the top of the page (green text, below the but title) that those who are interested can use to upvote this issue in Launchpad. |
I can confirm that, Linux host users should downgrade or upgrade kernel to build successfully. For me, i upgraded my Ubuntu host to kernel 5.2.12 and everything is fine now. There is nothing to do for sdk and runtime containers actually. |
I logged a Docker issue for this as well because they are involved - moby/moby#39875 |
@MichaelSimons can we close this issue now then? |
@danmosemsft, @MichaelSimons: Just so you know, I believe this is still an issue on Azure Ubuntu VMs. |
@MichaelSimons I imagine the only reason for us to have an issue at this point is if we need to adjust the kernel versions of any docker images we own, which would be better tracked in your repo. |
@danmosemsft - A Docker container has no kernel inside it; it just installed and started on the kernel which is used on the host. Because of this, I am not seeing a workaround that can be applied to our docker images. Are there any potential alternative implementations of Process.MainModule.FileName? Users affected by this, please chime in on the respective issues https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843018 and moby/moby#39875. |
@MichaelSimons |
I just checked, this seems to work on the latest Ubuntu kernel:
Perhaps |
Can someone more familiar with the Linux ecosystem please answer this: why would we invest in a workaround for a single kernel version that seems to have a significant, subsequently fixed bug in it? It takes time to do, would exist in the code indefinitely, and presumably would need back porting to several .NET Core releases to be useful. Perhaps the Linux community will backport a fix to this kernel. Meanwhile I think the answer here if someone hits this is "that kernel has a serious bug. please use a different kernel version". Right? |
BTW historically changes to what we parse from the proc filesystem have had a bug tail because we've discovered edge cases, eg., behaviors varying by kernel version, or in a recent case, we were pulling the process name but it turned out it would not return more than 15 characters. So I'd rather not change what we do here. |
imho this should be fixed in the Ubuntu kernel, because the issue is unique to that kernel. |
I agree. We shouldn't do unnatural things to try to work around this in Process. |
OK, I'm going to close this then. Thanks @tmds, @qmfrederik |
Those hitting this issue, please note that the 5.0.0-27-generic kernel (the current Ubuntu kernel) contains a couple of security fixes, see https://usn.ubuntu.com/4114-1/ and https://usn.ubuntu.com/4115-1/. You may want consider that when reverting your kernel. |
To those having the mentioned error under their azure vm running Ubuntu: I enabled the grub timeout following this guide, used the serial console in the azure portal to select the working kernel from the boot menu, and then uninstalled the bad kernel version by calling |
Im also seeing this issue on Does this mean that this would be broken in all azure VMs created with that image? |
I am getting this on @github actions! Building my docker images is now broken using github actions :/ |
I've escalated internally to the folks who own the GitHub Actions images, but don't yet have anything concrete to share. |
Google pointed me here after I teared my hairs out when trying to figure out why my GitHub Actions broken. :( changed my dockerimage.yml to |
I updated my Ubuntu host (18.04.3 LTS) to kernel version 5.2.17 and now it works! With these instructions it was very easy! |
If someone finds a later version does work, that would be good to share here. |
hello together I had the same problem, a kernel update also helped me. How to Install Linux Kernel 5.2.2 in Ubuntu: |
@Rainer, appreciated, thank you :)
…On 28 Sep 2019, 10:07 +0100, Chihyu11 ***@***.***>, wrote:
hello together
I had the same problem, a kernel update also helped me.
With the version Linux 5.2.2-050202-generic it works again.
How to Install Linux Kernel 5.2.2 in Ubuntu:
http://ubuntuhandbook.org/index.php/2019/07/install-linux-kernel-5-2-ubuntu-linux-mint/
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
No ETA as of yet, but:
|
The new Linux Kernel 5.0.0-31 on Ubuntu 18.04.3 LTS with HWE enabled fixes the bug for me. |
For anyone who has the same issue running Docker builds on Azure Hosted Linux agents, switching to Ubuntu 16.04 fixes the issue. |
See dotnet/core#3312 and dotnet/core#3309 .
There are various reports of
Process.GetCurrentProcess().MainModule.FileName
returning an incorrect value when running .NET Core inside a container on Ubuntu 19.04 using kernel 5.0.0-27-generic. Reverting back to kernel 5.0.0-25-generic fixes this issue.The same issue also reproduces on the Azure variant of Ubuntu, with kernel version 5.0.0-1018.
The simplest steps to repro that I know of are in dotnet/core#3309 .
The text was updated successfully, but these errors were encountered: