Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #3324] ido2db crashes when Oracle queries fail #1135
This issue has been migrated from Redmine: https://dev.icinga.com/issues/3324
Created by gbeutner on 2012-10-22 13:54:30 +00:00
The IDO dump at https://sbfl.beutner.name/public/gnb/i-hate-oracle causes the servicestatus query to fail (strlen(output) > 2048). This causes the Oracle error handler to get invoked.
The ido2db_ocilib_err_handler() function then calls ido2db_oci_print_binds() which causes a buffer overflow.
2012-10-22 15:27:38 +00:00 by mfriedrich b2ba65f
2012-10-28 16:52:52 +00:00 by Tommi a123cc4
2012-10-29 18:36:11 +00:00 by mfriedrich b1207bd
Updated by gbeutner on 2012-10-22 13:55:10 +00:00
Updated by mfriedrich on 2012-10-22 15:27:13 +00:00
adding a test case, it even fails on command definition insert then as well.
it just stays "idle" and doing nothing, only the threaded housekeeper starts doing its work after a while.
having the fix applied, this is handled properly.
though, we run into the problem of the long command_line here (which is the same for the output column which we are trying to test actually).
see #3325 for details.
Updated by Tommi on 2012-10-25 13:22:37 +00:00
This raises several questions for me.
Updated by mfriedrich on 2012-10-25 13:40:05 +00:00
doesn't matter to me. the fixed version works for me.
an error is raised, and buffers are leaking around the place, leaving the ido2db in an endless loop, blocking the core, doing nothing. add the test config to your box, and test yourself to see what i mean.
there's no relevance on that, it was just the possibility to actually get something executed producing such an output (and i was too lazy to read a file when executing stuff). the command_line shouldn't be a clob, but the output column should, being handled the exact same as perfdata and longoutput, just to be on the safe side.
though, that should be fixed and discussed within #3325 then, as this issue is nearly resolved by gunnars fix.
Updated by Tommi on 2012-10-26 20:01:37 +00:00
Gunnars patch will print all data, but to keep the log readable i limited this to 4k
will raise the same error.
than we need to shorter the data, command_line is limited to 2048 chars
for my understanding the output column should be only a preview of the full data in LONG_OUTPUT, or why the output data is doubled?. clobs are not easy to handle for non oracle software like php and requires special handling for indexes. i would expect problems when moving output to clob
BTW:if someone hates oracle, oracle wont love him
Updated by mfriedrich on 2012-10-27 10:45:36 +00:00
it was not a funny check, it was an EXAMPLE. since noone provides any test config to check for. the real issue is the output column, which is to be resolved within #3325 - closing this as being resolved. if you want to discuss things about oracle with gunnar, please do that in private.