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

Conmon timestamp buffer too small #1635

Closed
mheon opened this Issue Jun 20, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@mheon
Contributor

mheon commented Jun 20, 2018

Description

On some systems, conmon may fail to write anything to the attach socket at the timestamp buffer is too small.

I'm not sure exactly what kind of locale generates this, but I have shell on a system that consistently produces 45-length timestamps (longer than the 44 length of the buffer).

An example timestamp:
2018-06-21T01:33:55.102183860+05:1800 stdout

@edsantiago suggests that the error is at https://github.com/kubernetes-incubator/cri-o/blob/master/conmon/conmon.c#L311 and off % 3600 should actually be (off % 3600) / 60

@mheon

This comment has been minimized.

Contributor

mheon commented Jun 20, 2018

Found this while tracking down containers/libpod#580

@edsantiago

This comment has been minimized.

Contributor

edsantiago commented Jun 20, 2018

Reasoning: this is one of those weird non-integer-hour tz offsets. @mheon helpfully provided a sample timestamp:

2018-06-21T01:33:55.102183860+05:1800
                              ^^^^^^^

That should be 05:30.

@rhatdan

This comment has been minimized.

Contributor

rhatdan commented Jun 20, 2018

Can you open a PR to fix it.

@mheon

This comment has been minimized.

Contributor

mheon commented Jun 20, 2018

@rhatdan Sure, I'll take this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment