Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-16256

Possible infinite fetch loop with oracle

    Details

    • Team:
      Team A
    • Sprint:
      Sprint 53 (Jun 2019), Sprint 54 (Jul 2019)
    • Story Points:
      1

      Description

      When executing DBfetch(), Zabbix checks for the following OCIStmtFetch2() errors:

      			case 1012:	/* ORA-01012: not logged on */
      			case 2396:	/* ORA-02396: exceeded maximum idle time */
      			case 3113:	/* ORA-03113: end-of-file on communication channel */
      			case 3114:	/* ORA-03114: not connected to ORACLE */
      

      Apparently there are more errors, as we had situation with DBfetch() entering infinite loop with the same row returned. By the documentation OCIStmtFetch2() can return OCI_NO_DATA or OCI_SUCCESS_WITH_INFO. However returning OCI_SUCCESS_WITH_INFO while setting ORA-03114 error would be quite strange, so it probably can return also OCI_ERROR.

      We should check the returned code with database errors (that should be easy to reproduce). If it really returns OCI_ERROR, then I believe we should simply check for OCI_ERROR and return NULL rowset, instead of blacklisting error codes.

      If OCIStmtFetch2() really returns only OCI_NO_DATA or OCI_SUCCESS_WITH_INFO, then it might be better to whitelist the errors Oracle has documented (ORA-24344, ORA-24345, ORA-24347) and return NULL rowset for the rest.

      At the very least if we are keeping current behavior, we should log the eror so it could be blacklisted if necessary.

        Attachments

          Activity

            People

            • Assignee:
              viktors.tjarve Viktors Tjarve
              Reporter:
              wiper Andris Zeila
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: