[cx-oracle-users] How to debug "into" oci?
Brought to you by:
atuining
From: Tamás G. <gt...@gt...> - 2013-05-30 11:38:02
|
Hi, I've been able to port a small part of your library to Go, but now I face with a SIGSEGV using cursor variable. Of course the signal is thrown in OCIStmtExecute, but I think the error is with the binds before. ~/p/g/s/g/t/goracle ❯❯❯ ./oracle.test -test.run=TestCursorOut -dsn=tgulacsi/tgulacsi@xe 2013/05/25 19:32:38 set position 0(0) in dataBytes to cbdae9f801040000 2013/05/25 19:32:38 CTRACE OCIStmtPrepare2([ 0x7f454407d498 0xc2000852a0 0x7f454407d578 DECLARE\n v_cur SYS_REFCURSOR;\nBEGIN\n OPEN v_cur FOR\n SELECT * FROM all_objects;\n :1 := v_cur;\nEND; 104 [7 162 123 111 183 232 2 162] 8 NTV_SYNTAX DEFAULT]) 2013/05/25 19:32:38 CTRACE OCIAttrGet([0x7f4544096dd0 HTYPE_STMT 0xc2000001f0 0xc2000001f8 ATTR_STMT_TYPE 0x7f454407d578]) 2013/05/25 19:32:38 CTRACE OCIBindByPos([0x7f4544096dd0 0xc200076120 0x7f454407d578 pos=1 dataArr: 0xc2000001a8 bufsize: 8 typ: 116 [0] <nil> <nil> 0 <nil> DEFAULT]) 2013/05/25 19:32:38 CTRACE OCIStmtExecute([0x7f454407d498 0x7f4544096dd0 0x7f454407d578 1 0 <nil> <nil> 0]) SIGSEGV: segmentation violation PC=0x7f455d25724d signal arrived during cgo execution github.com/tgulacsi/goracle/oracle._Cfunc_OCIStmtExecute(0x7f454407d498, 0x7f4544096dd0, 0x7f454407d578, 0x1, 0x0, ...) github.com/tgulacsi/goracle/oracle/_test/_cgo_defun.c:518 +0x34 github.com/tgulacsi/goracle/oracle.(*Cursor).internalExecute(0xc2000852a0, 0x1, 0x0, 0x1) github.com/tgulacsi/goracle/oracle/_test/_cgo_gotypes.go:1089 +0x2f7 github.com/tgulacsi/goracle/oracle.(*Cursor).Execute(0xc2000852a0, 0x58f530, 0x68, 0x7f455dbf6de8, 0x1, ...) github.com/tgulacsi/goracle/oracle/_test/_cgo_gotypes.go:2070 +0x19d github.com/tgulacsi/goracle/oracle.TestCursorOut(0xc200090000) /home/gthomas/projects/go/src/github.com/tgulacsi/goracle/oracle/datatypes_test.go:388 +0x2cd testing.tRunner(0xc200090000, 0x63c770) /usr/local/go/src/pkg/testing/testing.go:353 +0x8a created by testing.RunTests /usr/local/go/src/pkg/testing/testing.go:433 +0x86b goroutine 1 [chan receive]: testing.RunTests(0x58d348, 0x63c680, 0xb, 0xb, 0x1, ...) /usr/local/go/src/pkg/testing/testing.go:434 +0x88e testing.Main(0x58d348, 0x63c680, 0xb, 0xb, 0x64b4e0, ...) /usr/local/go/src/pkg/testing/testing.go:365 +0x8a main.main() github.com/tgulacsi/goracle/oracle/_test/_testmain.go:63 +0x9a What do you suggest, how can I debug this? What shall I check? I can't debug into oracle library... Should I try to instrument a cx_Oracle module (stuff printf everywhere) and make a small working test to have something to compare to? Seems to be a lot of work. Better ideas? Thanks in advance, Tamás Gulácsi |