Skip to content

SEGFAULT on MySQL 8.0 #756

@milanaleksic

Description

@milanaleksic

What happened

We have a system with ~100 tables and mostly tbls works as expected, except that sometimes - it crashes for unknown issues.

Please let me know how I can help debug this. It doesn't happen each time, mind you

SIGSEGV: segmentation violation
PC=0x41c49d m=0 sigcode=1 addr=0x14

goroutine 0 gp=0x60aab80 m=0 mp=0x60aca20 [idle]:
runtime.getGCMask(...)
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/type.go:84
runtime.(*mspan).typePointersOfUnchecked(0xc0004b5100?, 0xc0018a0c80?)
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/mbitmap.go:202 +0x3d fp=0x7ffc06ac7570 sp=0x7ffc06ac7540 pc=0x41c49d
runtime.scanobject(0xc000095250?, 0xc000095250)
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/mgcmark.go:1429 +0xb5 fp=0x7ffc06ac7600 sp=0x7ffc06ac7570 pc=0x428eb5
runtime.gcDrain(0xc000095250, 0x7)
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/mgcmark.go:1228 +0x1f4 fp=0x7ffc06ac7668 sp=0x7ffc06ac7600 pc=0x428814
runtime.gcDrainMarkWorkerIdle(...)
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/mgcmark.go:1100
runtime.gcBgMarkWorker.func2()
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/mgc.go:1520 +0x67 fp=0x7ffc06ac76b8 sp=0x7ffc06ac7668 pc=0x424cc7
runtime.systemstack(0x48123f)
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/asm_amd64.s:514 +0x4a fp=0x7ffc06ac76c8 sp=0x7ffc06ac76b8 pc=0x47c8aa

goroutine 23 gp=0xc000438000 m=0 mp=0x60aca20 [GC worker (active)]:
runtime.systemstack_switch()
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/asm_amd64.s:479 +0x8 fp=0xc0000a3f38 sp=0xc0000a3f28 pc=0x47c848
runtime.gcBgMarkWorker(0xc00007e1c0)
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/mgc.go:1483 +0x1e7 fp=0xc0000a3fc8 sp=0xc0000a3f38 pc=0x4249a7
runtime.gcBgMarkStartWorkers.gowrap1()
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/mgc.go:1339 +0x25 fp=0xc0000a3fe0 sp=0xc0000a3fc8 pc=0x424785
runtime.goexit({})
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000a3fe8 sp=0xc0000a3fe0 pc=0x47e861
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/mgc.go:1339 +0x105

goroutine 1 gp=0xc000002380 m=nil [runnable]:
runtime.sigpanic()
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/signal_unix.go:906 +0x3cf fp=0xc000b672f8 sp=0xc000b672f0 pc=0x4789af
runtime.memmove()
	/opt/hostedtoolcache/go/1.24.7/x64/src/runtime/memmove_amd64.s:122 +0xd5 fp=0xc000b67300 sp=0xc000b672f8 pc=0x47f715
scripts/manual/regen-domain-model.sh: line 19:  2292 Segmentation fault      (core dumped) tbls doc -f --rm-dist

Environment

  • tbls version - tbls_v1.89.0_linux_amd64
  • Database version - MySQL 8.0 (on github actions ubuntu-24.04)
  • OS - github actions, ubuntu-24.04
  • Shell - bash
  • Stacktrace or error message from tbls ( If you can, set DEBUG=1)
  • Config - don't have one, we just do this:
    - name: Install tbls
      uses: k1low/setup-tbls@v1
    - name: Setup MySQL
      run: |
        sudo systemctl start mysql.service
        mysql -u root -ppass -h localhost -e 'create database test; ALTER DATABASE test CHARACTER SET utf8mb4 COLLATE utf8mb4_bin'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions