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

dotnet run produces error: tpp.c:82: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed. #74962

Open
acenji opened this issue Aug 20, 2022 · 24 comments
Assignees
Labels
area-PAL-coreclr os-linux Linux OS (any supported distro)
Milestone

Comments

@acenji
Copy link

acenji commented Aug 20, 2022

Description

When i create dotnet new console,
I get
"The template "Console App" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on /home/ivanassenov/dev/dotnet-projects/dotnet-projects.csproj...
Determining projects to restore...
Restored /home/ivanassenov/dev/dotnet-projects/dotnet-projects.csproj (in 63 ms).
Restore succeeded.
"
then I run "dotnet restore"
"dotnet restore
Determining projects to restore...
All projects are up-to-date for restore.
"
Then I run "dotnet run"
I get this error
"tpp.c:82: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed."

restarted a few times, and tried few things.

when I run with verbose I got
".....
Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:00.72
tpp.c:82: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed.
"
Any idea why hello world program wouldn't work??

Configuration

Regression?

No, first time installed

Other information

@wfurt
Copy link
Member

wfurt commented Aug 22, 2022

what is your OS and .NET version? (dotnet --info)
Also you may try dotnet build before trying to run it.

@acenji
Copy link
Author

acenji commented Aug 22, 2022

.NET SDK (reflecting any global.json):
Version: 6.0.400
Commit: 7771abd614

Runtime Environment:
OS Name: pop
OS Version: 21.04
OS Platform: Linux
RID: linux-x64
Base Path: /snap/dotnet-sdk/177/sdk/6.0.400/

global.json file:
Not found

Host:
Version: 6.0.8
Architecture: x64
Commit: 55fb7ef

.NET SDKs installed:
6.0.400 [/snap/dotnet-sdk/177/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.8 [/snap/dotnet-sdk/177/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.8 [/snap/dotnet-sdk/177/shared/Microsoft.NETCore.App]

@acenji
Copy link
Author

acenji commented Aug 22, 2022

When i run "dotnet build" i get
MSBuild version 17.3.0+92e077650 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
HelloWorld -> /home/ivanassenov/dev/dotnet-projects/HelloWorld/bin/Debug/net6.0/HelloWorld.dll

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:01.47
then I run "dotnet run" and I get
tpp.c:82: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed.

@wfurt
Copy link
Member

wfurt commented Aug 22, 2022

Can you build and run the app under debugger and get full trace?
e.g. dotnet publish -r linux-x64,
lldb /home/ivanassenov/dev/dotnet-projects/HelloWorld/bin/Debug/net6.0/linux-x64/publish/HelloWorld and
run + bt when it dies.

https://stackoverflow.com/questions/21825291/threading-issues suggest libc problem but I'm not sure.
cc: @janvorli as this smells like PAL.

@acenji
Copy link
Author

acenji commented Aug 22, 2022

Process 123116 launched: '/home/ivanassenov/dev/dotnet-projects/HelloWorld/bin/Debug/net6.0/linux-x64/publish/HelloWorld' (x86_64)
tpp.c:82: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed.
Process 123116 stopped

  • thread Changed Roslyn link from CodePlex to GitHub core#1, name = 'HelloWorld', stop reason = signal SIGABRT
    frame #0: 0x00007ffff7a0efbb libc.so.6raise + 203 libc.so.6raise:
    -> 0x7ffff7a0efbb <+203>: movq 0x108(%rsp), %rax
    0x7ffff7a0efc3 <+211>: subq %fs:0x28, %rax
    0x7ffff7a0efcc <+220>: jne 0x7ffff7a0eff4 ; <+260>
    0x7ffff7a0efce <+222>: movl %r8d, %eax

@wfurt
Copy link
Member

wfurt commented Aug 22, 2022

backtrace?

@acenji
Copy link
Author

acenji commented Aug 22, 2022

hm, not sure i followed you. i tried this
"dotnet-stack
*** stack smashing detected ***: terminated
Aborted (core dumped)
"

@wfurt
Copy link
Member

wfurt commented Aug 22, 2022

can you run bt command in debugger after the SIGABRT?

@acenji
Copy link
Author

acenji commented Aug 22, 2022

  * thread dotnet/core#1, name = 'HelloWorld', stop reason = signal SIGABRT
  * frame #0: 0x00007ffff7a0efbb libc.so.6`raise + 203
    frame dotnet/core#1: 0x00007ffff79f4864 libc.so.6`abort + 278
    frame dotnet/core#2: 0x00007ffff79f4749 libc.so.6`___lldb_unnamed_symbol8$$libc.so.6 + 15
    frame dotnet/core#3: 0x00007ffff7a063d6 libc.so.6`__assert_fail + 70
    frame dotnet/core#4: 0x00007ffff7fcfe89 libpthread.so.0`__pthread_tpp_change_priority + 985
    frame dotnet/core#5: 0x00007ffff7fc60b5 libpthread.so.0`__pthread_mutex_lock_full + 533
    frame dotnet/core#6: 0x00007ffff7fc2fd8 libpthread.so.0`__pthread_initialize_minimal + 632
    frame dotnet/core#7: 0x00007ffff7fc200d libpthread.so.0`_init + 13
    frame dotnet/core#8: 0x00007ffff7de3a2d ld-2.27.so`___lldb_unnamed_symbol50$$ld-2.27.so + 605
    frame dotnet/core#9: 0x00007ffff7dd40ca ld-2.27.so`___lldb_unnamed_symbol4$$ld-2.27.so + 105

@github-actions
Copy link
Contributor

This issue is stale because there has been no response to a request for more information for 7 days.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2022

This issue was closed because there was no response to a request for more information for 10 days.

@github-actions github-actions bot closed this as completed Sep 1, 2022
@acenji
Copy link
Author

acenji commented Sep 1, 2022

yea, issue still exist, not sure what else to do

@rzikm rzikm reopened this Sep 1, 2022
@rzikm
Copy link
Member

rzikm commented Sep 1, 2022

transfering to .NET Runtime repo for further investigation

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Sep 1, 2022
@rzikm rzikm transferred this issue from dotnet/core Sep 1, 2022
@rzikm rzikm added os-linux Linux OS (any supported distro) area-System.Runtime labels Sep 1, 2022
@ghost
Copy link

ghost commented Sep 1, 2022

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

When i create dotnet new console,
I get
"The template "Console App" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on /home/ivanassenov/dev/dotnet-projects/dotnet-projects.csproj...
Determining projects to restore...
Restored /home/ivanassenov/dev/dotnet-projects/dotnet-projects.csproj (in 63 ms).
Restore succeeded.
"
then I run "dotnet restore"
"dotnet restore
Determining projects to restore...
All projects are up-to-date for restore.
"
Then I run "dotnet run"
I get this error
"tpp.c:82: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed."

restarted a few times, and tried few things.

when I run with verbose I got
".....
Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:00.72
tpp.c:82: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed.
"
Any idea why hello world program wouldn't work??

Configuration

Regression?

No, first time installed

Other information

Author: acenji
Assignees: -
Labels:

area-System.Runtime, os-linux, untriaged

Milestone: -

@rzikm
Copy link
Member

rzikm commented Sep 1, 2022

I hope I chose an appropriate area for this issue, if this is not the right one please suggest a better option.

@janvorli
Copy link
Member

janvorli commented Sep 1, 2022

It seems the problem is caused by the fact that it is running with FIFO scheduler. Can you please try to run it with the following command? That should run it with the default scheduler.

chrt -o -p 0 dotnet run

@acenji
Copy link
Author

acenji commented Sep 1, 2022

hm, I copy this command and run it as is but got this :
"chrt: invalid PID argument: 'run'"
sorry, not familiar with this command.

@janvorli
Copy link
Member

janvorli commented Sep 1, 2022

I am sorry, my mistake, it should be

chrt -o 0 dotnet run

@acenji
Copy link
Author

acenji commented Sep 1, 2022

after i run it i got this:
"tpp.c:82: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed."

@janvorli
Copy link
Member

janvorli commented Sep 1, 2022

Hmm, I have assumed the fifo scheduler is being used based on the fifo_min_prio / fifo_max_prio in the assert. Maybe these names don't have to do anything with the FIFO scheduler then.

@tannergooding
Copy link
Member

This seems like more PAL or VM related since it appears to be a potential pthread issue.

@acenji
Copy link
Author

acenji commented Sep 2, 2022

Tanner, to clarify, I am using pure Linux System 67 system, with POP OS

@janvorli
Copy link
Member

janvorli commented Sep 6, 2022

I am investigating it now, trying to install Pop OS locally.

@janvorli janvorli self-assigned this Sep 6, 2022
@mangod9 mangod9 removed the untriaged New issue has not been triaged by the area owner label Sep 6, 2022
@mangod9 mangod9 added this to the 8.0.0 milestone Sep 6, 2022
@janvorli janvorli modified the milestones: 8.0.0, 9.0.0 Aug 4, 2023
@mangod9 mangod9 modified the milestones: 9.0.0, Future Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-PAL-coreclr os-linux Linux OS (any supported distro)
Projects
None yet
Development

No branches or pull requests

6 participants