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

x/mobile/cmd/gomobile: iOS app built with gomobile-build consumes memory and never frees #25149

Open
hajimehoshi opened this issue Apr 28, 2018 · 3 comments
Labels
mobile Android, iOS, and x/mobile
Milestone

Comments

@hajimehoshi
Copy link
Member

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

go version go1.10 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hajimehoshi/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/hajimehoshi/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7t/qw3np69559591s1v0mk5_p1m0000gn/T/go-build916245002=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  1. Run gomobile build -target=ios -bundleid=com.hajimehoshi.gomobiletest -work golang.org/x/mobile/example/basic
  2. Open the generated main.xcodeproj
  3. Install it on a device (iPhone 6 in my case)
  4. Run the app via Instruments memory profiler (Zombie)

What did you expect to see?

The app runs without memory increase.

What did you see instead?

The memory usage is increased monotonically:

Screenshot from Gyazo

It looks like _IOAccelResourceAlloc allocates memory and it is never disposed? I'm not sure this is an actual leak.

@gopherbot gopherbot added this to the Unreleased milestone Apr 28, 2018
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Apr 28, 2018
@hajimehoshi hajimehoshi changed the title x/mobile/cmd/gomobile: iOS app built with gomobile-build consumes memory monotonically x/mobile/cmd/gomobile: iOS app built with gomobile-build consumes memory and never frees Apr 28, 2018
@zhNirvanaRebirth
Copy link

@hajimehoshi did you solve the problem?

@hajimehoshi
Copy link
Member Author

No. I have not worked on this (gomobile build for iOS) recently.

@zhNirvanaRebirth
Copy link

ok, thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

3 participants