Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mc tree displays irritating bevaviour #4794

Closed
simonthum opened this issue Dec 16, 2023 · 3 comments · Fixed by #4810
Closed

mc tree displays irritating bevaviour #4794

simonthum opened this issue Dec 16, 2023 · 3 comments · Fixed by #4810
Assignees

Comments

@simonthum
Copy link

.\mc tree

Expected behavior

Some local tree output aka ls , or useage information.

Actual behavior

An endless loop of the current directotry name, roughly tree view formatted is output to console until I crtlc it.

Steps to reproduce the behavior

.\mc tree

mc --version

PS C:\Users\sthum\repos\experimente\minIO> .\mc --version
mc version RELEASE.2023-12-14T00-37-41Z (commit-id=8da737f8fd63de58dc475bf88eb9e285d206e3ae)
Runtime: go1.21.5 windows/amd64
Copyright (c) 2015-2023 MinIO, Inc.
License GNU AGPLv3 https://www.gnu.org/licenses/agpl-3.0.html

System information

Win10 dev box, mc being in the current directory.

I realize this is not a likely prod setup, but I just wanted to see whether I get to speed in 5 mins (which worked fine, thanks!).

While the worst scenario for this bug is failing already bad scripts, the behaviour is simply not reassuring of minio quality controls. I am sure this bug is not representative and fairly simple to fix, but it spoils simple evaluation attempts like mine.

@klauspost
Copy link
Contributor

klauspost commented Dec 16, 2023

Confirmed with mc tree play.

Ends up in a loop requesting

mc: <DEBUG> GET /123666/?delimiter=%2F&encoding-type=url&fetch-owner=true&list-type=2&prefix=tetse%2F HTTP/1.1
Host: play.min.io
User-Agent: MinIO (windows; amd64) minio-go/v7.0.63 mc/DEVELOPMENT.GOGET
Authorization: AWS4-HMAC-SHA256 Credential=**REDACTED**/20231216/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=**REDACTED**
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20231216T174818Z
Accept-Encoding: gzip

mc: <DEBUG> HTTP/1.1 200 OK
Content-Length: 681
Accept-Ranges: bytes
Connection: keep-alive
Content-Type: application/xml
Date: Sat, 16 Dec 2023 17:48:19 GMT
Server: nginx/1.18.0 (Ubuntu)
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin
Vary: Accept-Encoding
X-Amz-Bucket-Region: us-east-1
X-Amz-Id-2: 3e996b2f640d7e065d3a5c4e39a5538cefb82e3e77771990265e4698d8681eac
X-Amz-Request-Id: 17A1611A308A485F
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block

@scherepanov
Copy link

Endless loop in mc tree happens when dir contains no files.
To reproduce, create empty dir:

mc mb myminio/tst/emptydir
mc tree myminio/tst/emptydir

You will see ifiniteloop.

jiuker pushed a commit to jiuker/mc that referenced this issue Dec 29, 2023
@jiuker
Copy link
Contributor

jiuker commented Dec 29, 2023

MacBook-Pro mc % ./mc tree minio/mytest --files
minio/mytest
├─ test.json
├─ test.ndjson
└─ testdir

@jiuker jiuker mentioned this issue Dec 29, 2023
8 tasks
jiuker pushed a commit to jiuker/mc that referenced this issue Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants