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

tput cols/tput lines gives wrong results in podman exec #3903

Closed
praiskup opened this issue Aug 28, 2019 · 14 comments
Closed

tput cols/tput lines gives wrong results in podman exec #3903

praiskup opened this issue Aug 28, 2019 · 14 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@praiskup
Copy link

Correct output from podman run

$ podman run --rm -ti fedora:30 bash
[root@830e92c167ba /]# tput cols
237
[root@830e92c167ba /]# tput lines
56
[root@830e92c167ba /]# 

Wrong output in exec from the same container:

$ podman exec -ti objective_bohr bash
[root@830e92c167ba /]# tput cols
80
[root@830e92c167ba /]# tput lines
24
rpm -q runc podman
runc-1.0.0-93.dev.gitb9b6cc6.fc30.x86_64
podman-1.5.1-3.fc30.x86_64`
@mheon
Copy link
Member

mheon commented Aug 28, 2019

@haircommander PTAL

@mheon mheon added the kind/bug Categorizes issue or PR as related to a bug. label Aug 28, 2019
@praiskup
Copy link
Author

praiskup commented Aug 28, 2019

I used separate terminal, in separate tab in konsole (but I also tried separate terminal in gnome-terminal, and I have the same results).

@haircommander haircommander self-assigned this Aug 29, 2019
@haircommander
Copy link
Collaborator

thanks for the issue @praiskup I was able to reproduce. I'll look into it

@debarshiray
Copy link
Member

Interestingly, only the initial size is wrong. If the terminal emulator window is resized afterwards, then it picks up the changes correctly.

@mheon
Copy link
Member

mheon commented Sep 5, 2019

We might not be sending an initial resize message to Conmon

@haircommander
Copy link
Collaborator

yeah I found the issue. the initial resize request happens before conmon creates the ctl file, so it just errors out. I am trying to find a work around now

@praiskup
Copy link
Author

praiskup commented Sep 5, 2019

I just need to claim that this used to work in some previous version of podman (or runc, or whatever). I noticed problems last week for the first time. Btw., thanks for the work-around with window resizing!

@juhp
Copy link
Contributor

juhp commented Sep 9, 2019

Another workaround is for a shell is to run reset :) (Yep, it is a regression as Rishi also explained in his report.)

@praiskup
Copy link
Author

praiskup commented Sep 9, 2019

The reset workaround doesn't help in my case.

@debarshiray
Copy link
Member

I wonder if there's some race involved here. For some reason this bug stopped reproducing today out of the blue, even with the same software versions that were reliably reproducing it until last Thursday.

Anyway, since @haircommander already figured it out, I'll wait for the fix. :)

@juhp
Copy link
Contributor

juhp commented Sep 11, 2019

@praiskup you are right - I came back to report the same - maybe I had resized the window...

@mheon
Copy link
Member

mheon commented Oct 24, 2019

@haircommander This is fixed, yes?

@haircommander
Copy link
Collaborator

yes it should be!

@mheon
Copy link
Member

mheon commented Oct 24, 2019

Closing

@mheon mheon closed this as completed Oct 24, 2019
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

5 participants