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

ResourceModel: panic: runtime error #3472

Closed
chaunceyjiang opened this issue Apr 26, 2023 · 5 comments · Fixed by #3591
Closed

ResourceModel: panic: runtime error #3472

chaunceyjiang opened this issue Apr 26, 2023 · 5 comments · Fixed by #3591
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@chaunceyjiang
Copy link
Member

What happened:
image

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

I don't know how to reproduce it. It's default resource models.

Anything else we need to know?:

Environment:

  • Karmada version: release-1.5
  • kubectl-karmada or karmadactl version (the result of kubectl-karmada version or karmadactl version):
  • Others:
@chaunceyjiang chaunceyjiang added the kind/bug Categorizes issue or PR as related to a bug. label Apr 26, 2023
@RainbowMango
Copy link
Member

What operations did you do before the panic? Does the panic persist?

cc @Poor12 @halfrost
/priority important-soon

@karmada-bot karmada-bot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Apr 26, 2023
@halfrost
Copy link
Contributor

halfrost commented Apr 26, 2023

We can analyze the possible reasons from this log file:

The panic occurs at modeling.go line 90, which means that initializes the modelSortings dictionary. If this line panics, it may be that rsList[index][name] does not exist. In line 78, I judged that if (len(rsName) != len(rsList[0]), then an error will be thrown. Can you reproduce this panic in the test environment? I can added a log here like this commit. If you can be reproduced, you will see this log.

The name in ResourceList does not exist: name is %v, resourceList is %v

@sunbinnnnn
Copy link

sunbinnnnn commented May 26, 2023

The same panic occurs with release-1.5. But I find that I have adjust the resource model to a limited range level:

  resourceModels:
  - grade: 0
    ranges:
    - max: "9223372036854775807"
      min: "0"
      name: cpu
    - max: "9223372036854775807"
      min: "0"
      name: memory

If a add a grade 1, everything is fine. the resourceMoels list should not less than 2(which means for cpu and memory).

@RainbowMango
Copy link
Member

Thank you @sunbinnnnn.

@chaunceyjiang could you please try to reproduce it and take a look #3591?

@RainbowMango
Copy link
Member

/assign @sunbinnnnn
In favor of #3591.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants