Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unixODBC Pooling and unicode #35

Closed
partyzan543 opened this issue Feb 4, 2020 · 16 comments
Closed

unixODBC Pooling and unicode #35

partyzan543 opened this issue Feb 4, 2020 · 16 comments

Comments

@partyzan543
Copy link

Good afternoon!

Sorry for my poor English, but I have no one else to ask.
I use zabbix which accesses oracle through unixODBC.
If the request body contains unicode characters (select 'Кириллица' from dual;)
and Pooling is enabled (CPTimeout = 120) then in response I get 'Ñ‚ÐµÑ Ñ ‚'
Otherwise, if #CPTimeout then in response I get a 'Кириллица'

If using isql, then in both cases I get a 'Кириллица'

Do you have any suggestions on how to fix this?

@lurcher
Copy link
Owner

lurcher commented Feb 4, 2020 via email

@partyzan543
Copy link
Author

Used unixODBC 2.3.7

@lurcher
Copy link
Owner

lurcher commented Feb 4, 2020 via email

@partyzan543
Copy link
Author

partyzan543 commented Feb 4, 2020

odbc.ini
[ZBX]
Driver=Oracle12p
Application Attributes=T
Attributes=W
BatchAutocommitMode=IfAllSuccessful
BindAsFLOAT=F
CloseCursor=F
DSN=XE2
DisableDPM=F
DisableMTS=T
EXECSchemaOpt=
EXECSyntax=T
Failover=T
FailoverDelay=10
FailoverRetryCount=10
FetchBufferSize=64000
ForceWCHAR=F
Lobs=T
Longs=T
MetadataIdDefault=F
QueryTimeout=T
ResultSets=T
ServerName=servername
SQLGetData extensions=F
Translation DLL=
Translation Option=0
DisableRULEHint=T
UserID=user
PASSWORD=password
########################
odbcinst.ini
[ODBC]
Trace=Yes
Trace File=/tmp/sql.log
Pooling=Yes

[Oracle12p]
Description=Oracle ODBC driver for Oracle 12g 64bit
Driver=/usr/lib/oracle/12/lib/libsqora.so.12.1
CPTimeout = 300
DontDLClose = 1

@partyzan543
Copy link
Author

I also want to supplement the information. At the first application call (zabbix server) and CPTimeout = 300 enabled, the output is normal ('Кириллица'). But after the second call we get again 'Ñ‚ÐµÑ Ñ ‚

@lurcher
Copy link
Owner

lurcher commented Feb 4, 2020 via email

@lurcher
Copy link
Owner

lurcher commented Feb 4, 2020 via email

@partyzan543
Copy link
Author

Thanks a lot! i will be try

@partyzan543
Copy link
Author

Good day!

After the build 2.3.8pre, the zabbix-proxy proxy crashes.

I tried changing the sources of 2.3.7 in accordance with the changes, but after the build, the proxy also crashes.
############################################

Got signal [signal:11(SIGSEGV),reason:1,refaddr:(nil)]. Crashing ...
19280:20200205:111434.303 ====== Fatal information: ======
19280:20200205:111434.303 Program counter: 0x375de20230
19280:20200205:111434.303 === Registers: ===
19280:20200205:111434.304 r8 = 2647ace = 40139470 = 40139470
19280:20200205:111434.304 r9 = 7ffff14cceb8 = 140737241730744 = 140737241730744
19280:20200205:111434.304 r10 = 140 = 320 = 320
19280:20200205:111434.304 r11 = 206 = 518 = 518
19280:20200205:111434.304 r12 = 7ffff14ccf18 = 140737241730840 = 140737241730840
19280:20200205:111434.304 r13 = 25e5f80 = 39739264 = 39739264
19280:20200205:111434.304 r14 = 25e601f = 39739423 = 39739423
19280:20200205:111434.304 r15 = 7ffff14ccf00 = 140737241730816 = 140737241730816
19280:20200205:111434.304 rdi = 24baf10 = 38514448 = 38514448
19280:20200205:111434.304 rsi = 7ffff14ccf08 = 140737241730824 = 140737241730824
19280:20200205:111434.304 rbp = 7ffff14ccf08 = 140737241730824 = 140737241730824
19280:20200205:111434.304 rbx = 24baf10 = 38514448 = 38514448
19280:20200205:111434.304 rdx = 2647990 = 40139152 = 40139152
19280:20200205:111434.304 rax = 0 = 0 = 0
19280:20200205:111434.304 rcx = fffffffffffffff8 = 18446744073709551608 = -8
19280:20200205:111434.304 rsp = 7ffff14cce40 = 140737241730624 = 140737241730624
19280:20200205:111434.305 rip = 375de20230 = 237798294064 = 237798294064
19280:20200205:111434.305 efl = 10293 = 66195 = 66195
19280:20200205:111434.305 csgsfs = 33 = 51 = 51
19280:20200205:111434.305 err = 4 = 4 = 4
19280:20200205:111434.305 trapno = e = 14 = 14
19280:20200205:111434.305 oldmask = 0 = 0 = 0
19280:20200205:111434.305 cr2 = 0 = 0 = 0
19280:20200205:111434.305 === Backtrace: ===
19280:20200205:111434.358 17: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x47cfb7]
19280:20200205:111434.358 16: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x47d2fd]
19280:20200205:111434.358 15: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x47d616]
19280:20200205:111434.359 14: /lib64/libpthread.so.0() [0x375e20f710]
19280:20200205:111434.359 13: /lib64/libc.so.6() [0x375de20230]
19280:20200205:111434.359 12: /lib64/libc.so.6(iconv+0x6c) [0x375de1f87c]
19280:20200205:111434.359 11: /usr/lib64/libodbc.so.2(+0x44dba) [0x7fe390823dba]
19280:20200205:111434.359 10: /usr/lib64/libodbc.so.2(SQLExecDirect+0x2cf) [0x7fe3907f58df]
19280:20200205:111434.359 9: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x42ac33]
19280:20200205:111434.359 8: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x420b69]
19280:20200205:111434.359 7: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x41df09]
19280:20200205:111434.359 6: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x41e0ab]
19280:20200205:111434.359 5: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x47e026]
19280:20200205:111434.359 4: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x414d06]
19280:20200205:111434.359 3: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x47c443]
19280:20200205:111434.359 2: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x415967]
19280:20200205:111434.359 1: /lib64/libc.so.6(__libc_start_main+0xfd) [0x375de1ed1d]
19280:20200205:111434.359 0: /usr/local/sbin/zabbix_proxy_odbc: poller #1 got 1 values in 0.003617 sec, getting values [0x414549]
19280:20200205:111434.359 === Memory map: ===
19280:20200205:111434.360 00400000-0056c000 r-xp 00000000 fd:00 2646706 /usr/local/sbin/zabbix_proxy_odbc
19280:20200205:111434.360 0076b000-00775000 rw-p 0016b000 fd:00 2646706 /usr/local/sbin/zabbix_proxy_odbc
19280:20200205:111434.360 00775000-0077b000 rw-p 00000000 00:00 0
19280:20200205:111434.360 024a3000-024c4000 rw-p 00000000 00:00 0
19280:20200205:111434.360 024c4000-024f2000 rw-p 00000000 00:00 0
19280:20200205:111434.360 024f2000-02689000 rw-p 00000000 00:00 0
19280:20200205:111434.360 30fc200000-30fc201000 r-xp 00000000 fd:00 1966136 /lib64/libaio.so.1.0.1
19280:20200205:111434.360 30fc201000-30fc400000 ---p 00001000 fd:00 1966136 /lib64/libaio.so.1.0.1
19280:20200205:111434.360 30fc400000-30fc401000 rw-p 00000000 fd:00 1966136 /lib64/libaio.so.1.0.1
19280:20200205:111434.360 33fd800000-33fd81d000 r-xp 00000000 fd:00 1966082 /lib64/libselinux.so.1
19280:20200205:111434.360 33fd81d000-33fda1c000 ---p 0001d000 fd:00 1966082 /lib64/libselinux.so.1
19280:20200205:111434.360 33fda1c000-33fda1d000 r--p 0001c000 fd:00 1966082 /lib64/libselinux.so.1
19280:20200205:111434.360 33fda1d000-33fda1e000 rw-p 0001d000 fd:00 1966082 /lib64/libselinux.so.1
19280:20200205:111434.360 33fda1e000-33fda1f000 rw-p 00000000 00:00 0
19280:20200205:111434.360 33fdc00000-33fdd36000 r-xp 00000000 fd:00 2630613 /usr/lib64/mysql/libmysqlclient.so.16.0.0
19280:20200205:111434.361 33fdd36000-33fdf35000 ---p 00136000 fd:00 2630613 /usr/lib64/mysql/libmysqlclient.so.16.0.0
19280:20200205:111434.361 33fdf35000-33fdf83000 rw-p 00135000 fd:00 2630613 /usr/lib64/mysql/libmysqlclient.so.16.0.0
19280:20200205:111434.361 33fdf83000-33fdf84000 rw-p 00000000 00:00 0
19280:20200205:111434.361 33ff400000-33ff416000 r-xp 00000000 fd:00 1966087 /lib64/libgcc_s-4.4.7-20120601.so.1
19280:20200205:111434.361 33ff416000-33ff615000 ---p 00016000 fd:00 1966087 /lib64/libgcc_s-4.4.7-20120601.so.1
19280:20200205:111434.361 33ff615000-33ff616000 rw-p 00015000 fd:00 1966087 /lib64/libgcc_s-4.4.7-20120601.so.1
19280:20200205:111434.361 33ff800000-33ff9ba000 r-xp 00000000 fd:00 2625730 /usr/lib64/libcrypto.so.1.0.1e
19280:20200205:111434.361 33ff9ba000-33ffbba000 ---p 001ba000 fd:00 2625730 /usr/lib64/libcrypto.so.1.0.1e
19280:20200205:111434.361 33ffbba000-33ffbd5000 r--p 001ba000 fd:00 2625730 /usr/lib64/libcrypto.so.1.0.1e
19280:20200205:111434.361 33ffbd5000-33ffbe1000 rw-p 001d5000 fd:00 2625730 /usr/lib64/libcrypto.so.1.0.1e
19280:20200205:111434.361 33ffbe1000-33ffbe5000 rw-p 00000000 00:00 0
19280:20200205:111434.361 33ffc00000-33ffc03000 r-xp 00000000 fd:00 1966102 /lib64/libcom_err.so.2.1
19280:20200205:111434.361 33ffc03000-33ffe02000 ---p 00003000 fd:00 1966102 /lib64/libcom_err.so.2.1
19280:20200205:111434.361 33ffe02000-33ffe03000 r--p 00002000 fd:00 1966102 /lib64/libcom_err.so.2.1
19280:20200205:111434.361 33ffe03000-33ffe04000 rw-p 00003000 fd:00 1966102 /lib64/libcom_err.so.2.1
19280:20200205:111434.361 3400400000-34004dc000 r-xp 00000000 fd:00 1966104 /lib64/libkrb5.so.3.3
19280:20200205:111434.361 34004dc000-34006db000 ---p 000dc000 fd:00 1966104 /lib64/libkrb5.so.3.3
19280:20200205:111434.362 34006db000-34006e5000 r--p 000db000 fd:00 1966104 /lib64/libkrb5.so.3.3
19280:20200205:111434.362 34006e5000-34006e7000 rw-p 000e5000 fd:00 1966104 /lib64/libkrb5.so.3.3
19280:20200205:111434.362 3400800000-3400829000 r-xp 00000000 fd:00 1966100 /lib64/libk5crypto.so.3.1
19280:20200205:111434.362 3400829000-3400a29000 ---p 00029000 fd:00 1966100 /lib64/libk5crypto.so.3.1
19280:20200205:111434.362 3400a29000-3400a2a000 r--p 00029000 fd:00 1966100 /lib64/libk5crypto.so.3.1
19280:20200205:111434.362 3400a2a000-3400a2b000 rw-p 0002a000 fd:00 1966100 /lib64/libk5crypto.so.3.1
19280:20200205:111434.362 3400a2b000-3400a2c000 rw-p 00000000 00:00 0
19280:20200205:111434.362 3400c00000-3400c02000 r-xp 00000000 fd:00 1966094 /lib64/libkeyutils.so.1.3
19280:20200205:111434.362 3400c02000-3400e01000 ---p 00002000 fd:00 1966094 /lib64/libkeyutils.so.1.3
19280:20200205:111434.362 3400e01000-3400e02000 r--p 00001000 fd:00 1966094 /lib64/libkeyutils.so.1.3
19280:20200205:111434.362 3400e02000-3400e03000 rw-p 00002000 fd:00 1966094 /lib64/libkeyutils.so.1.3
19280:20200205:111434.362 3401000000-340100a000 r-xp 00000000 fd:00 1966098 /lib64/libkrb5support.so.0.1
19280:20200205:111434.362 340100a000-3401209000 ---p 0000a000 fd:00 1966098 /lib64/libkrb5support.so.0.1
19280:20200205:111434.362 3401209000-340120a000 r--p 00009000 fd:00 1966098 /lib64/libkrb5support.so.0.1
19280:20200205:111434.362 340120a000-340120b000 rw-p 0000a000 fd:00 1966098 /lib64/libkrb5support.so.0.1
19280:20200205:111434.362 3401400000-3401441000 r-xp 00000000 fd:00 1966118 /lib64/libgssapi_krb5.so.2.2
19280:20200205:111434.363 3401441000-3401641000 ---p 00041000 fd:00 1966118 /lib64/libgssapi_krb5.so.2.2
19280:20200205:111434.363 3401641000-3401642000 r--p 00041000 fd:00 1966118 /lib64/libgssapi_krb5.so.2.2
19280:20200205:111434.363 3401642000-3401644000 rw-p 00042000 fd:00 1966118 /lib64/libgssapi_krb5.so.2.2
19280:20200205:111434.363 3401800000-3401862000 r-xp 00000000 fd:00 2625762 /usr/lib64/libssl.so.1.0.1e
19280:20200205:111434.363 3401862000-3401a62000 ---p 00062000 fd:00 2625762 /usr/lib64/libssl.so.1.0.1e
19280:20200205:111434.363 3401a62000-3401a66000 r--p 00062000 fd:00 2625762 /usr/lib64/libssl.so.1.0.1e
19280:20200205:111434.363 3401a66000-3401a6c000 rw-p 00066000 fd:00 2625762 /usr/lib64/libssl.so.1.0.1e
19280:20200205:111434.363 3402400000-340242c000 r-xp 00000000 fd:00 1966122 /lib64/libpcre.so.0.0.1
19280:20200205:111434.363 340242c000-340262c000 ---p 0002c000 fd:00 1966122 /lib64/libpcre.so.0.0.1
19280:20200205:111434.363 340262c000-340262d000 rw-p 0002c000 fd:00 1966122 /lib64/libpcre.so.0.0.1
19280:20200205:111434.364 371aa00000-371aa4c000 r-xp 00000000 fd:00 922417 /usr/lib/oracle/12/lib/libons.so
19280:20200205:111434.364 371aa4c000-371ac4c000 ---p 0004c000 fd:00 922417 /usr/lib/oracle/12/lib/libons.so
19280:20200205:111434.364 371ac4c000-371ac4e000 rw-p 0004c000 fd:00 922417 /usr/lib/oracle/12/lib/libons.so
19280:20200205:111434.364 371ae00000-371b1a9000 r-xp 00000000 fd:00 922413 /usr/lib/oracle/12/lib/libclntshcore.so.12.1
19280:20200205:111434.364 371b1a9000-371b3a9000 ---p 003a9000 fd:00 922413 /usr/lib/oracle/12/lib/libclntshcore.so.12.1
19280:20200205:111434.364 371b3a9000-371b3bf000 rw-p 003a9000 fd:00 922413 /usr/lib/oracle/12/lib/libclntshcore.so.12.1
19280:20200205:111434.364 371b3bf000-371b3ce000 rw-p 00000000 00:00 0
19280:20200205:111434.364 371b400000-371ea51000 r-xp 00000000 fd:00 922418 /usr/lib/oracle/12/lib/libclntsh.so.12.1
19280:20200205:111434.364 371ea51000-371ec50000 ---p 03651000 fd:00 922418 /usr/lib/oracle/12/lib/libclntsh.so.12.1
19280:20200205:111434.364 371ec50000-371ee85000 rw-p 03650000 fd:00 922418 /usr/lib/oracle/12/lib/libclntsh.so.12.1
19280:20200205:111434.364 371ee85000-371eea5000 rw-p 00000000 00:00 0
19280:20200205:111434.364 371f000000-371f4d9000 r-xp 00000000 fd:00 922416 /usr/lib/oracle/12/lib/libnnz12.so
19280:20200205:111434.364 371f4d9000-371f6d8000 ---p 004d9000 fd:00 922416 /usr/lib/oracle/12/lib/libnnz12.so
19280:20200205:111434.364 371f6d8000-371f747000 rw-p 004d8000 fd:00 922416 /usr/lib/oracle/12/lib/libnnz12.so
19280:20200205:111434.364 371f747000-371f749000 rw-p 00000000 00:00 0
19280:20200205:111434.364 371f800000-371fa2c000 r-xp 00000000 fd:00 922414 /usr/lib/oracle/12/lib/libipc1.so
19280:20200205:111434.364 371fa2c000-371fc2b000 ---p 0022c000 fd:00 922414 /usr/lib/oracle/12/lib/libipc1.so
19280:20200205:111434.365 371fc2b000-371fc2f000 rw-p 0022b000 fd:00 922414 /usr/lib/oracle/12/lib/libipc1.so
19280:20200205:111434.365 371fc2f000-371fc33000 rw-p 00000000 00:00 0
19280:20200205:111434.365 371fe00000-371fe72000 r-xp 00000000 fd:00 922415 /usr/lib/oracle/12/lib/libmql1.so
19280:20200205:111434.365 371fe72000-3720072000 ---p 00072000 fd:00 922415 /usr/lib/oracle/12/lib/libmql1.so
19280:20200205:111434.365 3720072000-3720075000 rw-p 00072000 fd:00 922415 /usr/lib/oracle/12/lib/libmql1.so
19280:20200205:111434.365 3720075000-3720077000 rw-p 00000000 00:00 0
19280:20200205:111434.365 375d600000-375d620000 r-xp 00000000 fd:00 1966496 /lib64/ld-2.12.so
19280:20200205:111434.365 375d81f000-375d820000 r--p 0001f000 fd:00 1966496 /lib64/ld-2.12.so
19280:20200205:111434.365 375d820000-375d821000 rw-p 00020000 fd:00 1966496 /lib64/ld-2.12.so
19280:20200205:111434.365 375d821000-375d822000 rw-p 00000000 00:00 0
19280:20200205:111434.365 375da00000-375da02000 r-xp 00000000 fd:00 1966501 /lib64/libdl-2.12.so
19280:20200205:111434.365 375da02000-375dc02000 ---p 00002000 fd:00 1966501 /lib64/libdl-2.12.so
19280:20200205:111434.365 375dc02000-375dc03000 r--p 00002000 fd:00 1966501 /lib64/libdl-2.12.so
19280:20200205:111434.365 375dc03000-375dc04000 rw-p 00003000 fd:00 1966501 /lib64/libdl-2.12.so
19280:20200205:111434.365 375de00000-375df8b000 r-xp 00000000 fd:00 1966497 /lib64/libc-2.12.so
19280:20200205:111434.365 375df8b000-375e18a000 ---p 0018b000 fd:00 1966497 /lib64/libc-2.12.so
19280:20200205:111434.366 375e18a000-375e18e000 r--p 0018a000 fd:00 1966497 /lib64/libc-2.12.so
19280:20200205:111434.366 375e18e000-375e18f000 rw-p 0018e000 fd:00 1966497 /lib64/libc-2.12.so
19280:20200205:111434.366 375e18f000-375e194000 rw-p 00000000 00:00 0
19280:20200205:111434.366 375e200000-375e217000 r-xp 00000000 fd:00 1966502 /lib64/libpthread-2.12.so
19280:20200205:111434.366 375e217000-375e417000 ---p 00017000 fd:00 1966502 /lib64/libpthread-2.12.so
19280:20200205:111434.366 375e417000-375e418000 r--p 00017000 fd:00 1966502 /lib64/libpthread-2.12.so
19280:20200205:111434.366 375e418000-375e419000 rw-p 00018000 fd:00 1966502 /lib64/libpthread-2.12.so
19280:20200205:111434.366 375e419000-375e41d000 rw-p 00000000 00:00 0
19280:20200205:111434.366 375e600000-375e607000 r-xp 00000000 fd:00 1966503 /lib64/librt-2.12.so
19280:20200205:111434.366 375e607000-375e806000 ---p 00007000 fd:00 1966503 /lib64/librt-2.12.so
19280:20200205:111434.366 375e806000-375e807000 r--p 00006000 fd:00 1966503 /lib64/librt-2.12.so
19280:20200205:111434.366 375e807000-375e808000 rw-p 00007000 fd:00 1966503 /lib64/librt-2.12.so
19280:20200205:111434.366 375ea00000-375ea83000 r-xp 00000000 fd:00 1966498 /lib64/libm-2.12.so
19280:20200205:111434.366 375ea83000-375ec82000 ---p 00083000 fd:00 1966498 /lib64/libm-2.12.so
19280:20200205:111434.366 375ec82000-375ec83000 r--p 00082000 fd:00 1966498 /lib64/libm-2.12.so
19280:20200205:111434.366 375ec83000-375ec84000 rw-p 00083000 fd:00 1966498 /lib64/libm-2.12.so
19280:20200205:111434.366 375ee00000-375ee15000 r-xp 00000000 fd:00 1966500 /lib64/libz.so.1.2.3
19280:20200205:111434.367 375ee15000-375f014000 ---p 00015000 fd:00 1966500 /lib64/libz.so.1.2.3
19280:20200205:111434.367 375f014000-375f015000 r--p 00014000 fd:00 1966500 /lib64/libz.so.1.2.3
19280:20200205:111434.367 375f015000-375f016000 rw-p 00015000 fd:00 1966500 /lib64/libz.so.1.2.3
19280:20200205:111434.367 375fa00000-375fa16000 r-xp 00000000 fd:00 1966508 /lib64/libresolv-2.12.so
19280:20200205:111434.367 375fa16000-375fc16000 ---p 00016000 fd:00 1966508 /lib64/libresolv-2.12.so
19280:20200205:111434.367 375fc16000-375fc17000 r--p 00016000 fd:00 1966508 /lib64/libresolv-2.12.so
19280:20200205:111434.367 375fc17000-375fc18000 rw-p 00017000 fd:00 1966508 /lib64/libresolv-2.12.so
19280:20200205:111434.367 375fc18000-375fc1a000 rw-p 00000000 00:00 0
19280:20200205:111434.367 3767e00000-3767e07000 r-xp 00000000 fd:00 1966520 /lib64/libcrypt-2.12.so
19280:20200205:111434.367 3767e07000-3768007000 ---p 00007000 fd:00 1966520 /lib64/libcrypt-2.12.so
19280:20200205:111434.367 3768007000-3768008000 r--p 00007000 fd:00 1966520 /lib64/libcrypt-2.12.so
19280:20200205:111434.367 3768008000-3768009000 rw-p 00008000 fd:00 1966520 /lib64/libcrypt-2.12.so
19280:20200205:111434.367 3768009000-3768037000 rw-p 00000000 00:00 0
19280:20200205:111434.367 3768600000-3768671000 r-xp 00000000 fd:00 1966519 /lib64/libfreebl3.so
19280:20200205:111434.367 3768671000-3768870000 ---p 00071000 fd:00 1966519 /lib64/libfreebl3.so
19280:20200205:111434.367 3768870000-3768872000 r--p 00070000 fd:00 1966519 /lib64/libfreebl3.so
19280:20200205:111434.368 3768872000-3768873000 rw-p 00072000 fd:00 1966519 /lib64/libfreebl3.so
19280:20200205:111434.368 3768873000-3768877000 rw-p 00000000 00:00 0
19280:20200205:111434.368 376ee00000-376ee16000 r-xp 00000000 fd:00 1966535 /lib64/libnsl-2.12.so
19280:20200205:111434.368 376ee16000-376f015000 ---p 00016000 fd:00 1966535 /lib64/libnsl-2.12.so
19280:20200205:111434.368 376f015000-376f016000 r--p 00015000 fd:00 1966535 /lib64/libnsl-2.12.so
19280:20200205:111434.368 376f016000-376f017000 rw-p 00016000 fd:00 1966535 /lib64/libnsl-2.12.so
19280:20200205:111434.368 376f017000-376f019000 rw-p 00000000 00:00 0
19280:20200205:111434.368 3774e00000-3774e09000 r-xp 00000000 fd:00 2644586 /usr/lib64/libltdl.so.7.2.1
19280:20200205:111434.368 3774e09000-3775008000 ---p 00009000 fd:00 2644586 /usr/lib64/libltdl.so.7.2.1
19280:20200205:111434.368 3775008000-3775009000 rw-p 00008000 fd:00 2644586 /usr/lib64/libltdl.so.7.2.1
19280:20200205:111434.368 7fe38081c000-7fe38086e000 rw-p 00000000 00:00 0
19280:20200205:111434.368 7fe38086e000-7fe380873000 r-xp 00000000 fd:00 1966108 /lib64/libnss_dns-2.12.so
19280:20200205:111434.368 7fe380873000-7fe380a72000 ---p 00005000 fd:00 1966108 /lib64/libnss_dns-2.12.so
19280:20200205:111434.368 7fe380a72000-7fe380a73000 r--p 00004000 fd:00 1966108 /lib64/libnss_dns-2.12.so
19280:20200205:111434.368 7fe380a73000-7fe380a74000 rw-p 00005000 fd:00 1966108 /lib64/libnss_dns-2.12.so
19280:20200205:111434.369 7fe380a74000-7fe380a9f000 rw-p 00000000 00:00 0
19280:20200205:111434.369 7fe380a9f000-7fe386930000 r--p 00000000 fd:00 2622922 /usr/lib/locale/locale-archive
19280:20200205:111434.369 7fe386930000-7fe38695b000 rw-p 00000000 00:00 0
19280:20200205:111434.369 7fe38695b000-7fe386963000 r-xp 00000000 fd:00 2628194 /usr/lib64/libnuma.so.1
19280:20200205:111434.369 7fe386963000-7fe386b63000 ---p 00008000 fd:00 2628194 /usr/lib64/libnuma.so.1
19280:20200205:111434.369 7fe386b63000-7fe386b64000 rw-p 00008000 fd:00 2628194 /usr/lib64/libnuma.so.1
19280:20200205:111434.369 7fe386b64000-7fe386bcf000 rw-p 00000000 00:00 0
19280:20200205:111434.369 7fe386bcf000-7fe38e2cb000 r-xp 00000000 fd:00 921158 /usr/lib/oracle/12/lib/libociei.so
19280:20200205:111434.369 7fe38e2cb000-7fe38e4ca000 ---p 076fc000 fd:00 921158 /usr/lib/oracle/12/lib/libociei.so
19280:20200205:111434.369 7fe38e4ca000-7fe38e4cb000 rw-p 076fb000 fd:00 921158 /usr/lib/oracle/12/lib/libociei.so
19280:20200205:111434.369 7fe38e4cb000-7fe38e4ee000 rw-p 00000000 00:00 0
19280:20200205:111434.369 7fe38e4ee000-7fe38e4fe000 r-xp 00000000 fd:00 2626833 /usr/lib64/libodbcinst.so.2.0.0
19280:20200205:111434.369 7fe38e4fe000-7fe38e6fe000 ---p 00010000 fd:00 2626833 /usr/lib64/libodbcinst.so.2.0.0
19280:20200205:111434.369 7fe38e6fe000-7fe38e6ff000 rw-p 00010000 fd:00 2626833 /usr/lib64/libodbcinst.so.2.0.0
19280:20200205:111434.369 7fe38e6ff000-7fe38e702000 rw-p 00000000 00:00 0
19280:20200205:111434.369 7fe38e702000-7fe38e7a9000 r-xp 00000000 fd:00 921156 /usr/lib/oracle/12/lib/libsqora.so.12.1
19280:20200205:111434.369 7fe38e7a9000-7fe38e9a9000 ---p 000a7000 fd:00 921156 /usr/lib/oracle/12/lib/libsqora.so.12.1
19280:20200205:111434.370 7fe38e9a9000-7fe38e9c7000 rw-p 000a7000 fd:00 921156 /usr/lib/oracle/12/lib/libsqora.so.12.1
19280:20200205:111434.370 7fe38e9c7000-7fe38e9c8000 rw-s 00000000 00:04 31260686 /SYSV00000000 (deleted)
19280:20200205:111434.370 7fe38e9c8000-7fe38f1c8000 rw-s 00000000 00:04 31227917 /SYSV00000000 (deleted)
19280:20200205:111434.370 7fe38f1c8000-7fe38f5c8000 rw-s 00000000 00:04 31195148 /SYSV00000000 (deleted)
19280:20200205:111434.370 7fe38f5c8000-7fe3905c8000 rw-s 00000000 00:04 31162379 /SYSV00000000 (deleted)
19280:20200205:111434.370 7fe3905c8000-7fe3905d4000 r-xp 00000000 fd:00 1966110 /lib64/libnss_files-2.12.so
19280:20200205:111434.370 7fe3905d4000-7fe3907d4000 ---p 0000c000 fd:00 1966110 /lib64/libnss_files-2.12.so
19280:20200205:111434.370 7fe3907d4000-7fe3907d5000 r--p 0000c000 fd:00 1966110 /lib64/libnss_files-2.12.so
19280:20200205:111434.370 7fe3907d5000-7fe3907d6000 rw-p 0000d000 fd:00 1966110 /lib64/libnss_files-2.12.so
19280:20200205:111434.370 7fe3907d6000-7fe3907df000 rw-p 00000000 00:00 0
19280:20200205:111434.370 7fe3907df000-7fe390840000 r-xp 00000000 fd:00 2629296 /usr/lib64/libodbc.so.2.0.0
19280:20200205:111434.371 7fe390840000-7fe390a3f000 ---p 00061000 fd:00 2629296 /usr/lib64/libodbc.so.2.0.0
19280:20200205:111434.371 7fe390a3f000-7fe390a47000 rw-p 00060000 fd:00 2629296 /usr/lib64/libodbc.so.2.0.0
19280:20200205:111434.371 7fe390a47000-7fe390a4d000 rw-p 00000000 00:00 0
19280:20200205:111434.371 7fe390a55000-7fe390a56000 rw-p 00000000 00:00 0
19280:20200205:111434.371 7fe390a56000-7fe390a5d000 r--s 00000000 fd:00 2647698 /usr/lib64/gconv/gconv-modules.cache
19280:20200205:111434.371 7fe390a5d000-7fe390a5e000 rw-s 00000000 00:04 31129610 /SYSV00000000 (deleted)
19280:20200205:111434.371 7fe390a5e000-7fe390a5f000 rw-p 00000000 00:00 0
19280:20200205:111434.371 7fe390a5f000-7fe390a60000 rw-p 00000000 00:00 0
19280:20200205:111434.371 7ffff14b4000-7ffff170d000 rw-p 00000000 00:00 0 [stack]
19280:20200205:111434.371 7ffff17ff000-7ffff1800000 r-xp 00000000 00:00 0 [vdso]
19280:20200205:111434.371 ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
19280:20200205:111434.371 ================================
19280:20200205:111434.371 Please consider attaching a disassembly listing to your bug report.
19280:20200205:111434.371 This listing can be produced with, e.g., objdump -DSswx zabbix_proxy_odbc.
19280:20200205:111434.371 ================================
19267:20200205:111434.381 One child process died (PID:19280,exitcode/signal:1). Exiting ...
zabbix_proxy_odbc [19267]: Error waiting for process with PID 19280: [10] No child processes
19267:20200205:111434.408 syncing history data...
19267:20200205:111434.409 syncing history data done
19267:20200205:111434.409 Zabbix Proxy stopped. Zabbix 4.0.7 (revision 92831)

@lurcher
Copy link
Owner

lurcher commented Feb 5, 2020 via email

@partyzan543
Copy link
Author

[ODBC][20286][1580899002.774431][SQLFreeHandle.c][290]
Entry:
Handle Type = 2
Input Handle = 0xbd6760
[ODBC][20286][1580899002.774502][SQLFreeHandle.c][339]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899002.774558][SQLFreeHandle.c][220]
Entry:
Handle Type = 1
Input Handle = 0xbd6010
[ODBC][20286][1580899021.777345][__handles.c][460]
Exit:[SQL_SUCCESS]
Environment = 0xbd6b30
[ODBC][20286][1580899021.777534][SQLSetEnvAttr.c][189]
Entry:
Environment = 0xbd6b30
Attribute = SQL_ATTR_ODBC_VERSION
Value = 0x3
StrLen = 0
[ODBC][20286][1580899021.777592][SQLSetEnvAttr.c][381]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899021.777649][SQLAllocHandle.c][377]
Entry:
Handle Type = 2
Input Handle = 0xbd6b30
UNICODE Using encoding ASCII 'UTF-8' and UNICODE 'UTF-16LE'

[ODBC][20286][1580899021.777775][SQLAllocHandle.c][513]
Exit:[SQL_SUCCESS]
Output Handle = 0xd07850
[ODBC][20286][1580899021.777832][SQLSetConnectAttr.c][399]
Entry:
Connection = 0xd07850
Attribute = SQL_ATTR_LOGIN_TIMEOUT
Value = 0xa
StrLen = 0
[ODBC][20286][1580899021.777897][SQLSetConnectAttr.c][691]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899021.777956][SQLConnect.c][3753]
Entry:
Connection = 0xd07850
Server Name = [ZBX][length = 3 (SQL_NTS)]
User Name = [zabbix][length = 6 (SQL_NTS)]
Authentication = [*********][length = 9 (SQL_NTS)]
[ODBC][20286][1580899021.778674][SQLConnect.c][3881]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899021.778736][SQLAllocHandle.c][560]
Entry:
Handle Type = 3
Input Handle = 0xd07850
[ODBC][20286][1580899021.778863][SQLAllocHandle.c][1105]
Exit:[SQL_SUCCESS]
Output Handle = 0xd08ce0
[ODBC][20286][1580899021.778941][SQLExecDirect.c][240]
Entry:
Statement = 0xd08ce0
SQL = [select NAME from (select name from items where itemid=293989) where NAME='кириллица';][length = 126 (SQL_NTS)]
[ODBC][20286][1580899021.780477][SQLExecDirect.c][521]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899021.780587][SQLNumResultCols.c][156]
Entry:
Statement = 0xd08ce0
Column Count = 0xd098f8
[ODBC][20286][1580899021.780646][SQLNumResultCols.c][251]
Exit:[SQL_SUCCESS]
Count = 0xd098f8 -> 1
[ODBC][20286][1580899021.780701][SQLFetch.c][162]
Entry:
Statement = 0xd08ce0
[ODBC][20286][1580899021.781204][SQLFetch.c][352]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899021.781307][SQLGetData.c][237]
Entry:
Statement = 0xd08ce0
Column Number = 1
Target Type = 1 SQL_CHAR
Buffer Length = 2048
Target Value = 0x7fffe30d3cb0
StrLen Or Ind = 0x7fffe30d44c0
[ODBC][20286][1580899021.781382][SQLGetData.c][545]
Exit:[SQL_SUCCESS]
Buffer = [кириллица]
Strlen Or Ind = 0x7fffe30d44c0 -> 50 (64 bits)
[ODBC][20286][1580899021.781469][SQLFreeHandle.c][387]
Entry:
Handle Type = 3
Input Handle = 0xd08ce0
[ODBC][20286][1580899021.781563][SQLFreeHandle.c][490]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899021.781618][SQLDisconnect.c][208]
Entry:
Connection = 0xd07850
[ODBC][20286][1580899021.781673][SQLDisconnect.c][301]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899021.781726][SQLFreeHandle.c][290]
Entry:
Handle Type = 2
Input Handle = 0xd07850
[ODBC][20286][1580899021.781794][SQLFreeHandle.c][339]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899021.781847][SQLFreeHandle.c][220]
Entry:
Handle Type = 1
Input Handle = 0xbd6b30
[ODBC][20286][1580899062.786758][__handles.c][460]
Exit:[SQL_SUCCESS]
Environment = 0xbd6b30
[ODBC][20286][1580899062.786894][SQLSetEnvAttr.c][189]
Entry:
Environment = 0xbd6b30
Attribute = SQL_ATTR_ODBC_VERSION
Value = 0x3
StrLen = 0
[ODBC][20286][1580899062.786951][SQLSetEnvAttr.c][381]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899062.787008][SQLAllocHandle.c][377]
Entry:
Handle Type = 2
Input Handle = 0xbd6b30
UNICODE Using encoding ASCII 'UTF-8' and UNICODE 'UTF-16LE'

[ODBC][20286][1580899062.787132][SQLAllocHandle.c][513]
Exit:[SQL_SUCCESS]
Output Handle = 0xd07850
[ODBC][20286][1580899062.787188][SQLSetConnectAttr.c][399]
Entry:
Connection = 0xd07850
Attribute = SQL_ATTR_LOGIN_TIMEOUT
Value = 0xa
StrLen = 0
[ODBC][20286][1580899062.787244][SQLSetConnectAttr.c][691]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899062.787302][SQLConnect.c][3753]
Entry:
Connection = 0xd07850
Server Name = [ZBX][length = 3 (SQL_NTS)]
User Name = [zabbix][length = 6 (SQL_NTS)]
Authentication = [*********][length = 9 (SQL_NTS)]
[ODBC][20286][1580899062.787937][SQLConnect.c][3881]
Exit:[SQL_SUCCESS]
[ODBC][20286][1580899062.787997][SQLAllocHandle.c][560]
Entry:
Handle Type = 3
Input Handle = 0xd07850
[ODBC][20286][1580899062.788109][SQLAllocHandle.c][1105]
Exit:[SQL_SUCCESS]
Output Handle = 0xd08ce0
[ODBC][20286][1580899062.788167][SQLExecDirect.c][240]
Entry:
Statement = 0xd08ce0
SQL = [select 'Кириллица' from dual;][length = 38 (SQL_NTS)]

@partyzan543
Copy link
Author

partyzan543 commented Feb 5, 2020

Crashes occurs when checking the third metric.
(When opening a new connection, everything worked well in 2.3.7)
Prior to the commit, the second and further iterations gave unreadable characters, and now the second iteration gives the Cyrillic symbols normally.
But when zabbix_proxy try to reuse the connection a third time - crashes.

@lurcher
Copy link
Owner

lurcher commented Feb 6, 2020 via email

@partyzan543
Copy link
Author

Thank you very much,Nick. All works!

@partyzan543
Copy link
Author

partyzan543 commented Feb 7, 2020

Now everything is ok with the Cyrillic characters, and proxy no crashes,but the memory leak on the proxy is ~ 2GB per hour. This is a lot. It seems that the value memory buffer is not cleared. On 2.3.7 and enabled pooling, there was no leak at all.

@partyzan543
Copy link
Author

I compiled 2.3.7 to reflect the changes in SQLConnect.c. Cyrillic characters work, proxy does not crashes, and memory does not leak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants