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

mmap(2) can return EAGAIN on Illumos #493

Closed
wants to merge 3 commits into from

Conversation

sean-
Copy link

@sean- sean- commented Apr 28, 2017

This PR builds on #492 to avoid conflicts but is an independent change.

This is a breaking change, but it is time to rip the bandaid off.
`syscall.Dup2()` will never be merged upstream[1].  Software depending on
`syscall.Dup2()` needs to move to use `unix.Dup2()`.

[1] https://docs.google.com/document/d/1QXzI9I1pOfZPujQzxhyRy6EeHYTQitKKjHfpq0zpxZs/edit
[2] https://godoc.org/golang.org/x/sys/unix#Dup2
On Illumos `mmap(2)` can return `EAGAIN` when a process is running
low on available RSS.  At best, not trapping `EAGAIN` leads to misleading
error messages.
@sean- sean- requested a review from jen20 April 28, 2017 23:08
@mamash
Copy link

mamash commented May 2, 2017

I committed this change to lang/go on trunk now.

jsonn referenced this pull request in jsonn/pkgsrc May 2, 2017
@mamash
Copy link

mamash commented May 3, 2017

The updated go-1.8.1nb2 package just landed in 2016Q4, though the mirrors might take an hour or so to synchronize.

@sean- sean- closed this May 3, 2017
@sean- sean- deleted the mmap-eagain branch May 3, 2017 16:45
jsonn referenced this pull request in jsonn/pkgsrc May 6, 2017
lang/go: bugfix

Revisions pulled up:
- lang/go/Makefile                                              1.51
- lang/go/distinfo                                              1.47
- lang/go/patches/patch-src_runtime_mem__bsd.go                 1.1
- lang/go/patches/patch-src_syscall_syscall__solaris.go         deleted

---
   Module Name:    pkgsrc
   Committed By:   fhajny
   Date:           Tue May  2 17:15:31 UTC 2017

   Modified Files:
           pkgsrc/lang/go: Makefile distinfo
   Added Files:
           pkgsrc/lang/go/patches: patch-src_runtime_mem__bsd.go
   Removed Files:
           pkgsrc/lang/go/patches: patch-src_syscall_syscall__solaris.go

   Log Message:
   * Remove patch adding syscall.Dup2() for SunOS, software should be using
   unix.Dup2() instead.
     https://github.com/joyent/pkgsrc/pull/492
   * Improve handling of low-memory situations on Illumos.
     https://github.com/joyent/pkgsrc/pull/493
netbsd-srcmastr referenced this pull request in NetBSD/pkgsrc Jun 9, 2017
lang/go: bugfix

Revisions pulled up:
- lang/go/Makefile                                              1.51
- lang/go/distinfo                                              1.47
- lang/go/patches/patch-src_runtime_mem__bsd.go                 1.1
- lang/go/patches/patch-src_syscall_syscall__solaris.go         deleted

---
   Module Name:    pkgsrc
   Committed By:   fhajny
   Date:           Tue May  2 17:15:31 UTC 2017

   Modified Files:
           pkgsrc/lang/go: Makefile distinfo
   Added Files:
           pkgsrc/lang/go/patches: patch-src_runtime_mem__bsd.go
   Removed Files:
           pkgsrc/lang/go/patches: patch-src_syscall_syscall__solaris.go

   Log Message:
   * Remove patch adding syscall.Dup2() for SunOS, software should be using
   unix.Dup2() instead.
     https://github.com/joyent/pkgsrc/pull/492
   * Improve handling of low-memory situations on Illumos.
     https://github.com/joyent/pkgsrc/pull/493
netbsd-srcmastr referenced this pull request in NetBSD/pkgsrc Jun 22, 2017
lang/go: bugfix

Revisions pulled up:
- lang/go/Makefile                                              1.51
- lang/go/distinfo                                              1.47
- lang/go/patches/patch-src_runtime_mem__bsd.go                 1.1
- lang/go/patches/patch-src_syscall_syscall__solaris.go         deleted

---
   Module Name:    pkgsrc
   Committed By:   fhajny
   Date:           Tue May  2 17:15:31 UTC 2017

   Modified Files:
           pkgsrc/lang/go: Makefile distinfo
   Added Files:
           pkgsrc/lang/go/patches: patch-src_runtime_mem__bsd.go
   Removed Files:
           pkgsrc/lang/go/patches: patch-src_syscall_syscall__solaris.go

   Log Message:
   * Remove patch adding syscall.Dup2() for SunOS, software should be using
   unix.Dup2() instead.
     https://github.com/joyent/pkgsrc/pull/492
   * Improve handling of low-memory situations on Illumos.
     https://github.com/joyent/pkgsrc/pull/493
jsonn referenced this pull request in jsonn/pkgsrc Jun 22, 2017
lang/go: bugfix

Revisions pulled up:
- lang/go/Makefile                                              1.51
- lang/go/distinfo                                              1.47
- lang/go/patches/patch-src_runtime_mem__bsd.go                 1.1
- lang/go/patches/patch-src_syscall_syscall__solaris.go         deleted

---
   Module Name:    pkgsrc
   Committed By:   fhajny
   Date:           Tue May  2 17:15:31 UTC 2017

   Modified Files:
           pkgsrc/lang/go: Makefile distinfo
   Added Files:
           pkgsrc/lang/go/patches: patch-src_runtime_mem__bsd.go
   Removed Files:
           pkgsrc/lang/go/patches: patch-src_syscall_syscall__solaris.go

   Log Message:
   * Remove patch adding syscall.Dup2() for SunOS, software should be using
   unix.Dup2() instead.
     https://github.com/joyent/pkgsrc/pull/492
   * Improve handling of low-memory situations on Illumos.
     https://github.com/joyent/pkgsrc/pull/493
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.

2 participants