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

simple_switch died with return code -6 #887

Closed
fruffy opened this issue May 9, 2020 · 1 comment · Fixed by #888
Closed

simple_switch died with return code -6 #887

fruffy opened this issue May 9, 2020 · 1 comment · Fixed by #888

Comments

@fruffy
Copy link
Contributor

fruffy commented May 9, 2020

I have a couple of programs that crash simple switch with return code -6 at runtime when I perform a stf test. However, I am not sure what the source issue is or if that even is a bug.

The command I used to run the command is:

python p4c/backends/bmv2/run-bmv2-test.py p4c -v -b -bd p4c/build/ return_in_action.p4

return_in_action.p4.txt
return_in_action.stf.txt

switch.log.txt

antoninbas added a commit that referenced this issue May 10, 2020
When adding support for returning lvalues in the expression evaluation
engine (#839), we
introduced support for using expressions which do not evaluate to a
simple Data value as primitive arguments. In particular, we can use an
expression which evaluates to a Header object as a primitive
argument. However, the code responsible for parsing the bmv2 input JSON
and instantiating Action objects was treating all expressions used as
primitive arguments as "Data expressions", thus causing bmv2 to crash
when it was actually not the case.

Fixes #887
@antoninbas
Copy link
Member

Thanks for reporting this. It was indeed an issue with the bmv2 implementation, and not with the JSON generated by the compiler. I am surprised we didn't catch it sooner. Hopefully you can add your program to the p4c test suite.

antoninbas added a commit that referenced this issue May 10, 2020
When adding support for returning lvalues in the expression evaluation
engine (#839), we
introduced support for using expressions which do not evaluate to a
simple Data value as primitive arguments. In particular, we can use an
expression which evaluates to a Header object as a primitive
argument. However, the code responsible for parsing the bmv2 input JSON
and instantiating Action objects was treating all expressions used as
primitive arguments as "Data expressions", thus causing bmv2 to crash
when it was actually not the case.

Fixes #887
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants