Babu
Babu

Reputation: 23

vi or vim doesn't start after Cygwin update

OS: Windows 10 Pro

Cygwin Setup: 2.889 (64 bit)

vim: 8.0.1567-1

terminal: mintty 2.8.4

cygwin: 2.10.0-1

I updated cygwin packages on 2018/03/09 and needed to restart OS to complete update. But some services were running so I didn't reboot at that time. In next day I rebooted my windows but found vi/vim command didn't response any more. Even I tried to enter vi, vim or vi -V, vim -v, vim text.txt the terminal only response nothing.

$ vi

$

I checked vi and vim still exist.

$ ls -l `which vi vim`
-rwxr-xr-x 1 bobchang None 1014803 三月  5 13:30 /usr/bin/vi
-rwxr-xr-x 1 bobchang None 2645011 三月  5 13:30 /usr/bin/vim

I checked setup.log vim was erased and installed.

2018/03/09 13:31:12    0   erase                    gvim          8.0.1567-1
2018/03/09 13:31:12    1 install                    gvim          8.0.1567-1
2018/03/09 13:31:12    2   erase                    vim          8.0.1567-1
2018/03/09 13:31:12    3 install                    vim          8.0.1567-1
2018/03/09 13:31:12    4   erase                    vim-common          8.0.1567-1
2018/03/09 13:31:12    5 install                    vim-common          8.0.1567-1
2018/03/09 13:31:12    6   erase                    vim-doc          8.0.1567-1
2018/03/09 13:31:12    7 install                    vim-doc          8.0.1567-1
2018/03/09 13:31:12    8   erase                    vim-minimal          8.0.1567-1
2018/03/09 13:31:12    9 install                    vim-minimal          8.0.1567-1
2018/03/09 13:31:17 running: C:\cygwin64\bin\bash.exe --norc --noprofile "/etc/preremove/vim.sh"
2018/03/09 13:31:17 Uninstalling gvim
2018/03/09 13:31:17 Uninstalling vim
2018/03/09 13:31:17 Uninstalling vim-common
2018/03/09 13:31:18 Uninstalling vim-doc
2018/03/09 13:31:19 Uninstalling vim-minimal

I manually removed and installed vim with related package but helpless.

Do anyone know how to solve this issue or how to debug to find the solution?

Upldate The result of cygcheck vim is

Found: C:\cygwin64\bin\vim.exe
Found: C:\Program Files (x86)\Vim\vim74\vim.exe
Found: C:\cygwin64\bin\vim.exe
C:\cygwin64\bin\vim.exe
  C:\cygwin64\bin\cygwin1.dll
    C:\WINDOWS\system32\KERNEL32.dll
      C:\WINDOWS\system32\ntdll.dll
      C:\WINDOWS\system32\KERNELBASE.dll
        C:\WINDOWS\system32\api-ms-win-eventing-provider-l1-1-0.dll
      C:\WINDOWS\system32\api-ms-win-core-processthreads-l1-1-1.dll
      C:\WINDOWS\system32\api-ms-win-core-synch-l1-2-0.dll
      C:\WINDOWS\system32\api-ms-win-core-file-l1-2-0.dll
      C:\WINDOWS\system32\api-ms-win-core-timezone-l1-1-0.dll
      C:\WINDOWS\system32\api-ms-win-core-localization-l1-2-0.dll
      C:\WINDOWS\system32\api-ms-win-core-file-l2-1-0.dll
      C:\WINDOWS\system32\api-ms-win-core-xstate-l2-1-0.dll
  C:\cygwin64\bin\cygiconv-2.dll
  C:\cygwin64\bin\cygintl-8.dll
  C:\cygwin64\bin\cygncursesw-10.dll
  C:\WINDOWS\system32\USER32.dll
    C:\WINDOWS\system32\win32u.dll
    C:\WINDOWS\system32\GDI32.dll

The result of strace /usr/bin/vim is The procedure entry point __memcpy_chk could not be located in the dynamic link library C:\cygwin64\bin\vim.exe.

$ strace /usr/bin/vim
--- Process 5056 created
--- Process 5056 loaded C:\Windows\System32\ntdll.dll at 00007ffed9350000
--- Process 5056 loaded C:\Windows\System32\kernel32.dll at 00007ffed8e10000
--- Process 5056 loaded C:\Windows\System32\KernelBase.dll at 00007ffed6510000
--- Process 5056 thread 10048 created
--- Process 5056 thread 2488 created
--- Process 5056 thread 212 created
--- Process 5056 loaded C:\Windows\System32\user32.dll at 00007ffed8bc0000
--- Process 5056 loaded C:\cygwin64\bin\cygiconv-2.dll at 00000003f4050000
--- Process 5056 loaded C:\cygwin64\bin\cygwin1.dll at 0000000180040000
--- Process 5056 loaded C:\Windows\System32\win32u.dll at 00007ffed59e0000
--- Process 5056 loaded C:\Windows\System32\gdi32.dll at 00007ffed8390000
--- Process 5056 loaded C:\cygwin64\bin\cygncursesw-10.dll at 00000003f3430000
--- Process 5056 loaded C:\cygwin64\bin\cygintl-8.dll at 00000003f3fa0000
--- Process 5056 loaded C:\Windows\System32\gdi32full.dll at 00007ffed5a50000
--- Process 5056 loaded C:\Windows\System32\msvcp_win.dll at 00007ffed6780000
--- Process 5056 loaded C:\Windows\System32\ucrtbase.dll at 00007ffed57d0000
--- Process 5056 thread 212 exited with status 0x0
--- Process 5056 thread 10048 exited with status 0x0
--- Process 5056 thread 2488 exited with status 0x0
--- Process 5056, exception c0000139 at 00007ffed9352b10
--- Process 5056 exited with status 0xc0000139

Upvotes: 2

Views: 1038

Answers (1)

matzeri
matzeri

Reputation: 8496

__memcpy_chk belongs to cygwin1.dll

It was added on the last release
https://www.cygwin.com/ml/cygwin-announce/2018-02/msg00002.html

Reinstall the cygwin package as it seems was not correctly upgraded.

Upvotes: 3

Related Questions