Skip to content

Is library support darwin? #8

@le0pard

Description

@le0pard

Hello. Thanks for your great job and contrubution.

I did try to write own sqlite3vfs based on your library, but looks like in end it did not work on Apple.

First I did change Makefile by adding there -framework CoreFoundation -framework Security, because without this I had such error:

go build -tags SQLITE3VFS_LOADABLE_EXT -o donutloadable.a -buildmode=c-archive donut_loadable.go
rm donutloadable.h
gcc -g -fPIC -shared -o donutdb.so donutloadable.c donutloadable.a
Undefined symbols for architecture arm64:
  "_CFArrayAppendValue", referenced from:
      _crypto/x509/internal/macos.x509_CFArrayAppendValue_trampoline.abi0 in donutloadable.a(go.o)
  "_CFArrayCreateMutable", referenced from:
      _crypto/x509/internal/macos.x509_CFArrayCreateMutable_trampoline.abi0 in donutloadable.a(go.o)
  "_CFArrayGetCount", referenced from:
      _crypto/x509/internal/macos.x509_CFArrayGetCount_trampoline.abi0 in donutloadable.a(go.o)
  "_CFArrayGetValueAtIndex", referenced from:
      _crypto/x509/internal/macos.x509_CFArrayGetValueAtIndex_trampoline.abi0 in donutloadable.a(go.o)
  "_CFDataCreate", referenced from:
      _crypto/x509/internal/macos.x509_CFDataCreate_trampoline.abi0 in donutloadable.a(go.o)
  "_CFDataGetBytePtr", referenced from:
      _crypto/x509/internal/macos.x509_CFDataGetBytePtr_trampoline.abi0 in donutloadable.a(go.o)
  "_CFDataGetLength", referenced from:
      _crypto/x509/internal/macos.x509_CFDataGetLength_trampoline.abi0 in donutloadable.a(go.o)
  "_CFDateCreate", referenced from:
      _crypto/x509/internal/macos.x509_CFDateCreate_trampoline.abi0 in donutloadable.a(go.o)
  "_CFErrorCopyDescription", referenced from:
      _crypto/x509/internal/macos.x509_CFErrorCopyDescription_trampoline.abi0 in donutloadable.a(go.o)
  "_CFRelease", referenced from:
      _crypto/x509/internal/macos.x509_CFRelease_trampoline.abi0 in donutloadable.a(go.o)
  "_CFStringCreateExternalRepresentation", referenced from:
      _crypto/x509/internal/macos.x509_CFStringCreateExternalRepresentation_trampoline.abi0 in donutloadable.a(go.o)
  "_CFStringCreateWithBytes", referenced from:
      _crypto/x509/internal/macos.x509_CFStringCreateWithBytes_trampoline.abi0 in donutloadable.a(go.o)
  "_SecCertificateCopyData", referenced from:
      _crypto/x509/internal/macos.x509_SecCertificateCopyData_trampoline.abi0 in donutloadable.a(go.o)
  "_SecCertificateCreateWithData", referenced from:
      _crypto/x509/internal/macos.x509_SecCertificateCreateWithData_trampoline.abi0 in donutloadable.a(go.o)
  "_SecPolicyCreateSSL", referenced from:
      _crypto/x509/internal/macos.x509_SecPolicyCreateSSL_trampoline.abi0 in donutloadable.a(go.o)
  "_SecTrustCreateWithCertificates", referenced from:
      _crypto/x509/internal/macos.x509_SecTrustCreateWithCertificates_trampoline.abi0 in donutloadable.a(go.o)
  "_SecTrustEvaluateWithError", referenced from:
      _crypto/x509/internal/macos.x509_SecTrustEvaluateWithError_trampoline.abi0 in donutloadable.a(go.o)
  "_SecTrustGetCertificateAtIndex", referenced from:
      _crypto/x509/internal/macos.x509_SecTrustGetCertificateAtIndex_trampoline.abi0 in donutloadable.a(go.o)
  "_SecTrustGetCertificateCount", referenced from:
      _crypto/x509/internal/macos.x509_SecTrustGetCertificateCount_trampoline.abi0 in donutloadable.a(go.o)
  "_SecTrustSetVerifyDate", referenced from:
      _crypto/x509/internal/macos.x509_SecTrustSetVerifyDate_trampoline.abi0 in donutloadable.a(go.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

After success build I get error to load library:

/opt/homebrew/opt/sqlite/bin/sqlite3 Chinook_Sqlite.sqlite -bail \ 
  -cmd '.load donutdb.so'
sqlite3vfs register donutdb
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x2 addr=0x468 pc=0x105a392ec]

runtime stack:
runtime.throw({0x105a53213?, 0x14000305d40?})
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/panic.go:1047 +0x40 fp=0x16b58da90 sp=0x16b58da60 pc=0x1056e5690
runtime.sigpanic()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/signal_unix.go:819 +0x1e4 fp=0x16b58dac0 sp=0x16b58da90 pc=0x1056fb8e4

goroutine 17 [syscall, locked to thread]:
runtime.cgocall(0x105a3926c, 0x140000cfbb8)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/cgocall.go:158 +0x54 fp=0x140000cfb80 sp=0x140000cfb40 pc=0x1056b4a54
github.com/psanford/sqlite3vfs._Cfunc_s3vfsNew(0x600002de00e0, 0x400)
	_cgo_gotypes.go:209 +0x38 fp=0x140000cfbb0 sp=0x140000cfb80 pc=0x1059fb998
github.com/psanford/sqlite3vfs.newVFS({0x105a3b21a, 0x7}, {0x105c3ab40?, 0x14000099ad0}, 0x400)
	/Users/leo/go/pkg/mod/github.com/psanford/[email protected]/sqlite3vfscgo.go:28 +0xa8 fp=0x140000cfc10 sp=0x140000cfbb0 pc=0x1059fbb08
github.com/psanford/sqlite3vfs.RegisterVFS({0x105a3b21a, 0x7}, {0x105c39a78?, 0x14000305da0}, {0x0, 0x0, 0x0?})
	/Users/leo/go/pkg/mod/github.com/psanford/[email protected]/sqlite3vfs.go:28 +0xe0 fp=0x140000cfc70 sp=0x140000cfc10 pc=0x1059fb600
main.DonutDBRegister()
	/Users/leo/Downloads/badgervfs/donutdb/donutdb-loadable/donut_loadable.go:44 +0x17c fp=0x140000cfdf0 sp=0x140000cfc70 pc=0x105a383ac
_cgoexp_be60145b70ad_DonutDBRegister(0x105c33cd8?)
	_cgo_gotypes.go:39 +0x1c fp=0x140000cfe00 sp=0x140000cfdf0 pc=0x105a3848c
runtime.cgocallbackg1(0x105a38470, 0x0?, 0x0)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/cgocall.go:316 +0x244 fp=0x140000cfef0 sp=0x140000cfe00 pc=0x1056b4e74
runtime.cgocallbackg(0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/cgocall.go:235 +0xd8 fp=0x140000cff80 sp=0x140000cfef0 pc=0x1056b4ba8
runtime.cgocallbackg(0x105a38470, 0x16b58dc3f, 0x0)
	<autogenerated>:1 +0x1c fp=0x140000cffb0 sp=0x140000cff80 pc=0x1057162cc
runtime.cgocallback(0x0, 0x0, 0x0)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1087 +0xa0 fp=0x140000cffe0 sp=0x140000cffb0 pc=0x105714be0
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x140000cffe0 sp=0x140000cffe0 pc=0x105714cb4

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x14000054fa0 sp=0x14000054f80 pc=0x1056e7fd4
runtime.goparkunlock(...)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:369
runtime.forcegchelper()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:302 +0xac fp=0x14000054fd0 sp=0x14000054fa0 pc=0x1056e7e6c
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x14000054fd0 sp=0x14000054fd0 pc=0x105714cb4
created by runtime.init.6
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:290 +0x24

goroutine 3 [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x14000055770 sp=0x14000055750 pc=0x1056e7fd4
runtime.goparkunlock(...)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:369
runtime.bgsweep(0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/mgcsweep.go:278 +0xa4 fp=0x140000557b0 sp=0x14000055770 pc=0x1056d52c4
runtime.gcenable.func1()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/mgc.go:178 +0x28 fp=0x140000557d0 sp=0x140000557b0 pc=0x1056c9b08
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x140000557d0 sp=0x140000557d0 pc=0x105714cb4
created by runtime.gcenable
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/mgc.go:178 +0x74

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x1400007e000?, 0x105b8adf0?, 0x1?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x14000055f50 sp=0x14000055f30 pc=0x1056e7fd4
runtime.goparkunlock(...)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:369
runtime.(*scavengerState).park(0x105e76500)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/mgcscavenge.go:389 +0x5c fp=0x14000055f80 sp=0x14000055f50 pc=0x1056d327c
runtime.bgscavenge(0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/mgcscavenge.go:617 +0x44 fp=0x14000055fb0 sp=0x14000055f80 pc=0x1056d3824
runtime.gcenable.func2()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/mgc.go:179 +0x28 fp=0x14000055fd0 sp=0x14000055fb0 pc=0x1056c9aa8
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x14000055fd0 sp=0x14000055fd0 pc=0x105714cb4
created by runtime.gcenable
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/mgc.go:179 +0xb8

goroutine 19 [finalizer wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x14000050580 sp=0x14000050560 pc=0x1056e7fd4
runtime.goparkunlock(...)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:369
runtime.runfinq()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/mfinal.go:180 +0x120 fp=0x140000507d0 sp=0x14000050580 pc=0x1056c8d30
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x140000507d0 sp=0x140000507d0 pc=0x105714cb4
created by runtime.createfing
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/mfinal.go:157 +0x84

goroutine 20 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x14000050dc0 sp=0x14000050da0 pc=0x1056e7fd4
runtime.chanrecv(0x1400008e0c0, 0x14000050eb7, 0x1)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:583 +0x454 fp=0x14000050e50 sp=0x14000050dc0 pc=0x1056b77e4
runtime.chanrecv2(0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:447 +0x14 fp=0x14000050e80 sp=0x14000050e50 pc=0x1056b7374
github.com/klauspost/compress/zstd.(*blockDec).startDecoder(0x140003109c0)
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:212 +0x74 fp=0x14000050fb0 sp=0x14000050e80 pc=0x105a0ef24
github.com/klauspost/compress/zstd.newBlockDec.func1()
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x28 fp=0x14000050fd0 sp=0x14000050fb0 pc=0x105a0eae8
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x14000050fd0 sp=0x14000050fd0 pc=0x105714cb4
created by github.com/klauspost/compress/zstd.newBlockDec
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x134

goroutine 21 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x140000515c0 sp=0x140000515a0 pc=0x1056e7fd4
runtime.chanrecv(0x1400008e120, 0x140000516b7, 0x1)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:583 +0x454 fp=0x14000051650 sp=0x140000515c0 pc=0x1056b77e4
runtime.chanrecv2(0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:447 +0x14 fp=0x14000051680 sp=0x14000051650 pc=0x1056b7374
github.com/klauspost/compress/zstd.(*blockDec).startDecoder(0x14000310a90)
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:212 +0x74 fp=0x140000517b0 sp=0x14000051680 pc=0x105a0ef24
github.com/klauspost/compress/zstd.newBlockDec.func1()
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x28 fp=0x140000517d0 sp=0x140000517b0 pc=0x105a0eae8
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x140000517d0 sp=0x140000517d0 pc=0x105714cb4
created by github.com/klauspost/compress/zstd.newBlockDec
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x134

goroutine 22 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x14000284dc0 sp=0x14000284da0 pc=0x1056e7fd4
runtime.chanrecv(0x1400008e180, 0x14000284eb7, 0x1)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:583 +0x454 fp=0x14000284e50 sp=0x14000284dc0 pc=0x1056b77e4
runtime.chanrecv2(0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:447 +0x14 fp=0x14000284e80 sp=0x14000284e50 pc=0x1056b7374
github.com/klauspost/compress/zstd.(*blockDec).startDecoder(0x14000310b60)
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:212 +0x74 fp=0x14000284fb0 sp=0x14000284e80 pc=0x105a0ef24
github.com/klauspost/compress/zstd.newBlockDec.func1()
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x28 fp=0x14000284fd0 sp=0x14000284fb0 pc=0x105a0eae8
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x14000284fd0 sp=0x14000284fd0 pc=0x105714cb4
created by github.com/klauspost/compress/zstd.newBlockDec
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x134

goroutine 23 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x140000525c0 sp=0x140000525a0 pc=0x1056e7fd4
runtime.chanrecv(0x1400008e1e0, 0x140000526b7, 0x1)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:583 +0x454 fp=0x14000052650 sp=0x140000525c0 pc=0x1056b77e4
runtime.chanrecv2(0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:447 +0x14 fp=0x14000052680 sp=0x14000052650 pc=0x1056b7374
github.com/klauspost/compress/zstd.(*blockDec).startDecoder(0x14000310c30)
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:212 +0x74 fp=0x140000527b0 sp=0x14000052680 pc=0x105a0ef24
github.com/klauspost/compress/zstd.newBlockDec.func1()
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x28 fp=0x140000527d0 sp=0x140000527b0 pc=0x105a0eae8
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x140000527d0 sp=0x140000527d0 pc=0x105714cb4
created by github.com/klauspost/compress/zstd.newBlockDec
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x134

goroutine 24 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x14000052dc0 sp=0x14000052da0 pc=0x1056e7fd4
runtime.chanrecv(0x1400008e240, 0x14000052eb7, 0x1)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:583 +0x454 fp=0x14000052e50 sp=0x14000052dc0 pc=0x1056b77e4
runtime.chanrecv2(0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:447 +0x14 fp=0x14000052e80 sp=0x14000052e50 pc=0x1056b7374
github.com/klauspost/compress/zstd.(*blockDec).startDecoder(0x14000310d00)
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:212 +0x74 fp=0x14000052fb0 sp=0x14000052e80 pc=0x105a0ef24
github.com/klauspost/compress/zstd.newBlockDec.func1()
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x28 fp=0x14000052fd0 sp=0x14000052fb0 pc=0x105a0eae8
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x14000052fd0 sp=0x14000052fd0 pc=0x105714cb4
created by github.com/klauspost/compress/zstd.newBlockDec
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x134

goroutine 25 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x140000535c0 sp=0x140000535a0 pc=0x1056e7fd4
runtime.chanrecv(0x1400008e2a0, 0x140000536b7, 0x1)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:583 +0x454 fp=0x14000053650 sp=0x140000535c0 pc=0x1056b77e4
runtime.chanrecv2(0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:447 +0x14 fp=0x14000053680 sp=0x14000053650 pc=0x1056b7374
github.com/klauspost/compress/zstd.(*blockDec).startDecoder(0x14000310dd0)
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:212 +0x74 fp=0x140000537b0 sp=0x14000053680 pc=0x105a0ef24
github.com/klauspost/compress/zstd.newBlockDec.func1()
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x28 fp=0x140000537d0 sp=0x140000537b0 pc=0x105a0eae8
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x140000537d0 sp=0x140000537d0 pc=0x105714cb4
created by github.com/klauspost/compress/zstd.newBlockDec
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x134

goroutine 26 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x14000053dc0 sp=0x14000053da0 pc=0x1056e7fd4
runtime.chanrecv(0x1400008e300, 0x14000053eb7, 0x1)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:583 +0x454 fp=0x14000053e50 sp=0x14000053dc0 pc=0x1056b77e4
runtime.chanrecv2(0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:447 +0x14 fp=0x14000053e80 sp=0x14000053e50 pc=0x1056b7374
github.com/klauspost/compress/zstd.(*blockDec).startDecoder(0x14000310ea0)
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:212 +0x74 fp=0x14000053fb0 sp=0x14000053e80 pc=0x105a0ef24
github.com/klauspost/compress/zstd.newBlockDec.func1()
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x28 fp=0x14000053fd0 sp=0x14000053fb0 pc=0x105a0eae8
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x14000053fd0 sp=0x14000053fd0 pc=0x105714cb4
created by github.com/klauspost/compress/zstd.newBlockDec
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x134

goroutine 27 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/proc.go:363 +0xe4 fp=0x140003325c0 sp=0x140003325a0 pc=0x1056e7fd4
runtime.chanrecv(0x1400008e360, 0x140003326b7, 0x1)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:583 +0x454 fp=0x14000332650 sp=0x140003325c0 pc=0x1056b77e4
runtime.chanrecv2(0x0?, 0x0?)
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/chan.go:447 +0x14 fp=0x14000332680 sp=0x14000332650 pc=0x1056b7374
github.com/klauspost/compress/zstd.(*blockDec).startDecoder(0x14000310f70)
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:212 +0x74 fp=0x140003327b0 sp=0x14000332680 pc=0x105a0ef24
github.com/klauspost/compress/zstd.newBlockDec.func1()
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x28 fp=0x140003327d0 sp=0x140003327b0 pc=0x105a0eae8
runtime.goexit()
	/opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165 +0x4 fp=0x140003327d0 sp=0x140003327d0 pc=0x105714cb4
created by github.com/klauspost/compress/zstd.newBlockDec
	/Users/leo/go/pkg/mod/github.com/klauspost/[email protected]/zstd/blockdec.go:118 +0x134
[1]    83608 abort      /opt/homebrew/opt/sqlite/bin/sqlite3 Chinook_Sqlite.sqlite -bail -cmd

First I start thinking issue with my code, but I did try to use https://github.com/psanford/donutdb and get same issue. I don't know C, but ready to provide any info if needed.

✔  go version 
go version go1.19 darwin/arm64

✔  gcc --version 
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

✔  /opt/homebrew/opt/sqlite/bin/sqlite3 --version 
3.39.2 2022-07-21 15:24:47 698edb77537b67c41adc68f9b892db56bcf9a55e00371a61420f3ddd668e6603

Again, thanks for your work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions