Skip to content
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

thread ID reported incorrectly in procfs #967

Closed
ericeil opened this issue Aug 22, 2016 · 5 comments
Closed

thread ID reported incorrectly in procfs #967

ericeil opened this issue Aug 22, 2016 · 5 comments

Comments

@ericeil
Copy link

ericeil commented Aug 22, 2016

On rs_preview build 14905:

The per-thread "stat" files under /proc seem to report the "pid" differently from Linux. For example, if I have a process with pid 57003, containing thread 57004, on Linux I see this:

cat /proc/57003/task/57004/stat
57004 (dotnet-run) S 56995 56995 56807 34827 56995 1077960768 3 41412 0 23 0 0 84 8 20 0 15 0 328515728 1439928320 7893 18446744073709551615 4194304 4243012 140724370211440 139743204122640 139743239783341 0 2147221247 4096 1246 18446744071586489339 0 0 -1 1 0 0 0 0 0 6344088 6345208 27213824 140724370212824 140724370212857 140724370212857 140724370214871 0

Note that the first field in the "stat" file is "57004", which is the thread ID, not the process ID.

On Windows, the per-thread "stat" file seems to report the process ID in this field, when it should be the thread ID.

FWIW, this is causing some .NET Core tests to fail, due to System.Diagnostics.Process making use of the contents of these files.

@sunilmut
Copy link
Member

Thanks, @ericeil for reporting this. I have opened a bug at our end to track this, which should get auto-triaged.

@misenesi
Copy link

misenesi commented Nov 1, 2016

I have checked in a fix for this.

@CIPop
Copy link
Member

CIPop commented Nov 9, 2016

@misenesi How/when should we expect to see the effects of your fix?

@benhillis
Copy link
Member

@CIPop - I would say ~2 weeks if I had to guess. Since you're also a Microsoft employee I'm sure you can relate to how hard it can be to track when things reach Insider builds. Shoot me a mail and I can tell you which internal branch the fix is in.

@russalex russalex added fixed and removed fixinbound labels Dec 8, 2016
@russalex
Copy link
Contributor

russalex commented Dec 8, 2016

This should be fixed on build 14986 out today.

14986 Release Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants