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

Possible infinite fetch loop with oracle

XMLWordPrintable

    • Sprint 53 (Jun 2019), Sprint 54 (Jul 2019)
    • 1

      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.

        1. ZBX-16256_v3_4_less_logs.patch
          0.7 kB
          Viktors Tjarve
        2. ZBX-16256_v3_4.patch
          2 kB
          Viktors Tjarve
        3. ZBX-16256-v3_4_final.patch
          1 kB
          Viktors Tjarve

            viktors.tjarve Viktors Tjarve
            wiper Andris Zeila
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: