Bug 1861304

Summary: panic: runtime error: index out of range
Product: OpenShift Container Platform Reporter: Catherine_H <yhuang>
Component: Image RegistryAssignee: Ricardo Maraschini <rmarasch>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.zCC: aos-bugs, mwasher, obulatov, pasik, wewang
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Image registry purging process running over s3 storage was listing a directory twice, first as a directory and later as a file. Consequence: Purging was failing when parsing the path for the directory (received as file), causing an invalid memory access (panic) Fix: Updated s3 driver to avoid listing a directory twice during path walk. Result: By avoiding listing a directory as a file allowed the image purging process to finish successfully.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:17:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 5 Ricardo Maraschini 2020-08-21 12:40:20 UTC
Postponed due to high priority tasks.

Comment 6 Ricardo Maraschini 2020-09-09 14:02:32 UTC
PR created upstream: https://github.com/docker/distribution/pull/3248

Comment 8 Ricardo Maraschini 2020-09-15 10:32:28 UTC
Let's try to get this in 4.6.

Comment 10 Wenjing Zheng 2020-09-22 08:38:58 UTC
Verified on 4.6.0-0.nightly-2020-09-21-230455:
1. set up s3fs locally https://github.com/s3fs-fuse/s3fs-fuse/ and mount s3 bucket
2. cd /mnt/s3bucket/docker/registry/v2/repositories;mkdir fakeimage
3. purge load happens and no panic appears.

Comment 13 errata-xmlrpc 2020-10-27 16:17:40 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.6 GA Images), 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:4196

Comment 14 errata-xmlrpc 2020-10-27 16:21:08 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.6 GA Images), 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:4196