Skip to content

SIGSEGV in runtime.memmove via x.DNSSummary.String #264

Backlog

Description

@ignoramous

v058 e211 Nissa Android 13:

Crashed: Thread: SIGSEGV  0x0000000000000000
#00 pc 0x9f372d libgojni.so (runtime.memmove [memmove_amd64.s:189]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#01 pc 0xa9c619 libgojni.so (fmt.(*fmt).fmtS [format.go:360]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#02 pc 0xa9f6af libgojni.so (fmt.(*pp).fmtString [print.go:500]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#03 pc 0xaa109f libgojni.so (fmt.(*pp).printArg [print.go:731]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#04 pc 0xaa3ecc libgojni.so (fmt.(*pp).doPrintf [print.go:1063]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#05 pc 0xa9dd13 libgojni.so (fmt.Sprintf [print.go:232]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#06 pc 0xdf9ff9 libgojni.so (github.com/celzero/firestack/intra/backend.(*DNSSummary).String [dnsx_listener.go:157]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#07 pc 0xaa0b3b libgojni.so (fmt.(*pp).handleMethods [print.go:666]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#08 pc 0xaa13c9 libgojni.so (fmt.(*pp).printArg [print.go:746]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#09 pc 0xaa3ecc libgojni.so (fmt.(*pp).doPrintf [print.go:1063]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#10 pc 0xa9dd13 libgojni.so (fmt.Sprintf [print.go:232]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#11 pc 0xfb8bf0 libgojni.so (github.com/celzero/firestack/intra/dnsx.(*cres).String [cacher.go:201]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#12 pc 0xaa0b3b libgojni.so (fmt.(*pp).handleMethods [print.go:666]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#13 pc 0xaa13c9 libgojni.so (fmt.(*pp).printArg [print.go:746]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#14 pc 0xaa3ecc libgojni.so (fmt.(*pp).doPrintf [print.go:1063]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#15 pc 0xa9dd13 libgojni.so (fmt.Sprintf [print.go:232]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#16 pc 0xcba8bc libgojni.so (github.com/celzero/firestack/intra/log.(*simpleLogger).fmtmsg2 [logger.go:653]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#17 pc 0xcbd9e9 libgojni.so (github.com/celzero/firestack/intra/log.(*simpleLogger).emitlog [logger.go:1007]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#18 pc 0xcb9cbe libgojni.so (github.com/celzero/firestack/intra/log.(*simpleLogger).Debugf [logger.go:455]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#19 pc 0xcc3072 libgojni.so (github.com/celzero/firestack/intra/log.D4 [trace.go:423]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#20 pc 0xfe231a libgojni.so (github.com/celzero/firestack/intra/dnsx.logwif4.2 [alg.go:2808]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#21 pc 0xfe1f70 libgojni.so (github.com/celzero/firestack/intra/dnsx.(*ctransport).fetch.func1 [cacher.go:445]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#22 pc 0xfe1806 libgojni.so (github.com/celzero/firestack/intra/dnsx.(*ctransport).fetch.func2 [cacher.go:526]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#23 pc 0xd55c4f libgojni.so (github.com/celzero/firestack/intra/core.Gx.func1 [async.go:88]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#24 pc 0x24146f libgojni.so (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#25 pc 0xd55ca0 libgojni.so (github.com/celzero/firestack/intra/core.Gx.func1.deferwrap1 [async.go:83]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#26 pc 0x12d0b20 libgojni.so (_cgo_1ebd2d8f1b1c_Cfunc___android_log_write [cgo-gcc-prolog:63]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)
#27 pc 0x9f2e41 libgojni.so (runtime.goexit [asm_amd64.s:1265]) (BuildId: b8350bb8099fd5f4001083c34ebf832f63676164)

Gemini 4:

  • Exception: SIGSEGV (Segmentation Fault) at address 0x0000000000000000 (Null Pointer Dereference).
  • Blame Frame/Symbol: runtime.memmove in memmove_amd64.s.
  • Context: This crash occurs in the Go runtime memory copy function (runtime.memmove) compiled for amd64 (x86_64) architecture, typically used in Android Emulators or specific x86_64 Android devices (often manufactured by Google for development/testing).
  • Prevalence: SIGSEGV crashes during memory operations like memmove are common when managed code (like Go via Go Mobile) interacts with native Go code, and a null pointer or an invalid memory address is passed to a memory copy operation.

Potential Causes

  1. Null Pointer Dereference (Go/Native Boundary): The address 0x0000000000000000 indicates that a Go slice, string, or pointer pointer was nil when passed to a function that triggered a memory copy (memmove).
  2. Go Mobile / JNI Garbage Collection Mismatch: A Java/Kotlin object reference passed to Go might have been garbage collected, or a Go pointer reference became invalid/nil before memmove was executed.
  3. Android 13 Linker / Memory Allocation Changes: Android 13 introduced stricter memory tagging and security checks (such as GWP-ASan and advanced heap monitoring) that aggressively catch invalid memory accesses and null dereferences which might have silently failed or behaved differently in older OS versions.
  4. Target Architecture Mismatch (AMD64): Since the crash occurs in memmove_amd64.s, this is running on an x86_64 environment (such as a Google Android Emulator or a Google Pixel tablet/foldable emulator). Virtualized environments can sometimes expose concurrency or race conditions in memory management more frequently than physical ARM devices.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions