Bug 281010 - sysutils/vimpager broken with vim=>9.1.0652
Summary: sysutils/vimpager broken with vim=>9.1.0652
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-23 11:01 UTC by Anton Saietskii
Modified: 2024-11-15 13:30 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Saietskii 2024-08-23 11:01:21 UTC
After upgrading vim to 9.1.0652, I noticed that vimpager/vimcat don't work anymore -- just hangs without any output and doesn't react to ^C. ps shows the following:
$ ps auwwx | grep '[v]'im
jason        72563   0.0  0.0   13480   2660  5  S+   13:59       0:00.00 /bin/sh /usr/local/bin/vimcat .history
jason        72567   0.0  0.0   19768   9996  5  S+   13:59       0:00.02 vim -NEnR -i NONE +\n        let g:tab_stop = 8\n        if ! &et\n            let g:tab_stop = &ts\n        endif\n        call writefile([""] + map([g:tab_stop], "\\"VAL:\\".v:val"), "/dev/stderr")\n        quit\n
Comment 1 Zsolt Udvari freebsd_committer freebsd_triage 2024-08-23 18:20:23 UTC
Your control-c doesn't work because of trap (https://github.com/rkitover/vimpager/blob/master/vimpager#L146).
The read_vim_settings function hangs.
Could you debug it?
Comment 2 Anton Saietskii 2024-08-23 18:31:29 UTC
(In reply to Zsolt Udvari from comment #1)

Here's what 'set -x' shows:

$ vimcat .history
+ [ -n '' ]
+ version='2.06 (configured, shell=/bin/sh)'
+ runtime=/usr/local/share/vimpager
+ [ -n '' ]
+ command -v vim.basic
+ command -v vim
+ vim=vim
+ tab_stop=8
+ [ 1 -eq 0 -a -t 0 ]
+ tmp_dir=/tmp
+ mkdir_options='-m 700'
+ uname -s
+ tmp_dir=/tmp/vimcat_73629
+ mkdir -m 700 /tmp/vimcat_73629
+ trap 'quit 1' PIPE HUP INT QUIT ILL TRAP KILL BUS TERM
+ tmp_file_in=/tmp/vimcat_73629/vimcat_in.txt
+ out_fifo=/tmp/vimcat_73629/vimcat_out.fifo
+ mkfifo /tmp/vimcat_73629/vimcat_out.fifo
+ [ 1 -gt 0 ]
+ break
+ [ -d .history ]
+ [ -z '' ]
+ [ ! -t 1 ]
+ [ -z '' ]
+ [ -f /home/jason/.vimcatrc ]
+ vimcatrc=''
+ [ 1 -eq 0 ]
+ [ -n '' -a 1 -gt 1 ]
+ read_vim_settings
+ i=1
+ OLDIFS=$' \t
'
+ IFS='
'
+ IFS=$' \t
'
+ vim -NEnR -i NONE '+
        let g:tab_stop = 8
        if ! &et
            let g:tab_stop = &ts
        endif
        call writefile([""] + map([g:tab_stop], "\"VAL:\".v:val"), "/dev/stderr")
        quit
    '
Comment 3 Zsolt Udvari freebsd_committer freebsd_triage 2024-08-23 18:37:16 UTC
(In reply to Anton Saietskii from comment #2)
And why does vim hang?
Comment 4 Anton Saietskii 2024-08-23 18:54:54 UTC
(In reply to Zsolt Udvari from comment #3)

Got no idea. Any clues?
Comment 5 Zsolt Udvari freebsd_committer freebsd_triage 2024-08-23 19:38:10 UTC
(In reply to Anton Saietskii from comment #4)
I'd run only the vim with the options and find which option or code line causes the problem.
Now I don't have time so I can't do it now.
Comment 6 Anton Saietskii 2024-08-28 11:23:23 UTC
// Adam, sorry for bothering you, but as a person who did most of the commits to vimpager, you may also use it I guess.

Currently, I'm thinking of what to do next with this. Perhaps ktrace?
Comment 7 Zsolt Udvari freebsd_committer freebsd_triage 2024-11-12 18:26:01 UTC
Could you please test this commit?
https://github.com/rkitover/vimpager/commit/ce697c4cf34549796e1b533be3e337ca24b62c09
Comment 8 Anton Saietskii 2024-11-15 13:30:07 UTC
(In reply to Zsolt Udvari from comment #7)

I have vim-9.1.0764 installed currently, and can't reproduce issue anymore. Good to know though that it's acknowledged by upstream.