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

:terminal closed before output is fully consumed #26543

Open
zsugabubus opened this issue Dec 12, 2023 · 4 comments
Open

:terminal closed before output is fully consumed #26543

zsugabubus opened this issue Dec 12, 2023 · 4 comments
Labels
bug issues reporting wrong behavior channels-rpc channels, RPC, msgpack has:repro issue contains minimal reproducing steps job-control OS processes, spawn terminal built-in :terminal or :shell

Comments

@zsugabubus
Copy link

zsugabubus commented Dec 12, 2023

Problem

Terminal output is truncated when large amount of data is passed:

…
7785
7786
7
[Process exited 0]

Steps to reproduce

:term seq 10000

Expected behavior

…
9998
9999
10000
[Process exited 0]

Neovim version (nvim -v)

0.10.0-dev-1907abb

Vim (not Nvim) behaves the same?

no, 9.0.2143

Operating system/version

Arch Linux

Terminal name/version

alacritty

$TERM environment variable

alacritty

Installation

build from repo

@zsugabubus zsugabubus added the bug issues reporting wrong behavior label Dec 12, 2023
@zsugabubus zsugabubus changed the title :terminal closed before output is drained :terminal closed before output is fully consumed Dec 12, 2023
@zeertzjq zeertzjq added the terminal built-in :terminal or :shell label Dec 12, 2023
@gpanders
Copy link
Member

I am able to reproduce this on Debian, but not on macOS.

@gpanders gpanders added the has:repro issue contains minimal reproducing steps label Dec 12, 2023
@zeertzjq
Copy link
Member

This seems to apply to on_stdout callback of jobstart() with pty as well, although not every time:

let g:stdout = []
func OnOutput(id, data, event) dict
  let g:stdout += a:data
endfunc
call jobstart('seq 10000', {
      \ 'on_stdout': function('OnOutput'),
      \ 'pty': v:true,
      \ })

@zeertzjq zeertzjq added the job-control OS processes, spawn label Dec 13, 2023
@zsugabubus
Copy link
Author

I am able to reproduce this on Debian, but not on macOS.

I do not have a macOS at hand but maybe it has smaller pipe capacity by default so libuv can always finish reading in time. Forcing one large write instead of many smaller may help reproduction: :term stdbuf -o64K seq 10000.

@rudiejd
Copy link
Contributor

rudiejd commented Jan 20, 2024

This only happens when I pass the command with a large output to :term ex command, not when I run the same command in terminal.

@justinmk justinmk added channels-rpc channels, RPC, msgpack and removed channel labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior channels-rpc channels, RPC, msgpack has:repro issue contains minimal reproducing steps job-control OS processes, spawn terminal built-in :terminal or :shell
Projects
None yet
Development

No branches or pull requests

5 participants