Closed wcn00 closed 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.
Cfunc_dpiPool_create is the the first (second after env create) function. What if you test with DPI_DEBUG_LEVEL=28 ?
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)
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.
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.
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
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.
It would be a lot safer to change the base image....
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)