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

"Error reading from tty device" message on startup. #6

Open
williamspatrick opened this issue Sep 17, 2016 · 8 comments
Open

"Error reading from tty device" message on startup. #6

williamspatrick opened this issue Sep 17, 2016 · 8 comments
Assignees
Labels

Comments

@williamspatrick
Copy link
Member

I sometimes observe the following on startup. Due to the restart policy, we get the service immediately restarted and it works fine after that.

Sep 17 00:54:32 palmetto sh[679]: obmc-console-server: Error reading from tty device: Success
@adamliyi
Copy link
Member

adamliyi commented Oct 19, 2016

Committed a fix at: https://gerrit.openbmc-project.xyz/#/c/848/
This issue is not easy to reproduce. I can sometimes observe the issue when:

  1. Change Host CPU state (obmcutil poweroff/on)
  2. Reboot bmc
    But this will not always trigger it. When the issue happens, poll() tty device will return revents value: 0x19. (looks to be POLLERR | POLLHUP | POLLIN). In my patch, I tried to:
  3. continue poll() when revents not POLLIN
  4. When handling POLLIN, if read() returns 0, just continue without break.

@williamspatrick , @jk-ozlabs . Please review.

@adamliyi
Copy link
Member

Updated the patch - when there is revent besides POLLIN, we cannot do continue, otherwise we cannot poll clients (call_pollers(console)) - clients may hang there.

Is it OK just read from tty when revent==POLLIN?

I tested on Palmetto, and I cannot reproduce the issue any more, and obmc-console-client works well.

@geissonator
Copy link
Contributor

Needs 1 more +1 and then merge. Please follow up with reviewers.

@adamliyi
Copy link
Member

Hi @shenki , will you have a look and +1 :)

@adamliyi
Copy link
Member

@jk-ozlabs commented in: https://gerrit.openbmc-project.xyz/#/c/848/, that "Why are you ignoring POLLERR & POLLHUP? This seems dangerous."
I don't have strong reason on "why ignoring POLLERR & POLLHUP", so abandoned that patch. Looks to me, we need to root cause why there is POLLERR and POLLHUP from serial port to fix this issue. But I currently have no idea. Since systemd can restart console-server so this is not a blocking issue. I'd leave this issue open for now.

@geissonator
Copy link
Contributor

Seem pretty open now, and priority isn't clear so just putting in actual for current sprint (not committed).

@geissonator
Copy link
Contributor

@adamliyi - Patrick would like to see this one get resolved, please follow up with Joel on a correct solution this next sprint. Thanks!

@mine260309
Copy link
Contributor

From @jk-ozlabs, we have several commits under review: the patch series of https://gerrit.openbmc-project.xyz/#/c/2316
It's better to re-test this issue after the patches are submitted.

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

No branches or pull requests

5 participants