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

traceloop show fails with message larger than max #2868

Open
qxmips opened this issue May 17, 2024 · 2 comments
Open

traceloop show fails with message larger than max #2868

qxmips opened this issue May 17, 2024 · 2 comments

Comments

@qxmips
Copy link

qxmips commented May 17, 2024

kubectl gadget traceloop show 33e588d70d7fdf6c837d727f4d1c6e067aaf7bdd03f96db26449a26a747c8411
CPU PID COMM SYSCALL PARAMS RET
Error: unmarshaling output: invalid character '\x1b' looking for beginning of value
Error: failed to receive stream on node "ip-10-11-85-0.ec2.internal": command terminated with exit code 1d message larger than max (12984636 vs. 4194304)

@eiffel-fl
Copy link
Member

Hi!

When you open a bug report issue, GitHub auto-fills the description with the following text:

## Description

[ 1 paragraph concisely describing the bug ]

## Impact

[ 1 sentence detailing the impact this bug is creating for you ]

## Environment and steps to reproduce

1. **Set-up**: [ describe the environment Flatcar/Lokomotive/Nebraska etc was running in when encountering the bug; Platform etc. ]
2. **Task**: [ describe the task performing when encountering the bug ]
3. **Action(s)**: [ sequence of actions that triggered the bug, see example below ]
  a. [ requested the start of a new pod or container ]
  b. [ container image downloaded ]
4. **Error**: [describe the error that was triggered]

## Expected behavior

[ describe what you expected to happen at 4. above but instead got an error ]

## Additional information

Please add any information here that does not fit the above format.

This is not for the sake to add burden on people reporting bugs, but rather to help us to diagnostic the problem.
So, can you update your message by adding the above information?
Particularly, the "Environment and steps to reproduce" would be really welcomed.

For the problem itself, the error message is not printed by traceloop but by the trace and grpc code.
I nonetheless suspect there is something wrong with the information generated by traceloop.

Best regards.

@alban
Copy link
Member

alban commented May 24, 2024

I suspect we need to change this line:

trace.Status.OperationError = fmt.Sprintf("failed to unmarshal output: %s", err)

in this way:

-trace.Status.OperationError = fmt.Sprintf("failed to unmarshal output: %s", err)
+trace.Status.OperationError = fmt.Sprintf("failed to unmarshal output %q: %s", t.trace.Status.Output, err)

This would be consistent with what was done in https://github.com/inspektor-gadget/inspektor-gadget/pull/714/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants