Skip to content

Conversation

wzshiming
Copy link
Contributor

Fixes #2736

Signed-off-by: Shiming Zhang <[email protected]>
_, err := fd.Write([]byte(data))
if errors.Is(err, unix.EINTR) {
if errors.Is(err, unix.EINTR) || errors.Is(err, unix.EBUSY) {
logrus.Infof("interrupted while writing %s to %s", data, fd.Name())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log message is obviously not right for EBUSY case.

@kolyshkin
Copy link
Contributor

@wzshiming thank you for your PR.

As discussed in #2736, we don't think retrying on EBUSY is the adequate solution. This is a configuration error (memory limit is too tight), and the best we can do in such a case is provide a better error message (looking into that).

Are you able to reproduce the issue with adequate memory limit set?

@wzshiming wzshiming closed this Feb 19, 2021
@wzshiming wzshiming deleted the fix/write-file-busy branch February 19, 2021 03:36
@cyphar
Copy link
Member

cyphar commented Feb 19, 2021

In addition, -EBUSY is not always a transient error (unlike -EINTR) -- it's entirely possible that this will loop infinitely for some files.

@kolyshkin
Copy link
Contributor

I am working on a more specific fix (to clarify the error message and provide more diagnostics in case of error -- WIP is in #2812)

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

Successfully merging this pull request may close these issues.

Creating a pod has a probability of failure
3 participants