Skip to content

internal/poll: can get EINTR reading from CIFS #38836

Closed
@dsoprea

Description

@dsoprea

What version of Go are you using (go version)?

1.14.2

Does this issue reproduce with the latest release?

(This is the latest release)

What operating system and processor architecture are you using (go env)?

linux, amd64

What did you do?

I'm running a Go tool of mine over a bunch of images. I'm getting periodic "interrupted system call" errors:

*os.PathError read /general_images/dense_album_staging/2015/google_photos/takeout-20150928-0047/dump/2012-12-05-/IMAG0507-edited.jpg: interrupted system call
/home/dustin/development/go/src/github.com/dsoprea/go-exif-knife/exif.go:69 (0x7c8a4c)
	GetExif: log.PanicIf(err)

I've restarted several times. On earlier runs, I've gotten large clumps of these in the output (seems racy).

They always happen in the same place:

    65		} else {
    66			var err error
    67	
    68			data, err = ioutil.ReadFile(imageFilepath)
    69			log.PanicIf(err)
    70		}

Is it possible that ioutil.ReadFile() is not correctly managing signals?

(https://golang.org/pkg/os/signal/#hdr-Go_programs_that_use_cgo_or_SWIG)

If the non-Go code installs any signal handlers, it must use the SA_ONSTACK flag with sigaction. Failing to do so is likely to cause the program to crash if the signal is received. Go programs routinely run with a limited stack, and therefore set up an alternate signal stack. Also, the Go standard library expects that any signal handlers will use the SA_RESTART flag. Failing to do so may cause some library calls to return "interrupted system call" errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions