Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904263 - sys-libs/ncurses-6.4_p20230408 causes junk on terminal with app-editors/vim
Summary: sys-libs/ncurses-6.4_p20230408 causes junk on terminal with app-editors/vim
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks: CVE-2023-29491
  Show dependency tree
 
Reported: 2023-04-13 07:19 UTC by Michał Górny
Modified: 2024-04-06 08:25 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-04-13 07:19:27 UTC
As discussed with sam, the new ncurses causes vim to randomly output junk on screen — it happens at least on xfce4-terminal with TERM=xterm-256color (the default).  In general the problem starts occurring once I enter insert mode and start typing — in the lower right corner of screen '[No Name] + - VIM' is printed.  In earlier versions of ncurses, this text actually sets the window title but with the new one it just gets printed to screen, wraps the final line and makes a huge mess out of the window.

I've been able to confirm that it still happens with vim-9999 as of 474891bc89e657100bd37c29129451a0e601879d.

On ncurses end, the latest (20230408) patch seems to be causing it — after commenting it out (i.e. leaving 0401 as the newest), everything works fine again.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-13 07:21:31 UTC
Diff is https://github.com/ThomasDickey/ncurses-snapshots/compare/v6_4_20230401...v6_4_20230408.

Holger's also mentioned an issue at https://bugs.gentoo.org/904247#c2 but it might be a different problem. If it's the same issue, might be that tput/tic is broken?
Comment 2 Larry the Git Cow gentoo-dev 2023-04-13 07:27:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=684be1b17000d5497a4c2ba6ce4966e1ca728050

commit 684be1b17000d5497a4c2ba6ce4966e1ca728050
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-04-13 07:25:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-13 07:25:50 +0000

    sys-libs/ncurses: add 6.4_p20230401
    
    This lacks the upstream 20230408 patch which might cause issues, so add
    this version for easier testing.
    
    Bug: https://bugs.gentoo.org/904263
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/ncurses/ncurses-6.4_p20230401.ebuild | 429 ++++++++++++++++++++++++++
 1 file changed, 429 insertions(+)
Comment 3 Holger Hoffstätte 2023-04-13 07:55:08 UTC
Hooray: the problem I mentioned in #904247 (wrong colours, (null) output everywhere) no longer presents itself with 6.4_p20230401. Editing text with joe also seems to work (brief test only).
Comment 4 Jan Psota 2023-04-13 08:28:43 UTC
It breaks joe, too:
    I    Unnamed                                                                  Row 1    Col 1    Joe's Own Editor 4.6 (utf-8) ** Type Ctrl-K Q to exit or Ctrl-K H for help **
Comment 5 Dmitry Suloev 2023-04-13 12:13:29 UTC
With sys-libs/ncurses-6.4_p20230401 all works fine, but sys-libs/ncurses-6.4_p20230408 breaks Vim. =(
Comment 6 Dmitry Suloev 2023-04-13 12:35:53 UTC
Seems like this bug also affects tmux somehow. Got two segfaults in server part today.
Comment 7 email200202 2023-04-13 14:02:04 UTC
I have the same problem with vim after the update sys-libs/ncurses-6.4_p20230408

In addition, the init.d scripts output is broken

~ # /etc/init.d/libvirtd start
 (null)*(null) Starting virtlogd(null) ...
(null)                                                                                                                                                                (null)[(null) ok (null)](null)
 (null)*(null) Starting libvirtd(null) ...
(null)                                                                                                                                                                (null)[(null) ok (null)](null)
Comment 8 Larry the Git Cow gentoo-dev 2023-04-13 16:56:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f216f091714951425b866d71dcb4fd1557d4ab2

commit 4f216f091714951425b866d71dcb4fd1557d4ab2
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-04-13 16:56:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-13 16:56:00 +0000

    profiles: mask =sys-libs/ncurses-6.4_p20230408
    
    Bug: https://bugs.gentoo.org/904247
    Bug: https://bugs.gentoo.org/904263
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 9 Thomas Dickey 2023-04-13 18:56:58 UTC
That's probably the parameterless "tsl" capability (which I thought was okay with the most recent patch -- it's a special case).  I'll fix this in the next patch.
Comment 10 Thomas Dickey 2023-04-13 19:12:36 UTC
There's not enough context in the comment https://bugs.gentoo.org/904247#c2 to guess why tparm would return a null, but perhaps someone will provide useful information over the next day or so.
Comment 11 Thomas Dickey 2023-04-13 23:19:32 UTC
Looks like https://bugs.gentoo.org/904277 is a duplicate of this.
Same answer: make OpenRC use the documented interface rather than
inventing new ways to use code which will be invalidated.
Comment 12 Thomas Dickey 2023-04-15 23:58:42 UTC
The no-parameter tsl fix is in 20230415.  If there are other problems,
a suitable bug report should be filed.  For general assistance with
preparing bug reports, see

https://invisible-island.net/personal/bug-reports.html
Comment 13 Larry the Git Cow gentoo-dev 2023-04-16 03:30:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36cb6e7e797ce084f8952716da8816e3613bedd0

commit 36cb6e7e797ce084f8952716da8816e3613bedd0
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-04-16 03:26:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-16 03:28:54 +0000

    sys-libs/ncurses: add 6.4_p20230415
    
    This should fix the issues with vim (bug #904263) but this version remains
    masked for now because OpenRC itself needs fixing due to abuse of ncurses
    (bug #904277).
    
    Bug: https://bugs.gentoo.org/904247
    Bug: https://bugs.gentoo.org/904277
    Closes: https://bugs.gentoo.org/904263
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask                         |   5 +
 sys-libs/ncurses/Manifest                     |   3 +
 sys-libs/ncurses/ncurses-6.4_p20230415.ebuild | 431 ++++++++++++++++++++++++++
 3 files changed, 439 insertions(+)
Comment 14 Larry the Git Cow gentoo-dev 2023-04-19 03:01:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f56513efdd057825ffaba9213e04553143dac41

commit 6f56513efdd057825ffaba9213e04553143dac41
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-04-19 02:37:55 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-19 02:38:39 +0000

    sys-libs/ncurses: add 6.4_p20230418
    
    Closes: https://bugs.gentoo.org/904263
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask                         |   1 +
 sys-libs/ncurses/Manifest                     |   3 +
 sys-libs/ncurses/ncurses-6.4_p20230418.ebuild | 432 ++++++++++++++++++++++++++
 3 files changed, 436 insertions(+)
Comment 15 Larry the Git Cow gentoo-dev 2024-04-06 08:25:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc92b4a3a8aafac2120438d89ea4e85d77006c97

commit dc92b4a3a8aafac2120438d89ea4e85d77006c97
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-04-06 08:24:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-06 08:24:36 +0000

    profiles: (finally) unmask ncurses
    
    OpenRC is now fixed.
    
    Bug: https://bugs.gentoo.org/904247
    Bug: https://bugs.gentoo.org/904263
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask | 11 -----------
 1 file changed, 11 deletions(-)