Uploaded image for project: 'VOLTHA'
  1. VOLTHA
  2. VOL-4307

OpenOnuAdapter OnuImage download to adapter: wrong error indication and possibly adapter crash

    XMLWordPrintable

    Details

      Description

      Two aspects of this bug report.
      1.) When downloading the mage to the adapter runs into timeout (default 10s) a misleading image state (reason) is given, eg:
      DEVICEID IMAGESTATE.VERSION IMAGESTATE.DOWNLOADSTATE IMAGESTATE.REASON IMAGESTATE.IMAGESTATE
      40443373-3ba9-4863-a605-c0fec3dd0e62 V1.2.2 DOWNLOAD_FAILED OMCI_TRANSFER_ERROR IMAGE_UNKNOWN
      As the effect has nothing to do with any OMCI processing another error code should be given. As there is currently no fitting error code defined in the voltha protos it would be better to use the 'general' error:
      ImageState_UNKNOWN_ERROR.
      Moreover in this case it must also be ensured, that possibly internally stored file descriptor indications have to be removed again.
      2.) In specifc error situations the used http client of the adapter may fail with error inidcations to download the file. In such a situation we observed an adapter crash due to incorrect evaluation of the error indications. Happened e.g. here:
      [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xe3dd37]

      goroutine 6476 [running]:
      github.com/opencord/voltha-openonu-adapter-go/internal/pkg/onuadaptercore.(*fileDownloadManager).downloadFile(0xc000124180, 0x1370460, 0xc0006dab10, 0xc0006e4120, 0x56, 0x11d002d, 0x4, 0xc00069a1c0, 0xc, 0x0, ...)
      /go/src/internal/pkg/onuadaptercore/file_download_manager.go:294 +0xa37
      github.com/opencord/voltha-openonu-adapter-go/internal/pkg/onuadaptercore.(*fileDownloadManager).StartDownload(0xc000124180, 0x1370460, 0xc0006dab10, 0xc00069a1c0, 0xc, 0xc0006e4120, 0x56, 0xc0001c0f20, 0x0)
      /go/src/internal/pkg/onuadaptercore/file_download_manager.go:117 +0x231
      github.com/opencord/voltha-openonu-adapter-go/internal/pkg/onuadaptercore.(*OpenONUAC).Download_onu_image(0xc000480000, 0x1370460, 0xc0006dab10, 0xc0006e8190, 0x3, 0x4, 0xc0006e8190)
      /go/src/internal/pkg/onuadaptercore/openonu.go:669 +0x102d
      github.com/opencord/voltha-lib-go/v5/pkg/adapters/common.(*RequestHandlerProxy).Download_onu_image(0xc0001241c0, 0x1370460, 0xc0006dab10, 0xc0005b10e0, 0x3, 0x4, 0x0, 0x0, 0x0)
      /go/src/vendor/github.com/opencord/voltha-lib-go/v5/pkg/adapters/common/request_handler.go:940 +0xb9
      reflect.Value.call(0x11bd5a0, 0xc0001241c0, 0x3a13, 0x11d00f5, 0x4, 0xc0006dac30, 0x2, 0x2, 0xc0004a5cc8, 0x44f94c, ...)
      /usr/local/go/src/reflect/value.go:476 +0x8e7
      reflect.Value.Call(0x11bd5a0, 0xc0001241c0, 0x3a13, 0xc0006dac30, 0x2, 0x2, 0xc0001241c0, 0x3a13, 0xc0004a5d98)
      /usr/local/go/src/reflect/value.go:337 +0xb9
      github.com/opencord/voltha-lib-go/v5/pkg/kafka.CallFuncByName(0x1370460, 0xc0006dab10, 0x11bd5a0, 0xc0001241c0, 0xc000671dd0, 0x12, 0xc0004a5f70, 0x1, 0x1, 0x3, ...)
      /go/src/vendor/github.com/opencord/voltha-lib-go/v5/pkg/kafka/kafka_inter_container_library.go:777 +0x35a
      github.com/opencord/voltha-lib-go/v5/pkg/kafka.(*interContainerProxy).handleMessage(0xc0003e20b0, 0x13703f0, 0xc000046010, 0xc0006daa50, 0x11bd5a0, 0xc0001241c0)
      /go/src/vendor/github.com/opencord/voltha-lib-go/v5/pkg/kafka/kafka_inter_container_library.go:904 +0x17c5
      created by github.com/opencord/voltha-lib-go/v5/pkg/kafka.(*interContainerProxy).waitForMessages
      /go/src/vendor/github.com/opencord/voltha-lib-go/v5/pkg/kafka/kafka_inter_container_library.go:983 +0x93
      panic: runtime error: invalid memory address or nil pointer dereference
      [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xe3dd37]

        Attachments

        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            michaelpag Michael Pagenkopf
            Reporter:
            michaelpag Michael Pagenkopf
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes