Bug 1886849 - image-registry operator panics when it fails to create azure container
Summary: image-registry operator panics when it fails to create azure container
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.5.z
Assignee: Oleg Bulatov
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On: 1886845
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-09 14:09 UTC by Oleg Bulatov
Modified: 2023-12-15 19:43 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: the operator was dereferencing a nil pointer when tried to format the error message Consequence: when operator failed to create an Azure storage container, it panicked Fix: format the error message using correct data Result: the operator doesn't panic
Clone Of: 1886845
Environment:
Last Closed: 2020-10-26 15:11:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-image-registry-operator pull 624 0 None closed Bug 1886849: panic during creation of Azure storage container 2020-11-17 15:58:04 UTC
Red Hat Product Errata RHBA-2020:4268 0 None None None 2020-10-26 15:12:17 UTC

Description Oleg Bulatov 2020-10-09 14:09:50 UTC
+++ This bug was initially created as a clone of Bug #1886845 +++

Description of problem:

When the image-registry operator fails to create an Azure container, sometimes it panics because of invalid memory address dereference.

Version-Release number of selected component (if applicable):

4.5

How reproducible:

Sometimes.

Steps to Reproduce:

No clear steps to reproduce, see BZ 1886221.

Actual results:

The operator panics.

Expected results:

The operator reports an error.

Additional info:

E1008 19:45:54.418448     616 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 484 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x2042020, 0x3af9150)
        /go/src/github.com/openshift/cluster-image-registry-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:74 +0xa3
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
        /go/src/github.com/openshift/cluster-image-registry-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:48 +0x82
panic(0x2042020, 0x3af9150)
        /opt/rh/go-toolset-1.13/root/usr/lib/go-toolset-1.13-golang/src/runtime/panic.go:679 +0x1b2
github.com/openshift/cluster-image-registry-operator/pkg/storage/azure.(*driver).CreateStorage(0xc000dff9b0, 0xc000e92300, 0xc000776000, 0xc000807ba0)
        /go/src/github.com/openshift/cluster-image-registry-operator/pkg/storage/azure/azure.go:513 +0xe4d
github.com/openshift/cluster-image-registry-operator/pkg/resource.(*Generator).syncStorage(0xc0000e0da0, 0xc000e92300, 0x0, 0x0)
        /go/src/github.com/openshift/cluster-image-registry-operator/pkg/resource/generator.go:148 +0x140

--- Additional comment from Oleg Bulatov on 2020-10-09 16:08:33 CEST ---

The code that panicked in 4.6 was removed by [1] and [2].

[1]: https://github.com/openshift/cluster-image-registry-operator/commit/7db4de28cf5644e0944e74b069d9f783b5115c29
[2]: https://github.com/openshift/cluster-image-registry-operator/commit/750ac28367d028f9f9eb6972e6aae0093313ae13

Comment 4 Wenjing Zheng 2020-10-21 06:38:10 UTC
Cannot reproduce this panic on 4.5.0-0.nightly-2020-10-20-022340.

Comment 6 errata-xmlrpc 2020-10-26 15:11:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.5.16 bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4268


Note You need to log in before you can comment on or make changes to this bug.