Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Errors during capturing of stderr from plugins #1167

Closed
katarzyna-z opened this issue Aug 30, 2016 · 1 comment · Fixed by #1253
Closed

Errors during capturing of stderr from plugins #1167

katarzyna-z opened this issue Aug 30, 2016 · 1 comment · Fixed by #1253

Comments

@katarzyna-z
Copy link
Contributor

It seems that there is an issue with capturing logs from plugin which are sent to stderr. The issue was observed using the cpu plugin.

I've prepared the special versions of cpu plugin to observe what if plugin sends logs frequently:

  • cpu plugin with frequent short log, the version is available here,
  • cpu plugin with long log, the version is is available here.

I've tested this two special versions of cpu plugin with two version of snap:

  • snap with capturing of logs from plugins, it is this commit,
  • snap without capturing of logs from plugins, it is this commit.

I've observed that errors appear only in snap with capturing of logs from plugins. It seems that there is a problem in capturing stderr from plugins when log line is long. In the snap version without capturing of logs from plugins there was a special case for errors returned by the scanner, please see this .

It could be fixed on plugin side (by adding a newline at the end of the log) but it will be good to have a protection also on snap side.

@candysmurf
Copy link
Contributor

candysmurf commented Aug 30, 2016

@katarzyna-z, thanks for reporting an issue in details. For the scanner one, the log is in a goroutine. It won't cause the hanging. It's understandable.

It doesn't make sense if a long log causes hanging. It seems a program issue to me. Can you elaborate more? Also, I would suggest you test it against the latest Snap. thanks!

@bjray bjray added this to the 1.0.0 - Candidate milestone Sep 16, 2016
katarzyna-z pushed a commit to katarzyna-z/snap that referenced this issue Oct 3, 2016
katarzyna-z pushed a commit to katarzyna-z/snap that referenced this issue Oct 4, 2016
katarzyna-z pushed a commit to katarzyna-z/snap that referenced this issue Oct 4, 2016
katarzyna-z pushed a commit to katarzyna-z/snap that referenced this issue Oct 5, 2016
katarzyna-z pushed a commit to katarzyna-z/snap that referenced this issue Oct 5, 2016
katarzyna-z pushed a commit to katarzyna-z/snap that referenced this issue Oct 5, 2016
katarzyna-z pushed a commit to katarzyna-z/snap that referenced this issue Oct 5, 2016
katarzyna-z pushed a commit to katarzyna-z/snap that referenced this issue Oct 6, 2016
katarzyna-z pushed a commit to katarzyna-z/snap that referenced this issue Oct 10, 2016
katarzyna-z pushed a commit to katarzyna-z/snap that referenced this issue Oct 10, 2016
IRCody added a commit that referenced this issue Oct 11, 2016
Fix for issue #1167, added handling of errors which are returned by scaner
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants