-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/link: cannot fallocate file in tmpfs on EulerOS when cpuprofile is on #69137
Comments
Retrying on |
Hmmm, I see though, you are saying that the system call never succeeds. It always gets interrupted. That seems like it might be a kernel bug. I'm not familiar with EulerOS. Does this happen on other Linux distributions? |
As I can see - some users faced this problem (see link ). The kernel has the patch for this situation, but it is quite recent. I'll try to communicate with Euler developers and ask what they think. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Go version
go version devel go1.24-6edc1c23ed Thu Aug 22 01:18:23 2024 +0000 linux/amd64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
The program can not make Fallocate and goes into infinite loop.
What did you expect to see?
The program makes changes the file size.
Explanation
This situation happens when few factors are met in the same time:
The real-world situation happened, when I tried to measure sweet benchmark in the pgo mode on my performance server. The problematic callstack is the following:
The problematic code is in the
cmd/link/internal/ld.(*OutBuf).Mmap
:The
fallocate
always returnsEINTR
and the code do not leave the loop. I found, that other people faced the similar problems, but their solution was the loop above.My solution of this problem was to replace the
fallocate
withftruncate
syscall in the following way:That workaround worked, and I'd like to ask the advice what is the best way to solve the problem?
The text was updated successfully, but these errors were encountered: