godror / godror

GO DRiver for ORacle DB
Other
522 stars 99 forks source link

Oracle access regularly crash. #30

Closed wcn00 closed 4 years ago

wcn00 commented 4 years ago

I'm runnin the app in a linux alpine container To Reproduce

My app is pretty convoluted so I'll just put the stack trace here to see if it looks familiar: `fatal: morestack on g0 SIGTRAP: trace trap PC=0x467522 m=7 sigcode=128

goroutine 0 [idle]: runtime.abort() /usr/local/go/src/runtime/asm_amd64.s:840 +0x2 runtime.morestack() /usr/local/go/src/runtime/asm_amd64.s:397 +0x25

goroutine 24 [syscall]: runtime.cgocall(0x840810, 0xc000600370, 0x29) /usr/local/go/src/runtime/cgocall.go:128 +0x5e fp=0xc000600338 sp=0xc000600300 pc=0x4136ce git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror._Cfunc_dpiPool_create(0x2d8ee80, 0x2d8eec0, 0x5, 0x2d8eee0, 0x9, 0x2d8ef00, 0x5a, 0xc0004c2240, 0xc0004c84b0, 0xc00000e058, ...) _cgo_gotypes.go:3991 +0x50 fp=0xc000600370 sp=0xc000600338 pc=0x79b480 git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror.(drv).openConn.func5(0x2d8ee80, 0x2d8eec0, 0x5, 0x2d8eee0, 0x9, 0x2d8ef00, 0x5a, 0xc0004c2240, 0xc0004c84b0, 0xc00000e058, ...) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror/drv.go:292 +0x1db fp=0xc0006003d8 sp=0xc000600370 pc=0x7c99bb git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror.(drv).openConn(0xf3c6c0, 0x0, 0x0, 0x0, 0xc0001d79d0, 0x5, 0xc0001d79d6, 0x9, 0xc0001d79e0, 0x5a, ...) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror/drv.go:292 +0x6b6 fp=0xc000600638 sp=0xc0006003d8 pc=0x7a4456 git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror.connector.Connect(0xf3c6c0, 0x0, 0x0, 0x0, 0x0, 0xc0001d79d0, 0x5, 0xc0001d79d6, 0x9, 0xc0001d79e0, ...) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror/drv.go:952 +0x6d fp=0xc000600728 sp=0xc000600638 pc=0x7ab4ed git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror.(*connector).Connect(0xc000328240, 0xa73040, 0xc00002c0e0, 0xd1, 0x207, 0xd1, 0x0)

:1 +0x95 fp=0xc000600820 sp=0xc000600728 pc=0x7ce815 database/sql.(*DB).conn(0xc000328300, 0xa73040, 0xc00002c0e0, 0x1, 0x0, 0xc000600a60, 0x47d4ba) /usr/local/go/src/database/sql/sql.go:1177 +0x135 fp=0xc0006009d8 sp=0xc000600820 pc=0x6ea865 database/sql.(*DB).prepare(0xc000328300, 0xa73040, 0xc00002c0e0, 0xc0004b4510, 0x90, 0x1, 0xc000600ad0, 0x6af9ee, 0xc00009e140) /usr/local/go/src/database/sql/sql.go:1380 +0x58 fp=0xc000600a58 sp=0xc0006009d8 pc=0x6ebf88 database/sql.(*DB).PrepareContext(0xc000328300, 0xa73040, 0xc00002c0e0, 0xc0004b4510, 0x90, 0xc000600e10, 0x1, 0x1) /usr/local/go/src/database/sql/sql.go:1353 +0x9b fp=0xc000600ad0 sp=0xc000600a58 pc=0x6ebd2b database/sql.(*DB).Prepare(0xc000328300, 0xc0004b4510, 0x90, 0x1, 0x1, 0x2) /usr/local/go/src/database/sql/sql.go:1370 +0x57 fp=0xc000600b20 sp=0xc000600ad0 pc=0x6ebef7 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/oracle.(*Connection).PreparedQuery(0xc0003ee2a0, 0x9c2727, 0x98, 0xc000601058, 0x0, 0x0, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/oracle/oracle.go:358 +0x4e6 fp=0xc000600f20 sp=0xc000600b20 pc=0x7d8e86 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/oracle.(*Connection).TableSchema(0xc0003ee2a0, 0xc0004623f0, 0x9, 0x0, 0x1007fedfa5976c0, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/oracle/oracle.go:223 +0x24f fp=0xc0006012b8 sp=0xc000600f20 pc=0x7d795f git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).evalTableLiteral(0xc000603ab8, 0xc0004c21c0, 0x9, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:1892 +0xfe fp=0xc0006013f0 sp=0xc0006012b8 pc=0x6cd40e git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).Eval(0xc000603ab8, 0xa6fd80, 0xc0004c21c0, 0xc0004ac2a0, 0xc0004c21c0, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:275 +0x28e9 fp=0xc000601e38 sp=0xc0006013f0 pc=0x6b4369 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).Eval(0xc000603ab8, 0xa6f840, 0xc0004c82d0, 0xc0004ac2a0, 0xc0004c82d0, 0x203000) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:169 +0x31c8 fp=0xc000602880 sp=0xc000601e38 pc=0x6b4c48 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).evalSelectStatement(0xc000603ab8, 0xc000090820, 0xc0004ac260, 0x25, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:1715 +0x37e fp=0xc000602e48 sp=0xc000602880 pc=0x6caa1e git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).evalSQLCommand(0xc000603ab8, 0xc0004ac200, 0xc0004ac260, 0xc0004feea0, 0x8223450d68e2b299) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:1085 +0x598 fp=0xc000602f68 sp=0xc000602e48 pc=0x6c2b78 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).Eval(0xc0005ddab8, 0xa6fcc0, 0xc0004ac200, 0xc0004ac260, 0x0, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:46 +0x953 fp=0xc0006039b0 sp=0xc000602f68 pc=0x6b23d3 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice.(*DBService).schema(0xc0005cc710, 0xc000446570, 0x26, 0xa74720, 0xc0003ee2a0, 0xc0003ee2a0, 0x0, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/dbservice.go:282 +0x2a7 fp=0xc000603ae0 sp=0xc0006039b0 pc=0x818c37 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice.(*DBService).Schema(0xc0005cc710, 0xa72d00, 0xc0003ee000, 0xc000156300) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/dbservice.go:241 +0x1c8 fp=0xc000603c40 sp=0xc000603ae0 pc=0x8183a8 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice.(*DBService).Schema-fm(0xa72d00, 0xc0003ee000, 0xc000156300) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/main.go:53 +0x48 fp=0xc000603c70 sp=0xc000603c40 pc=0x81b778 net/http.HandlerFunc.ServeHTTP(0xc0005cc750, 0xa72d00, 0xc0003ee000, 0xc000156300) /usr/local/go/src/net/http/server.go:1964 +0x44 fp=0xc000603c98 sp=0xc000603c70 pc=0x63d1a4 main.corsHandle.func1(0xa72d00, 0xc0003ee000, 0xc000156300) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/main.go:73 +0xa7 fp=0xc000603ce0 sp=0xc000603c98 pc=0x81b577 net/http.HandlerFunc.ServeHTTP(0xc0005ce360, 0xa72d00, 0xc0003ee000, 0xc000156300) /usr/local/go/src/net/http/server.go:1964 +0x44 fp=0xc000603d08 sp=0xc000603ce0 pc=0x63d1a4 net/http.(*ServeMux).ServeHTTP(0xf3c540, 0xa72d00, 0xc0003ee000, 0xc000156300) /usr/local/go/src/net/http/server.go:2361 +0x127 fp=0xc000603d48 sp=0xc000603d08 pc=0x63ee57 net/http.serverHandler.ServeHTTP(0xc000091110, 0xa72d00, 0xc0003ee000, 0xc000156300) /usr/local/go/src/net/http/server.go:2741 +0xab fp=0xc000603d78 sp=0xc000603d48 pc=0x63f90b net/http.(*conn).serve(0xc0004103c0, 0xa73000, 0xc0004c2000) /usr/local/go/src/net/http/server.go:1847 +0x646 fp=0xc000603fc8 sp=0xc000603d78 pc=0x63c3f6 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc000603fd0 sp=0xc000603fc8 pc=0x467bd1 created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:2851 +0x2f5 ` The database is oracle 12 xe. The client is 19.1 GO is: go version go1.11.4 linux/amd64 Godror version: fbfd5cedf8776f3baf9eb0f647ff6db31aa4f8b9 vendor/github.com/godror/godror (v0.13.1-5-gfbfd5ce) GCC: gcc version 8.2.0 (Alpine 8.2.0) Running in an alpine container but I don't know what version of alpine. If someone knows how to get that from a running container or its source image I'll include it here. The host os is Ubuntu 18.1 server x86_64 I can get this stacktrace with something as simple as db.ping() which leads me to suspect that the alpine libraries may be the problem because I don't see this when just running the driver on my desktop. At least I don't think so. I don't have many tests that do that. Any ideas?
wcn00 commented 4 years ago

Hmm. I made an Alpine container and am running my go tests in it... without error. This may turn out to be environmental in some way.

tgulacsi commented 4 years ago

Cfunc_dpiPool_create is the the first (second after env create) function. What if you test with DPI_DEBUG_LEVEL=28 ?

wcn00 commented 4 years ago

If I enter the contaner and do an ldd on the oracle client lib I get: bash-4.4# ldd libociicus.so ldd (0x7fedc2142000) libclntsh.so.19.1 => /usr/flogo/lib/instantclient_19_6/libclntsh.so.19.1 (0x7fedbd887000) libclntshcore.so.19.1 => /usr/flogo/lib/instantclient_19_6/libclntshcore.so.19.1 (0x7fedbd2e5000) libdl.so.2 => ldd (0x7fedc2142000) libm.so.6 => ldd (0x7fedc2142000) libpthread.so.0 => ldd (0x7fedc2142000) libnsl.so.1 => /usr/lib/libnsl.so.1 (0x7fedbd2cd000) librt.so.1 => ldd (0x7fedc2142000) libaio.so.1 => /usr/lib/libaio.so.1 (0x7fedbd2c8000) libc.so => ldd (0x7fedc2142000) libnnz19.so => /usr/flogo/lib/instantclient_19_6/libnnz19.so (0x7fedbcb7e000) libtirpc.so.3 => /usr/lib/libtirpc.so.3 (0x7fedbcb52000) libintl.so.8 => /usr/lib/libintl.so.8 (0x7fedbcb46000) libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x7fedbc905000) libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x7fedbc63f000) libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x7fedbc411000) libcom_err.so.2 => /lib/libcom_err.so.2 (0x7fedbc40c000) libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x7fedbc201000) libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x7fedbbffd000) Error relocating /usr/flogo/lib/instantclient_19_6/libclntsh.so.19.1: canonicalize_file_name: symbol not found Error relocating /usr/flogo/lib/instantclient_19_6/libclntsh.so.19.1: getcontext: symbol not found Error relocating /usr/flogo/lib/instantclient_19_6/libclntsh.so.19.1: __res_nsearch: symbol not found Error relocating /usr/flogo/lib/instantclient_19_6/libclntsh.so.19.1: __dn_skipname: symbol not found Error relocating /usr/flogo/lib/instantclient_19_6/libclntsh.so.19.1: __finite: symbol not found Error relocating /usr/flogo/lib/instantclient_19_6/libclntsh.so.19.1: __res_nclose: symbol not found Error relocating /usr/flogo/lib/instantclient_19_6/libclntsh.so.19.1: __res_ninit: symbol not found Suggesting that there a number of symbols not available in the alpine musl version of libc.

I did two things: I upgraded the oracle client to 19.6 (lite) and I institured debug level 28 as per Mr @tgulasci . Some of the tests which produced the error readily did not anymore, but others did. This is the error output from this one (hopefully more meaningful)

`ODPI [00019] 2020-03-14 15:31:23.174: fn start dpiContext_create ODPI [00019] 2020-03-14 15:31:23.182: fn end dpiContext_create -> 0 ODPI [00019] 2020-03-14 15:31:23.182: fn start dpiContext_getClientVersion(0x12e8d60) ODPI [00019] 2020-03-14 15:31:23.182: fn end dpiContext_getClientVersion(0x12e8d60) -> 0 ODPI [00019] 2020-03-14 15:31:23.182: fn start dpiContext_initCommonCreateParams(0x12e8d60) ODPI [00019] 2020-03-14 15:31:23.182: fn end dpiContext_initCommonCreateParams(0x12e8d60) -> 0 ODPI [00019] 2020-03-14 15:31:23.182: fn start dpiContext_initPoolCreateParams(0x12e8d60) ODPI [00019] 2020-03-14 15:31:23.182: fn end dpiContext_initPoolCreateParams(0x12e8d60) -> 0 ODPI [00019] 2020-03-14 15:31:23.182: fn start dpiPool_create(0x12e8d60) fatal: morestack on g0 SIGTRAP: trace trap PC=0x467522 m=6 sigcode=128

goroutine 0 [idle]: runtime.abort() /usr/local/go/src/runtime/asm_amd64.s:840 +0x2 runtime.morestack() /usr/local/go/src/runtime/asm_amd64.s:397 +0x25

goroutine 59 [syscall]: runtime.cgocall(0x840810, 0xc0005ea370, 0x29) /usr/local/go/src/runtime/cgocall.go:128 +0x5e fp=0xc0005ea338 sp=0xc0005ea300 pc=0x4136ce git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror._Cfunc_dpiPool_create(0x12e8d60, 0x12e8da0, 0x5, 0x12e8dc0, 0x9, 0x12e8de0, 0x5a, 0xc0004e4140, 0xc00041c550, 0xc00000e028, ...) _cgo_gotypes.go:3991 +0x50 fp=0xc0005ea370 sp=0xc0005ea338 pc=0x79b480 git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror.(drv).openConn.func5(0x12e8d60, 0x12e8da0, 0x5, 0x12e8dc0, 0x9, 0x12e8de0, 0x5a, 0xc0004e4140, 0xc00041c550, 0xc00000e028, ...) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror/drv.go:292 +0x1db fp=0xc0005ea3d8 sp=0xc0005ea370 pc=0x7c99bb git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror.(drv).openConn(0xf3c6c0, 0x0, 0x0, 0x0, 0xc000209b20, 0x5, 0xc000209b26, 0x9, 0xc000209b30, 0x5a, ...) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror/drv.go:292 +0x6b6 fp=0xc0005ea638 sp=0xc0005ea3d8 pc=0x7a4456 git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror.connector.Connect(0xf3c6c0, 0x0, 0x0, 0x0, 0x0, 0xc000209b20, 0x5, 0xc000209b26, 0x9, 0xc000209b30, ...) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror/drv.go:952 +0x6d fp=0xc0005ea728 sp=0xc0005ea638 pc=0x7ab4ed git.tibco.com/git/product/ipaas/wi-dbservice.git/vendor/github.com/godror/godror.(*connector).Connect(0xc0002040c0, 0xa73040, 0xc0000b2030, 0xd1, 0x1f5, 0xd1, 0x0)

:1 +0x95 fp=0xc0005ea820 sp=0xc0005ea728 pc=0x7ce815 database/sql.(*DB).conn(0xc000204180, 0xa73040, 0xc0000b2030, 0x1, 0x0, 0xc0005eaa60, 0x47d4ba) /usr/local/go/src/database/sql/sql.go:1177 +0x135 fp=0xc0005ea9d8 sp=0xc0005ea820 pc=0x6ea865 database/sql.(*DB).prepare(0xc000204180, 0xa73040, 0xc0000b2030, 0xc00051c240, 0x90, 0x1, 0xc0005eaad0, 0x6af9ee, 0xc0000c8140) /usr/local/go/src/database/sql/sql.go:1380 +0x58 fp=0xc0005eaa58 sp=0xc0005ea9d8 pc=0x6ebf88 database/sql.(*DB).PrepareContext(0xc000204180, 0xa73040, 0xc0000b2030, 0xc00051c240, 0x90, 0xc0005eae10, 0x1, 0x1) /usr/local/go/src/database/sql/sql.go:1353 +0x9b fp=0xc0005eaad0 sp=0xc0005eaa58 pc=0x6ebd2b database/sql.(*DB).Prepare(0xc000204180, 0xc00051c240, 0x90, 0x1, 0x1, 0x2) /usr/local/go/src/database/sql/sql.go:1370 +0x57 fp=0xc0005eab20 sp=0xc0005eaad0 pc=0x6ebef7 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/oracle.(*Connection).PreparedQuery(0xc0003b4540, 0x9c2727, 0x98, 0xc0005eb058, 0x0, 0x0, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/oracle/oracle.go:358 +0x4e6 fp=0xc0005eaf20 sp=0xc0005eab20 pc=0x7d8e86 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/oracle.(*Connection).TableSchema(0xc0003b4540, 0xc00045a400, 0x9, 0x0, 0x1007f96420ce000, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/oracle/oracle.go:223 +0x24f fp=0xc0005eb2b8 sp=0xc0005eaf20 pc=0x7d795f git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).evalTableLiteral(0xc0005edab8, 0xc0004e40c0, 0x9, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:1892 +0xfe fp=0xc0005eb3f0 sp=0xc0005eb2b8 pc=0x6cd40e git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).Eval(0xc0005edab8, 0xa6fd80, 0xc0004e40c0, 0xc00044a2a0, 0xc0004e40c0, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:275 +0x28e9 fp=0xc0005ebe38 sp=0xc0005eb3f0 pc=0x6b4369 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).Eval(0xc0005edab8, 0xa6f840, 0xc00041c370, 0xc00044a2a0, 0xc00041c370, 0x203000) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:169 +0x31c8 fp=0xc0005ec880 sp=0xc0005ebe38 pc=0x6b4c48 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).evalSelectStatement(0xc0005edab8, 0xc0000ac750, 0xc00044a260, 0x27, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:1715 +0x37e fp=0xc0005ece48 sp=0xc0005ec880 pc=0x6caa1e git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).evalSQLCommand(0xc0005edab8, 0xc00044a200, 0xc00044a260, 0xc0000cd0e0, 0x31275ac945d8f993) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:1085 +0x598 fp=0xc0005ecf68 sp=0xc0005ece48 pc=0x6c2b78 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator.(*Evaluator).Eval(0xc0003b1ab8, 0xa6fcc0, 0xc00044a200, 0xc00044a260, 0x0, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/evaluator/evaluator.go:46 +0x953 fp=0xc0005ed9b0 sp=0xc0005ecf68 pc=0x6b23d3 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice.(*DBService).schema(0xc0005dc770, 0xc0000245a0, 0x28, 0xa74720, 0xc0003b4540, 0xc0003b4540, 0x0, 0x0) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/dbservice.go:282 +0x2a7 fp=0xc0005edae0 sp=0xc0005ed9b0 pc=0x818c37 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice.(*DBService).Schema(0xc0005dc770, 0xa72d00, 0xc0003b4380, 0xc00043c400) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice/dbservice.go:241 +0x1c8 fp=0xc0005edc40 sp=0xc0005edae0 pc=0x8183a8 git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/dbservice.(*DBService).Schema-fm(0xa72d00, 0xc0003b4380, 0xc00043c400) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/main.go:53 +0x48 fp=0xc0005edc70 sp=0xc0005edc40 pc=0x81b778 net/http.HandlerFunc.ServeHTTP(0xc0005dc7b0, 0xa72d00, 0xc0003b4380, 0xc00043c400) /usr/local/go/src/net/http/server.go:1964 +0x44 fp=0xc0005edc98 sp=0xc0005edc70 pc=0x63d1a4 main.corsHandle.func1(0xa72d00, 0xc0003b4380, 0xc00043c400) /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/main.go:73 +0xa7 fp=0xc0005edce0 sp=0xc0005edc98 pc=0x81b577 net/http.HandlerFunc.ServeHTTP(0xc0005d9140, 0xa72d00, 0xc0003b4380, 0xc00043c400) /usr/local/go/src/net/http/server.go:1964 +0x44 fp=0xc0005edd08 sp=0xc0005edce0 pc=0x63d1a4 net/http.(*ServeMux).ServeHTTP(0xf3c540, 0xa72d00, 0xc0003b4380, 0xc00043c400) /usr/local/go/src/net/http/server.go:2361 +0x127 fp=0xc0005edd48 sp=0xc0005edd08 pc=0x63ee57 net/http.serverHandler.ServeHTTP(0xc0000ad1e0, 0xa72d00, 0xc0003b4380, 0xc00043c400) /usr/local/go/src/net/http/server.go:2741 +0xab fp=0xc0005edd78 sp=0xc0005edd48 pc=0x63f90b net/http.(*conn).serve(0xc000441360, 0xa73000, 0xc0000b8680) /usr/local/go/src/net/http/server.go:1847 +0x646 fp=0xc0005edfc8 sp=0xc0005edd78 pc=0x63c3f6 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc0005edfd0 sp=0xc0005edfc8 pc=0x467bd1 created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:2851 +0x2f5 goroutine 1 [IO wait]: internal/poll.runtime_pollWait(0x7f963fdd8f00, 0x72, 0x0) /usr/local/go/src/runtime/netpoll.go:173 +0x66 internal/poll.(*pollDesc).wait(0xc000185598, 0x72, 0xc0000b8300, 0x0, 0x0) /usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a internal/poll.(*pollDesc).waitRead(0xc000185598, 0xffffffffffffff00, 0x0, 0x0) /usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d internal/poll.(*FD).Accept(0xc000185580, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /usr/local/go/src/internal/poll/fd_unix.go:384 +0x1a0 net.(*netFD).accept(0xc000185580, 0x41c10f, 0xc000441360, 0xa0) /usr/local/go/src/net/fd_unix.go:238 +0x42 net.(*TCPListener).accept(0xc0000b4028, 0xc0005f3d78, 0x639588a0, 0x9333b560ae565073) /usr/local/go/src/net/tcpsock_posix.go:139 +0x2e net.(*TCPListener).AcceptTCP(0xc0000b4028, 0xc0005f3da0, 0x494056, 0x5e6cf8cb) /usr/local/go/src/net/tcpsock.go:247 +0x47 net/http.tcpKeepAliveListener.Accept(0xc0000b4028, 0xc0005f3df0, 0x18, 0xc000000300, 0x63fe45) /usr/local/go/src/net/http/server.go:3232 +0x2f net/http.(*Server).Serve(0xc0000ad1e0, 0xa72e80, 0xc0000b4028, 0x0, 0x0) /usr/local/go/src/net/http/server.go:2826 +0x22f net/http.(*Server).ListenAndServe(0xc0000ad1e0, 0x4, 0xc0005dc7c0) /usr/local/go/src/net/http/server.go:2764 +0xb6 main.main() /gotmp/src/git.tibco.com/git/product/ipaas/wi-dbservice.git/dbs/main.go:59 +0x42b goroutine 53 [select]: database/sql.(*DB).connectionOpener(0xc000204180, 0xa73000, 0xc0000b8340) /usr/local/go/src/database/sql/sql.go:1001 +0xe8 created by database/sql.OpenDB /usr/local/go/src/database/sql/sql.go:671 +0x15d goroutine 54 [select]: database/sql.(*DB).connectionResetter(0xc000204180, 0xa73000, 0xc0000b8340) /usr/local/go/src/database/sql/sql.go:1014 +0xfb created by database/sql.OpenDB /usr/local/go/src/database/sql/sql.go:672 +0x193 goroutine 8 [IO wait]: internal/poll.runtime_pollWait(0x7f963fdd8e30, 0x72, 0xc000467658) /usr/local/go/src/runtime/netpoll.go:173 +0x66 internal/poll.(*pollDesc).wait(0xc000184398, 0x72, 0xffffffffffffff00, 0xa6ed40, 0xef9d28) /usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a internal/poll.(*pollDesc).waitRead(0xc000184398, 0xc00034dc00, 0x1, 0x1) /usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d internal/poll.(*FD).Read(0xc000184380, 0xc00034dcc1, 0x1, 0x1, 0x0, 0x0, 0x0) /usr/local/go/src/internal/poll/fd_unix.go:169 +0x179 net.(*netFD).Read(0xc000184380, 0xc00034dcc1, 0x1, 0x1, 0x0, 0x0, 0x0) /usr/local/go/src/net/fd_unix.go:202 +0x4f net.(*conn).Read(0xc0000b4050, 0xc00034dcc1, 0x1, 0x1, 0x0, 0x0, 0x0) /usr/local/go/src/net/net.go:177 +0x68 net/http.(*connReader).backgroundRead(0xc00034dcb0) /usr/local/go/src/net/http/server.go:676 +0x5a created by net/http.(*connReader).startBackgroundRead /usr/local/go/src/net/http/server.go:672 +0xd2 rax 0x17 rbx 0xc000058e00 rcx 0x469405 rdx 0x17 rdi 0x2 rsi 0x9ad880 rbp 0x7f963fe2ab50 rsp 0x7f963fe2ab08 r8 0x7f964216f620 r9 0x7f963fe31130 r10 0x7f963fb10764 r11 0x202 r12 0x1365300 r13 0x8 r14 0x7f963fe31070 r15 0x7f963fe2cc73 rip 0x467522 rflags 0x202 cs 0x33 fs 0x0 gs 0x0 ODPI [03635] 2020-03-14 15:31:23.194: ODPI-C 3.3.0 ODPI [03635] 2020-03-14 15:31:23.194: debugging messages initialized at level 28 ` I'd be starting from scratch in cgo oracle C library programming so I'm hoping for some help here to avoid that pain :)
tgulacsi commented 4 years ago

Just avoid alpine and musl libc, use a proper container. If ldd errors out, then what do you expect???

https://github.com/golang/go/issues/34363 resembles this.

wcn00 commented 4 years ago

I am not the "owner" of the container architecture, just a contributor.  I do not have that choice :(

I need another way...

wcn

On 2020-03-14 10:05 a.m., Tamás Gulácsi wrote:

Just avoid alpine and musl libc, use a proper container.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/godror/godror/issues/30#issuecomment-599086853, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5EEDBY2SCQM6MJB46ZQ3LRHOTLHANCNFSM4LHFZZ4A.

tgulacsi commented 4 years ago

According to https://github.com/oracle/node-oracledb/issues/476 you may try https://github.com/sgerrand/alpine-pkg-glibc and of course install libaio-dev, too - see https://stackoverflow.com/questions/38206964/compile-php-oci8-extension-under-alpinelinux

wcn00 commented 4 years ago

Thanks @tgulascsi for your time on a saturday morning. The libc compat layer installation (though I had to force overwrite it) did work. It will be a lot easier for me to have that installed on our container than to have the container base image changed.

cjbj commented 4 years ago

It would be a lot safer to change the base image....