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/app: SIGABRT during (*asset).close #10949

Closed
rakyll opened this issue May 26, 2015 · 3 comments
Closed

x/mobile/app: SIGABRT during (*asset).close #10949

rakyll opened this issue May 26, 2015 · 3 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@rakyll
Copy link
Contributor

rakyll commented May 26, 2015

The following panic is reproducible from drummachine's stop handler.

cc/ @crawshaw @hyangah

go version
go version devel +0b36e12 Mon May 25 20:53:26 2015 +0000 darwin/amd64
E/Go      (21438): SIGABRT: abort
E/Go      (21438): PC=0xf6f8e71c
E/Go      (21438): signal arrived during cgo execution
E/Go      (21438): goroutine 7 [syscall, locked to thread]:
E/Go      (21438): runtime.cgocall_errno(0xf3f6d314, 0xc31a2d34, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/runtime/cgocall.go:125 +0x11c fp=0xc31a2d20 sp=0xc31a2d08
E/Go      (21438): golang.org/x/mobile/app._Cfunc_AAsset_close(0xab24d4f8)
E/Go      (21438):  ??:0 +0x38 fp=0xc31a2d30 sp=0xc31a2d20
E/Go      (21438): golang.org/x/mobile/app.(*asset).Close(0xc31c6150, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/android.go:255 +0x34 fp=0xc31a2d38 sp=0xc31a2d30
E/Go      (21438): main.stop()
E/Go      (21438):  /Users/jbd/src/github.com/rakyll/drummachine/main.go:143 +0xe8 fp=0xc31a2e28 sp=0xc31a2d38
E/Go      (21438): golang.org/x/mobile/app.stateStop(0xc31b8420, 0x1, 0x1)
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/state.go:76 +0xe4 fp=0xc31a2e70 sp=0xc31a2e28
E/Go      (21438): golang.org/x/mobile/app.windowDraw(0xc31b8420, 0x1, 0x1, 0xab1c84a8, 0xab1b94f0)
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/loop_android.go:123 +0x348 fp=0xc31a2f5c sp=0xc31a2e70
E/Go      (21438): golang.org/x/mobile/app.run(0xc31b8420, 0x1, 0x1)
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/android.go:278 +0x19c fp=0xc31a2f88 sp=0xc31a2f5c
E/Go      (21438): golang.org/x/mobile/app.Run(0xf40dfcf4, 0xf40dfcf8, 0xf40dfce8, 0xf40dfcfc, 0x0)
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/app.go:26 +0xf4 fp=0xc31a2fb4 sp=0xc31a2f88
E/Go      (21438): main.main()
E/Go      (21438):  /Users/jbd/src/github.com/rakyll/drummachine/main.go:78 +0x58 fp=0xc31a2fe0 sp=0xc31a2fb4
E/Go      (21438): golang.org/x/mobile/app/internal/callfn.CallFn(0xf3f7343c)
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/internal/callfn/callfn_arm.s:10 +0x20 fp=0xc31a2fe4 sp=0xc31a2fe0
E/Go      (21438): runtime.goexit()
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/runtime/asm_arm.s:982 +0x4 fp=0xc31a2fe4 sp=0xc31a2fe4
E/Go      (21438): created by golang.org/x/mobile/app.callMain
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/android.go:79 +0x16c
E/Go      (21438): goroutine 17 [runnable, locked to thread]:
E/Go      (21438): golang.org/x/mobile/app.onNativeWindowDestroyed(0xab1b7ce8, 0xab1c84a8)
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/android.go:161 +0x40
E/Go      (21438): goroutine 5 [syscall]:
E/Go      (21438): syscall.Syscall(0x3, 0x16, 0xc31d6c00, 0x400, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/syscall/asm_linux_arm.s:17 +0x8
E/Go      (21438): syscall.read(0x16, 0xc31d6c00, 0x400, 0x400, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/syscall/zsyscall_linux_arm.go:783 +0x80
E/Go      (21438): syscall.Read(0x16, 0xc31d6c00, 0x400, 0x400, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/syscall/syscall_unix.go:160 +0x54
E/Go      (21438): os.(*File).read(0xc31881d8, 0xc31d6c00, 0x400, 0x400, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/os/file_unix.go:211 +0x5c
E/Go      (21438): os.(*File).Read(0xc31881d8, 0xc31d6c00, 0x400, 0x400, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/os/file.go:95 +0x84
E/Go      (21438): bufio.(*Reader).fill(0xc3193f8c)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/bufio/bufio.go:97 +0x1cc
E/Go      (21438): bufio.(*Reader).ReadSlice(0xc3193f8c, 0x40a, 0x0, 0x0, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/bufio/bufio.go:328 +0x26c
E/Go      (21438): bufio.(*Reader).ReadLine(0xc3193f8c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/bufio/bufio.go:357 +0x68
E/Go      (21438): golang.org/x/mobile/app.lineLog(0xc31881d8, 0x6)
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/stdio_android.go:45 +0xe8
E/Go      (21438): created by golang.org/x/mobile/app.init.2
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/stdio_android.go:69 +0x10c
E/Go      (21438): goroutine 6 [syscall]:
E/Go      (21438): syscall.Syscall(0x3, 0x18, 0xc31d6800, 0x400, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/syscall/asm_linux_arm.s:17 +0x8
E/Go      (21438): syscall.read(0x18, 0xc31d6800, 0x400, 0x400, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/syscall/zsyscall_linux_arm.go:783 +0x80
E/Go      (21438): syscall.Read(0x18, 0xc31d6800, 0x400, 0x400, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/syscall/syscall_unix.go:160 +0x54
E/Go      (21438): os.(*File).read(0xc31881e8, 0xc31d6800, 0x400, 0x400, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/os/file_unix.go:211 +0x5c
E/Go      (21438): os.(*File).Read(0xc31881e8, 0xc31d6800, 0x400, 0x400, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/os/file.go:95 +0x84
E/Go      (21438): bufio.(*Reader).fill(0xc319478c)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/bufio/bufio.go:97 +0x1cc
E/Go      (21438): bufio.(*Reader).ReadSlice(0xc319478c, 0x40a, 0x0, 0x0, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/bufio/bufio.go:328 +0x26c
E/Go      (21438): bufio.(*Reader).ReadLine(0xc319478c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/bufio/bufio.go:357 +0x68
E/Go      (21438): golang.org/x/mobile/app.lineLog(0xc31881e8, 0x4)
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/stdio_android.go:45 +0xe8
E/Go      (21438): created by golang.org/x/mobile/app.init.2
E/Go      (21438):  /Users/jbd/src/golang.org/x/mobile/app/stdio_android.go:76 +0x19c
E/Go      (21438): goroutine 18 [syscall, locked to thread]:
E/Go      (21438): runtime.goexit()
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/runtime/asm_arm.s:982 +0x4
E/Go      (21438): goroutine 8 [sleep]:
E/Go      (21438): time.Sleep(0x198b7b24, 0x0)
E/Go      (21438):  /Users/jbd/pkg/gomobile/work-399968630/go/src/runtime/time.go:59 +0x10c
E/Go      (21438): main.start.func1()
E/Go      (21438):  /Users/jbd/src/github.com/rakyll/drummachine/main.go:119 +0xd4
E/Go      (21438): created by main.start
E/Go      (21438):  /Users/jbd/src/github.com/rakyll/drummachine/main.go:122 +0x3e0
E/Go      (21438): trap    0x0
@crawshaw
Copy link
Member

Are there any other logs? For example, a fatal log before it?

This may simply be the OS deciding the process has taken too long. In which case we could register a signal handler listening for SIGABRT following a stop and not bother printing a stack trace. Or it could be a LOG_FATAL somewhere due to some misused API. It is hard to tell from just this.

@rakyll
Copy link
Contributor Author

rakyll commented May 26, 2015

I see a fatal log from libc.

F/libc    (21438): Pure virtual function called. Are you calling virtual methods from a destructor?

Could it be why the asset pointer being a dangling pointer? If you can't reproduce, I will try to investigate it further when I have time.

@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Jun 3, 2015
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Jul 20, 2017
@eliasnaur
Copy link
Contributor

This is almost 3 years old and much has happened in gomobile since then. I'll close this until a reproducer surfaces.

@golang golang locked and limited conversation to collaborators Mar 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

5 participants