levakin opened a new issue, #1306:
URL: https://github.com/apache/arrow-adbc/issues/1306

   DuckDB claims to fully implement ADBC interface 
https://github.com/duckdb/duckdb/issues/7141.
   I've tried using drivermmgr to query DuckDB with it, but the code panics 
with Segfault.
   ```
   SIGSEGV: segmentation violation
   PC=0x0 m=10 sigcode=1
   signal arrived during cgo execution
   
   goroutine 19 [syscall]:
   runtime.cgocall(0x100428b90, 0xc000167c50)
        /usr/local/opt/go/libexec/src/runtime/cgocall.go:157 +0x4b 
fp=0xc000167c28 sp=0xc000167bf0 pc=0x10000b70b
   
github.com/apache/arrow-adbc/go/adbc/drivermgr._Cfunc_AdbcStatementRelease(0xc00011e390,
 0xc000390db0)
        _cgo_gotypes.go:386 +0x48 fp=0xc000167c50 sp=0xc000167c28 pc=0x100424468
   
github.com/apache/arrow-adbc/go/adbc/drivermgr.(*stmt).Close.func1(0xc000167cc8?,
 0x10041da25?)
        
/Users/anton/go/pkg/mod/github.com/apache/arrow-adbc/go/adbc@v0.8.0/drivermgr/wrapper.go:270
 +0x65 fp=0xc000167c90 sp=0xc000167c50 pc=0x100426765
   github.com/apache/arrow-adbc/go/adbc/drivermgr.(*stmt).Close(0x1008e9ef0?)
        
/Users/anton/go/pkg/mod/github.com/apache/arrow-adbc/go/adbc@v0.8.0/drivermgr/wrapper.go:270
 +0x31 fp=0xc000167cc0 sp=0xc000167c90 pc=0x1004266b1
   github.com/levakin/adbc-duckdb-example.selectAll.func1()
        /Users/anton/Git/github.com/levakin/adbc-duckdb-example/main.go:57 
+0x25 fp=0xc000167cd8 sp=0xc000167cc0 pc=0x100428125
   github.com/levakin/adbc-duckdb-example.selectAll({0x10059c120, 0x100928240}, 
{0x10059f0e0?, 0xc000120058?})
        /Users/anton/Git/github.com/levakin/adbc-duckdb-example/main.go:74 
+0x249 fp=0xc000167d78 sp=0xc000167cd8 pc=0x100428029
   github.com/levakin/adbc-duckdb-example.Run({0x10059c120, 0x100928240})
        /Users/anton/Git/github.com/levakin/adbc-duckdb-example/main.go:41 
+0x212 fp=0xc000167f30 sp=0xc000167d78 pc=0x100427c72
   github.com/levakin/adbc-duckdb-example.TestRun(0xc000102ea0)
        /Users/anton/Git/github.com/levakin/adbc-duckdb-example/main_test.go:9 
+0x26 fp=0xc000167f70 sp=0xc000167f30 pc=0x100428526
   testing.tRunner(0xc000102ea0, 0x100512760)
        /usr/local/opt/go/libexec/src/testing/testing.go:1595 +0xff 
fp=0xc000167fc0 sp=0xc000167f70 pc=0x100115bbf
   testing.(*T).Run.func1()
        /usr/local/opt/go/libexec/src/testing/testing.go:1648 +0x25 
fp=0xc000167fe0 sp=0xc000167fc0 pc=0x100116b45
   runtime.goexit()
        /usr/local/opt/go/libexec/src/runtime/asm_amd64.s:1650 +0x1 
fp=0xc000167fe8 sp=0xc000167fe0 pc=0x100074561
   created by testing.(*T).Run in goroutine 1
        /usr/local/opt/go/libexec/src/testing/testing.go:1648 +0x3ad
   ```
        
   [Repo with the code to reproduce the 
bug](https://github.com/levakin/adbc-duckdb-example).
   
   I've tried running the same operation with python adbc driver manager and it 
works correctly.
   Dataset contains 51007989 rows. If I limit amount of selected rows to 1 
million then there's no SIGSEGV
   
   Bug is found on darwin amd64.
   DuckDB 0.9.2
   arrow-adbc 0.8.0
   go 1.21
   
   cc @zeroshade 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to