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

libtermkey: 0.20 -> 0.22 #59570

Merged
merged 1 commit into from Oct 9, 2019
Merged

Conversation

r-ryantm
Copy link
Contributor

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/libtermkey/versions.

meta.description for libtermkey is: '"Terminal keypress reading library"'.

Checks done (click to expand)
Rebuild report (if merged into master) (click to expand)

16 total rebuild path(s)

4 package rebuild(s)

4 x86_64-linux rebuild(s)
4 i686-linux rebuild(s)
4 x86_64-darwin rebuild(s)
4 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
libtermkey
neovim-qt
neovim-unwrapped
vis

Instructions to test this update (click to expand)

Either download from Cachix:

nix-store -r /nix/store/b4dvpcp8bavqd7hpfvgg9ncjz5c9jxkm-libtermkey-0.22 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)

Or, build yourself:

nix-build -A libtermkey https://github.com/r-ryantm/nixpkgs/archive/e4bdc0737bd1c242bed2f26cef9437dd3589c81f.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:

ls -la /nix/store/b4dvpcp8bavqd7hpfvgg9ncjz5c9jxkm-libtermkey-0.22
ls -la /nix/store/b4dvpcp8bavqd7hpfvgg9ncjz5c9jxkm-libtermkey-0.22/bin

Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/libtermkey/versions
@Mic92
Copy link
Member

Mic92 commented Apr 15, 2019

I strongly suspect this is breaking neovim:

$ gdb --args nvim -u NONE
GNU gdb (GDB) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from nvim...(no debugging symbols found)...done.
(gdb) bt
No stack.
(gdb) r
Starting program: /nix/store/pmllaiby3l9vkgjxc4hfzwn5jxdg1a4f-neovim-unwrapped-0.3.4/bin/nvim -u NONE
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libthread_db.so.1".
[New Thread 0x7fffee9e8700 (LWP 23748)]

Thread 2 "nvim" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffee9e8700 (LWP 23748)]
0x00007ffff7939fa6 in __strcmp_sse2_unaligned () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
(gdb) bt
#0  0x00007ffff7939fa6 in __strcmp_sse2_unaligned () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6
#1  0x00000000004f4939 in strequal ()
#2  0x0000000000573e7a in tui_tk_ti_getstr ()
#3  0x00007ffff7f35394 in try_load_terminfo_key () from /nix/store/b4dvpcp8bavqd7hpfvgg9ncjz5c9jxkm-libtermkey-0.22/lib/libtermkey.so.1
#4  0x00007ffff7f356bf in start_driver () from /nix/store/b4dvpcp8bavqd7hpfvgg9ncjz5c9jxkm-libtermkey-0.22/lib/libtermkey.so.1
#5  0x00007ffff7f31e16 in termkey_start () from /nix/store/b4dvpcp8bavqd7hpfvgg9ncjz5c9jxkm-libtermkey-0.22/lib/libtermkey.so.1
#6  0x0000000000579ca8 in term_input_init ()
#7  0x0000000000579e23 in tui_main ()
#8  0x00007ffff7f7def7 in start_thread () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libpthread.so.0
#9  0x00007ffff799f22f in clone () from /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libc.so.6

Please hold this update until the crash/issue is resolved!

@grahamc
Copy link
Member

grahamc commented Apr 15, 2019

@GrahamcOfBorg eval

@Mic92
Copy link
Member

Mic92 commented Apr 15, 2019

Has been also reported here already: #58308 (comment)

@Mic92
Copy link
Member

Mic92 commented Apr 15, 2019

It is not the same as neovim/neovim#9630
because there it was crashing in sprintf, while here it crashes in strequal.

@Mic92
Copy link
Member

Mic92 commented Apr 15, 2019

According to gef it crashes in this line due to an invalid pointer de-reference (0xffffffffffffffff) on this line:

https://github.com/neovim/neovim/blob/3441423481b7b2e7f127555633b62220aeca500b/src/nvim/tui/tui.c#L2000

gef➤  context
[ Legend: Modified register | Code | Heap | Stack | String ]
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── registers ────
$rax   : 0x7f
$rbx   : 0xffffffffffffffff
$rcx   : 0x45
$rdx   : 0x0
$rsp   : 0x00007fffee9e5d30  →  0x00007fffedc03090  →  0x00007fffedc2e000  →  0x00000108ffffffff
$rbp   : 0x000000000070e532  →  0xe53200000000007f
$rsi   : 0xffffffffffffffff
$rdi   : 0x000000000070e532  →  0xe53200000000007f
$rip   : 0x0000000000573e7a  →  <tui_tk_ti_getstr+154> test al, al
$r8    : 0x2066f
$r9    : 0x6
$r10   : 0x73
$r11   : 0x2
$r12   : 0x00007fffee9e5ee9  →  0x790063645f79656b ("key_dc"?)
$r13   : 0x0
$r14   : 0xffffffffffffffff
$r15   : 0xe
$eflags: [zero carry PARITY adjust sign trap INTERRUPT direction overflow RESUME virtualx86 identification]
$cs: 0x0033 $ss: 0x002b $ds: 0x0000 $es: 0x0000 $fs: 0x0000 $gs: 0x0000
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── stack ────
0x00007fffee9e5d30│+0x0000: 0x00007fffedc03090  →  0x00007fffedc2e000  →  0x00000108ffffffff     ← $rsp
0x00007fffee9e5d38│+0x0008: 0x00007fffee9e5ee9  →  0x790063645f79656b ("key_dc"?)
0x00007fffee9e5d40│+0x0010: 0x00007fffedc38140  →  0x00007fffedc50600  →  "xterm|xterm terminal emulator (X Window System)"
0x00007fffee9e5d48│+0x0018: 0x0000000000000000
0x00007fffee9e5d50│+0x0020: 0x0000000000000002
0x00007fffee9e5d58│+0x0028: 0x00007ffff787e963  →  <tigetstr_sp+243> test eax, eax
0x00007fffee9e5d60│+0x0030: 0x0000000f00bf0000
0x00007fffee9e5d68│+0x0038: 0x00007fffedc03090  →  0x00007fffedc2e000  →  0x00000108ffffffff
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── code:x86:64 ────
     0x573e6f <tui_tk_ti_getstr+143> mov    rsi, rbx
     0x573e72 <tui_tk_ti_getstr+146> mov    rdi, rbp
     0x573e75 <tui_tk_ti_getstr+149> call   0x4f4910 <strequal>
 →   0x573e7a <tui_tk_ti_getstr+154> test   al, al
     0x573e7c <tui_tk_ti_getstr+156> je     0x573e2b <tui_tk_ti_getstr+75>
     0x573e7e <tui_tk_ti_getstr+158> cmp    BYTE PTR [rbp+0x0], 0x7f
     0x573e82 <tui_tk_ti_getstr+162> lea    rbx, [rip+0xe2b66]        # 0x6569ef
     0x573e89 <tui_tk_ti_getstr+169> lea    rax, [rip+0xf49e3]        # 0x668873
     0x573e90 <tui_tk_ti_getstr+176> cmovne rbx, rax
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── threads ────
[#0] Id 1, Name: "nvim", stopped, reason: SIGSEGV
[#1] Id 2, Name: "nvim", stopped, reason: SIGSEGV
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── trace ────
[#0] 0x573e7a → tui_tk_ti_getstr()
[#1] 0x7ffff7f35394 → try_load_terminfo_key()
[#2] 0x7ffff7f356bf → start_driver()
[#3] 0x7ffff7f31e16 → termkey_start()
[#4] 0x579ca8 → term_input_init()
[#5] 0x579e23 → tui_main()
[#6] 0x7ffff7f7def7 → start_thread()
[#7] 0x7ffff799f22f → clone()

@mmahut
Copy link
Member

mmahut commented Aug 10, 2019

@GrahamcOfBorg build libtermkey neovim

@mmahut
Copy link
Member

mmahut commented Aug 12, 2019

ping @manveru @rvolosatovs do you mind looking at the neovim segfaul with latest libtermkey?

@Lassulus
Copy link
Member

Lassulus commented Oct 2, 2019

anything going on here? still segfaulting?

@rvolosatovs
Copy link
Member

It works fine for me on latest master(9906b88) with this diff:

diff --git a/pkgs/development/libraries/libtermkey/default.nix b/pkgs/development/libraries/libtermkey/default.nix
index 38a09218dd1..a30d3235411 100644
--- a/pkgs/development/libraries/libtermkey/default.nix
+++ b/pkgs/development/libraries/libtermkey/default.nix
@@ -3,11 +3,11 @@
 stdenv.mkDerivation rec {
   pname = "libtermkey";
 
-  version = "0.20";
+  version = "0.22";
 
   src = fetchzip {
     url = "http://www.leonerd.org.uk/code/libtermkey/libtermkey-${version}.tar.gz";
-    sha256 = "1i5a2zangq61ba1vdkag34ig5g4gzccldccdbcmqmk93saa6lkbx";
+    sha256 = "02dks6bj7n23lj005yq41azf95wh3hapmgc2lzyh12vigkjh67rg";
   };
 
   makeFlags = [ "PREFIX=$(out)" ]

Result of nix run nixpkgs.neovim -c nvim --cmd ':checkhealth':

health#nvim#check
========================================================================
## Configuration
  - WARNING: Missing user config file: /home/rvolosatovs/.config/nvim/init.vim
    - ADVICE:
      - :help |init.vim|

## Performance
  - OK: Build type: Release

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $COLORTERM='yes'

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: xclip

## Python 2 provider (optional)
  - INFO: Using: g:python_host_prog = "/nix/store/18pb0n028vjiwxknpj90pq2zrlmqfb55-neovim-0.4.2/bin/nvim-python"
  - INFO: Executable: /nix/store/18pb0n028vjiwxknpj90pq2zrlmqfb55-neovim-0.4.2/bin/nvim-python
  - INFO: Python version: 2.7.16
  - INFO: pynvim version: 0.3.2
  - OK: Latest pynvim is installed.

## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/nix/store/18pb0n028vjiwxknpj90pq2zrlmqfb55-neovim-0.4.2/bin/nvim-python3"
  - INFO: Executable: /nix/store/18pb0n028vjiwxknpj90pq2zrlmqfb55-neovim-0.4.2/bin/nvim-python3
  - INFO: Python version: 3.7.4
  - INFO: pynvim version: 0.3.2
  - OK: Latest pynvim is installed.

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.6.5p114 (2019-10-01) [x86_64-linux]
  - INFO: Host: /nix/store/18pb0n028vjiwxknpj90pq2zrlmqfb55-neovim-0.4.2/bin/nvim-ruby
  - OK: Latest "neovim" gem is installed: 0.8.0

## Node.js provider (optional)
  - INFO: Disabled. g:loaded_node_provider=1

@rvolosatovs
Copy link
Member

Works on nixos-unstable as well!

@Mic92 Mic92 merged commit aa22903 into NixOS:master Oct 9, 2019
@r-ryantm r-ryantm deleted the auto-update/libtermkey branch October 20, 2019 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants