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

Crash when loading state from history with changed MAT keys #5

Closed
n1tr0-5urf3r opened this issue Nov 3, 2024 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@n1tr0-5urf3r
Copy link
Member

Description

Adding key fields to an existing MAT in an existing P4 program crashes the frontend if a previous state with table entries is loaded from the history.

Steps to reproduce

  1. Develop P4 program with a MAT of key field A
  2. Compile P4 program and load onto switch in UniCorn-P4
  3. Add table entries and save the configuration state
  4. Modify P4 program: Extend MAT with key field B
  5. Recompile P4 program
  6. Re-initialize previously saved state
  7. Switch initialization fails because existing table entries do not match to the modified MAT structure

Suggested solution

Do not write existing table entries to switch if the MAT structure changed. This should be indicated to the user in some way.

Traceback

There was an error during the initialization!Failed to initialize Switch. GRPC Connection is not available: <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNKNOWN details = "" debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-11-02T11:42:58.360296778+00:00", grpc_status:2, grpc_message:""}" >
@n1tr0-5urf3r n1tr0-5urf3r added the bug Something isn't working label Nov 3, 2024
@n1tr0-5urf3r n1tr0-5urf3r self-assigned this Nov 3, 2024
@n1tr0-5urf3r
Copy link
Member Author

Maybe fixed in 7329e34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant