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 running end-to-end tests with simple switch #2375

Closed
fruffy opened this issue May 14, 2020 · 0 comments · Fixed by #2388
Closed

Crash when running end-to-end tests with simple switch #2375

fruffy opened this issue May 14, 2020 · 0 comments · Fixed by #2388
Assignees
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.

Comments

@fruffy
Copy link
Collaborator

fruffy commented May 14, 2020

When doing end-to-end tests I have observed strange crashes with simple switch.
I run the following command
python p4_tv/p4c/backends/bmv2/run-bmv2-test.py p4_tv/p4c -v -b -bd p4c/build/ p4_tv/bugs/simple_switch/two_bools.p4

and I get this output:

Writing temporary files into  ./tmp1xr6wjtr                                        
Executing  p4c/build//p4c-bm2-ss -o ./tmp1xr6wjtr/two_bools.json p4_tv/bugs/simple_switch/two_bools.p4
Exit code  0
Check for  p4_tv/bugs/simple_switch/two_bools.stf
Running model
Running behavioral-model/targets/simple_switch/simple_switch --log-file switch.log --log-flush --use-files 0 --thrift-port 9972 --device-id 882 -i 0@pcap0 .././tmp1xr6wjtr/two_bools.json
Calling target program-options parser
Invalid 'type' in expression: ''
bad json:
{
   "left" : null,
   "op" : "d2b",
   "right" : {
      "type" : "field",
      "value" : [ "scalars", "tmp_0" ]
   }
}

*** Test failed

It looks like this might be a problem in the P4C BMV2 back-end and not the behavioral model?
I have two examples, they look related to me:

two_bools.p4.txt
two_bools.stf.txt
two_bools_2.stf.txt
two_bools_2.p4.txt

@mihaibudiu mihaibudiu added the bug This behavior is unintended and should be fixed. label May 14, 2020
@mihaibudiu mihaibudiu self-assigned this May 14, 2020
@mihaibudiu mihaibudiu added the fixed This topic is considered to be fixed. label May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants