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

Errors during capturing of stderr from plugins #1167

@katarzyna-z

Description

@katarzyna-z

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions