Skip to content

Bug(nvim): Saving too fast between code changes results in a SIGSEGV #406

@Ovsiankina

Description

@Ovsiankina

Bug Description

Having the habit of manually saving with ":w" very fast between minor changes in code results in big lag spikes inside a buffer which uses RustOwl.
This seems to be an issue only on medium to big projects.

We can define a "medium to big project" as one that makes rust-analyzer store at least 700M in the RAM.
According to 'htop', the rustlings project stores 805M on my machine.

Step to reproduce (linux):

  1. Install rustlings by following the installation guide as normal and run rustlings init in the directory of your choice.
  2. Enter the project with neovim and open the file "./exercises/12_options/options2.rs".
  3. Go on line 32 ( integer = optional_integers.pop() { )
  4. remove '{' and save the file with ":w"
  5. undo with 'u' and save again as fast as possible
  6. repeat step 4 and 5 as fast as you can until you experience a lag spike
  7. Verify the nature of the coredump with this command: coredumpctl | head -n 1 && coredumpctl | tail
  8. run coredumpctl info [pid] with the one of the PID you got from step 7.

My output of step 8:

           PID: 801921 (rustowlc)
           UID: 1000 (ovsiankina)
           GID: 1000 (ovsiankina) 
        Signal: 11 (SEGV)
     Timestamp: Wed 2025-08-27 15:20:39 CEST (13min ago)
  Command Line: /usr/bin/rustowlc /usr/bin/rustowlc --crate-name from_into --edition=2024 exercises/23_conversions/from_into.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --forbid=unstable_features --forbid=unsafe_code --forbid=clippy::todo --deny=clippy::mem_forget --deny=clippy::infinite_loop --forbid=clippy::empty_loop --allow=clippy::disallowed_methods --allow=dead_code --test --check-cfg $'cfg(docsrs,test)' --check-cfg $'cfg(feature, values())' -C metadata=23a0e68acb18a38c -C extra-filename=-92c2d9df69c54f58 --out-dir /home/ovsiankina/[redacted]/tests/rustowl-lag/rustlings/target/owl/debug/deps -C incremental=/home/ovsiankina/[redacted]/tests/rustowl-lag/rustlings/target/owl/debug/incremental -L dependency=/home/ovsiankina/[redacted]/tests/rustowl-lag/rustlings/target/owl/debug/deps --sysroot=/usr/bin/rustowl-runtime/sysroot/1.87.0-x86_64-unknown-linux-gnu
    Executable: /usr/bin/rustowlc
 Control Group: /user.slice/user-1000.slice/user@1000.service/tmux-spawn-6ead48a7-41d3-4a04-a62c-f2ca0ff14f3d.scope
          Unit: user@1000.service
     User Unit: tmux-spawn-6ead48a7-41d3-4a04-a62c-f2ca0ff14f3d.scope
         Slice: user-1000.slice
     Owner UID: 1000 (ovsiankina)
       Boot ID: [redacted]
    Machine ID: [redacted]
      Hostname: [redacted]
       Storage: /var/lib/systemd/coredump/core.rustowlc.1000.9e6898c0e524460eb46df1271b66e500.801921.1756300839000000.zst (present)
  Size on Disk: 4.4M
       Message: Process 801921 (rustowlc) of user 1000 dumped core.
                
                Module /usr/bin/rustowlc without build-id.
                Module libLLVM.so.20.1-rust-1.87.0-stable without build-id.
                Module librustc_driver-9c23edfdcf82221e.so without build-id.
                Stack trace of thread 802013:
                #0  0x00007f9cae6ae414 rust_eh_personality (librustc_driver-9c23edfdcf82221e.so + 0x64ae414)
                #1  0x000055c7f18b6b44 n/a (/usr/bin/rustowlc + 0x10ab44)
                #2  0x000055c7f18b6bea n/a (/usr/bin/rustowlc + 0x10abea)
                #3  0x000055c7f1866fc2 n/a (/usr/bin/rustowlc + 0xbafc2)
                #4  0x000055c7f185edb4 n/a (/usr/bin/rustowlc + 0xb2db4)
                #5  0x000055c7f185c3a2 n/a (/usr/bin/rustowlc + 0xb03a2)
                #6  0x00007f9cae3bda91 _RINvNtCsdCJxCJxV7jC_16rustc_query_impl8plumbing28___rust_begin_short_backtraceNCNCNvNtNtB4_10query_impl12mir_borrowck13dynamic_querys0_00INtNtNtCsl6euo3gBA1L_12rustc_middle5query5erase6ErasedAhj8_EEB4_ (librustc_driver-9c23edfdcf82221e.so + 0x61bda91)
                #7  0x00007f9cad5f43ac _RINvNtNtCs9KIAUIMzaMq_18rustc_query_system5query8plumbing17try_execute_queryINtCsdCJxCJxV7jC_16rustc_query_impl13DynamicConfigINtNtCsdDPRgqS1S43_21rustc_data_structures9vec_cache8VecCacheNtNtCsfQ3elz1mfOh_10rustc_span6def_id10LocalDefIdINtNtNtCsl6euo3gBA1L_12rustc_middle5query5erase6ErasedAhj8_ENtNtNtB6_9dep_graph5graph12DepNodeIndexEKb0_KB5p_KB5p_ENtNtB1f_8plumbing9QueryCtxtKB5p_EB1f_ (librustc_driver-9c23edfdcf82221e.so + 0x53f43ac)
                #8  0x00007f9cad5f3e0b _RNvNtNtNtCsdCJxCJxV7jC_16rustc_query_impl10query_impl12mir_borrowck18get_query_non_incr26___rust_end_short_backtrace (librustc_driver-9c23edfdcf82221e.so + 0x53f3e0b)
                #9  0x00007f9cadc3d693 _RNvNtCs6PtJWl2j4pF_15rustc_interface6passes21run_required_analyses (librustc_driver-9c23edfdcf82221e.so + 0x5a3d693)
                #10 0x00007f9cadcf639e _RNvNtCs6PtJWl2j4pF_15rustc_interface6passes8analysis (librustc_driver-9c23edfdcf82221e.so + 0x5af639e)
                #11 0x00007f9cadcf636d _RINvNtCsdCJxCJxV7jC_16rustc_query_impl8plumbing28___rust_begin_short_backtraceNCNCNvNtNtB4_10query_impl8analysis13dynamic_querys0_00INtNtNtCsl6euo3gBA1L_12rustc_middle5query5erase6ErasedAhj0_EEB4_ (librustc_driver-9c23edfdcf82221e.so + 0x5af636d)
                #12 0x00007f9cae18897d _RINvNtNtCs9KIAUIMzaMq_18rustc_query_system5query8plumbing17try_execute_queryINtCsdCJxCJxV7jC_16rustc_query_impl13DynamicConfigINtNtB4_6caches11SingleCacheINtNtNtCsl6euo3gBA1L_12rustc_middle5query5erase6ErasedAhj0_EEKb0_KB3s_KB3s_ENtNtB1f_8plumbing9QueryCtxtKB3s_EB1f_ (librustc_driver-9c23edfdcf82221e.so + 0x5f8897d)
                #13 0x00007f9cae188678 _RNvNtNtNtCsdCJxCJxV7jC_16rustc_query_impl10query_impl8analysis18get_query_non_incr26___rust_end_short_backtrace (librustc_driver-9c23edfdcf82221e.so + 0x5f88678)
                #14 0x00007f9cae331e87 _RNCNCINvNtCs6PtJWl2j4pF_15rustc_interface6passes28create_and_enter_global_ctxtINtNtCs9sjCchOt1K7_4core6option6OptionNtNtB8_7queries6LinkerENCNCNvCsj20AIVrSq7d_17rustc_driver_impl12run_compiler0s0_0Es0_00B2j_ (librustc_driver-9c23edfdcf82221e.so + 0x6131e87)
                #15 0x00007f9cae323eaa _RNCINvNtCs6PtJWl2j4pF_15rustc_interface9interface12run_compileruNCNvCsj20AIVrSq7d_17rustc_driver_impl12run_compiler0Es_0B14_ (librustc_driver-9c23edfdcf82221e.so + 0x6123eaa)
                #16 0x00007f9cae164f08 _RINvNtNtCseJswNlh1fGO_3std3sys9backtrace28___rust_begin_short_backtraceNCNCINvNtCs6PtJWl2j4pF_15rustc_interface4util26run_in_thread_with_globalsNCINvB1e_31run_in_thread_pool_with_globalsNCINvNtB1g_9interface12run_compileruNCNvCsj20AIVrSq7d_17rustc_driver_impl12run_compiler0Es_0uE0uE00uEB3C_ (librustc_driver-9c23edfdcf82221e.so + 0x5f64f08)
                #17 0x00007f9cae1657f4 _RNSNvYNCINvMNtCseJswNlh1fGO_3std6threadNtBa_7Builder16spawn_unchecked_NCNCINvNtCs6PtJWl2j4pF_15rustc_interface4util26run_in_thread_with_globalsNCINvB1d_31run_in_thread_pool_with_globalsNCINvNtB1f_9interface12run_compileruNCNvCsj20AIVrSq7d_17rustc_driver_impl12run_compiler0Es_0uE0uE00uEs_0INtNtNtCs9sjCchOt1K7_4core3ops8function6FnOnceuE9call_once6vtableB3B_ (librustc_driver-9c23edfdcf82221e.so + 0x5f657f4)
                #18 0x00007f9cae166bf7 _ZN3std3sys3pal4unix6thread6Thread3new12thread_start17h2717d4f9aca577e6E (librustc_driver-9c23edfdcf82221e.so + 0x5f66bf7)
                #19 0x00007f9ca7e969cb n/a (libc.so.6 + 0x969cb)
                #20 0x00007f9ca7f1aa0c n/a (libc.so.6 + 0x11aa0c)
                
                Stack trace of thread 802118:
                #0  0x00007f9ca7f1876d syscall (libc.so.6 + 0x11876d)
                #1  0x00007f9caca9b9d5 _ZN3std3sys4sync7condvar5futex7Condvar4wait17h684bd65cd207e576E (librustc_driver-9c23edfdcf82221e.so + 0x489b9d5)
                #2  0x000055c7f1879cb9 n/a (/usr/bin/rustowlc + 0xcdcb9)
                #3  0x000055c7f1883153 n/a (/usr/bin/rustowlc + 0xd7153)
                #4  0x000055c7f186b267 n/a (/usr/bin/rustowlc + 0xbf267)
                #5  0x000055c7f187150b n/a (/usr/bin/rustowlc + 0xc550b)
                #6  0x00007f9cae166bf7 _ZN3std3sys3pal4unix6thread6Thread3new12thread_start17h2717d4f9aca577e6E (librustc_driver-9c23edfdcf82221e.so + 0x5f66bf7)
                #7  0x00007f9ca7e969cb n/a (libc.so.6 + 0x969cb)
                #8  0x00007f9ca7f1aa0c n/a (libc.so.6 + 0x11aa0c)
                
                Stack trace of thread 802121:
                #0  0x00007f9ca7f1876d syscall (libc.so.6 + 0x11876d)
                #1  0x00007f9caca9b9d5 _ZN3std3sys4sync7condvar5futex7Condvar4wait17h684bd65cd207e576E (librustc_driver-9c23edfdcf82221e.so + 0x489b9d5)
                #2  0x000055c7f1879cb9 n/a (/usr/bin/rustowlc + 0xcdcb9)
                #3  0x000055c7f1883153 n/a (/usr/bin/rustowlc + 0xd7153)
                #4  0x000055c7f186b267 n/a (/usr/bin/rustowlc + 0xbf267)
                #5  0x000055c7f187150b n/a (/usr/bin/rustowlc + 0xc550b)
                #6  0x00007f9cae166bf7 _ZN3std3sys3pal4unix6thread6Thread3new12thread_start17h2717d4f9aca577e6E (librustc_driver-9c23edfdcf82221e.so + 0x5f66bf7)
                #7  0x00007f9ca7e969cb n/a (libc.so.6 + 0x969cb)
                #8  0x00007f9ca7f1aa0c n/a (libc.so.6 + 0x11aa0c)
                
                Stack trace of thread 802122:
                #0  0x00007f9ca7f1876d syscall (libc.so.6 + 0x11876d)
                #1  0x00007f9caca9b9d5 _ZN3std3sys4sync7condvar5futex7Condvar4wait17h684bd65cd207e576E (librustc_driver-9c23edfdcf82221e.so + 0x489b9d5)
                #2  0x000055c7f1879cb9 n/a (/usr/bin/rustowlc + 0xcdcb9)
                #3  0x000055c7f1883153 n/a (/usr/bin/rustowlc + 0xd7153)
                #4  0x000055c7f186b267 n/a (/usr/bin/rustowlc + 0xbf267)
                #5  0x000055c7f187150b n/a (/usr/bin/rustowlc + 0xc550b)
                #6  0x00007f9cae166bf7 _ZN3std3sys3pal4unix6thread6Thread3new12thread_start17h2717d4f9aca577e6E (librustc_driver-9c23edfdcf82221e.so + 0x5f66bf7)
                #7  0x00007f9ca7e969cb n/a (libc.so.6 + 0x969cb)
                #8  0x00007f9ca7f1aa0c n/a (libc.so.6 + 0x11aa0c)
                
                Stack trace of thread 801921:
                #0  0x00007f9ca7e9f042 n/a (libc.so.6 + 0x9f042)
                #1  0x00007f9ca7e931ac n/a (libc.so.6 + 0x931ac)
                #2  0x00007f9ca7e9381c n/a (libc.so.6 + 0x9381c)
                #3  0x00007f9ca7e9874c n/a (libc.so.6 + 0x9874c)
                #4  0x00007f9cae1654d1 _ZN3std3sys3pal4unix6thread6Thread4join17he4d2538daeee3b48E (librustc_driver-9c23edfdcf82221e.so + 0x5f654d1)
                #5  0x00007f9cae165569 _RNvMs6_NtCseJswNlh1fGO_3std6threadINtB5_9JoinInneruE4joinCsj20AIVrSq7d_17rustc_driver_impl (librustc_driver-9c23edfdcf82221e.so + 0x5f65569)
                #6  0x00007f9cae1d4631 _RNvCsj20AIVrSq7d_17rustc_driver_impl12run_compiler (librustc_driver-9c23edfdcf82221e.so + 0x5fd4631)
                #7  0x000055c7f185fcc4 n/a (/usr/bin/rustowlc + 0xb3cc4)
                #8  0x000055c7f18606b7 n/a (/usr/bin/rustowlc + 0xb46b7)
                #9  0x000055c7f181b053 n/a (/usr/bin/rustowlc + 0x6f053)
                #10 0x000055c7f181aff9 n/a (/usr/bin/rustowlc + 0x6eff9)
                #11 0x00007f9cae167f9e _ZN3std2rt19lang_start_internal17h418648f91f5be3a1E (librustc_driver-9c23edfdcf82221e.so + 0x5f67f9e)
                #12 0x000055c7f18608a5 n/a (/usr/bin/rustowlc + 0xb48a5)
                #13 0x00007f9ca7e27675 n/a (libc.so.6 + 0x27675)
                #14 0x00007f9ca7e27729 __libc_start_main (libc.so.6 + 0x27729)
                #15 0x000055c7f17ee7ba n/a (/usr/bin/rustowlc + 0x427ba)
                
                Stack trace of thread 802124:
                #0  0x00007f9ca7f1876d syscall (libc.so.6 + 0x11876d)
                #1  0x00007f9caca9b9d5 _ZN3std3sys4sync7condvar5futex7Condvar4wait17h684bd65cd207e576E (librustc_driver-9c23edfdcf82221e.so + 0x489b9d5)
                #2  0x000055c7f1879cb9 n/a (/usr/bin/rustowlc + 0xcdcb9)
                #3  0x000055c7f1883153 n/a (/usr/bin/rustowlc + 0xd7153)
                #4  0x000055c7f186b267 n/a (/usr/bin/rustowlc + 0xbf267)
                #5  0x000055c7f187150b n/a (/usr/bin/rustowlc + 0xc550b)
                #6  0x00007f9cae166bf7 _ZN3std3sys3pal4unix6thread6Thread3new12thread_start17h2717d4f9aca577e6E (librustc_driver-9c23edfdcf82221e.so + 0x5f66bf7)
                #7  0x00007f9ca7e969cb n/a (libc.so.6 + 0x969cb)
                #8  0x00007f9ca7f1aa0c n/a (libc.so.6 + 0x11aa0c)
                
                Stack trace of thread 802123:
                #0  0x00007f9ca7f1876d syscall (libc.so.6 + 0x11876d)
                #1  0x00007f9caca9b9d5 _ZN3std3sys4sync7condvar5futex7Condvar4wait17h684bd65cd207e576E (librustc_driver-9c23edfdcf82221e.so + 0x489b9d5)
                #2  0x000055c7f1879cb9 n/a (/usr/bin/rustowlc + 0xcdcb9)
                #3  0x000055c7f1883153 n/a (/usr/bin/rustowlc + 0xd7153)
                #4  0x000055c7f186b267 n/a (/usr/bin/rustowlc + 0xbf267)
                #5  0x000055c7f187150b n/a (/usr/bin/rustowlc + 0xc550b)
                #6  0x00007f9cae166bf7 _ZN3std3sys3pal4unix6thread6Thread3new12thread_start17h2717d4f9aca577e6E (librustc_driver-9c23edfdcf82221e.so + 0x5f66bf7)
                #7  0x00007f9ca7e969cb n/a (libc.so.6 + 0x969cb)
                #8  0x00007f9ca7f1aa0c n/a (libc.so.6 + 0x11aa0c)
                
                Stack trace of thread 802117:
                #0  0x00007f9ca7e9f042 n/a (libc.so.6 + 0x9f042)
                #1  0x00007f9ca7e931ac n/a (libc.so.6 + 0x931ac)
                #2  0x00007f9ca7e931f4 n/a (libc.so.6 + 0x931f4)
                #3  0x00007f9ca7f1acf5 epoll_wait (libc.so.6 + 0x11acf5)
                #4  0x000055c7f18767d6 n/a (/usr/bin/rustowlc + 0xca7d6)
                #5  0x000055c7f1877714 n/a (/usr/bin/rustowlc + 0xcb714)
                #6  0x000055c7f1879bc0 n/a (/usr/bin/rustowlc + 0xcdbc0)
                #7  0x000055c7f1883153 n/a (/usr/bin/rustowlc + 0xd7153)
                #8  0x000055c7f186b267 n/a (/usr/bin/rustowlc + 0xbf267)
                #9  0x000055c7f187150b n/a (/usr/bin/rustowlc + 0xc550b)
                #10 0x00007f9cae166bf7 _ZN3std3sys3pal4unix6thread6Thread3new12thread_start17h2717d4f9aca577e6E (librustc_driver-9c23edfdcf82221e.so + 0x5f66bf7)
                #11 0x00007f9ca7e969cb n/a (libc.so.6 + 0x969cb)
                #12 0x00007f9ca7f1aa0c n/a (libc.so.6 + 0x11aa0c)
                
                Stack trace of thread 802119:
                #0  0x00007f9ca7f1876d syscall (libc.so.6 + 0x11876d)
                #1  0x00007f9caca9b9d5 _ZN3std3sys4sync7condvar5futex7Condvar4wait17h684bd65cd207e576E (librustc_driver-9c23edfdcf82221e.so + 0x489b9d5)
                #2  0x000055c7f1879cb9 n/a (/usr/bin/rustowlc + 0xcdcb9)
                #3  0x000055c7f1883153 n/a (/usr/bin/rustowlc + 0xd7153)
                #4  0x000055c7f186b267 n/a (/usr/bin/rustowlc + 0xbf267)
                #5  0x000055c7f187150b n/a (/usr/bin/rustowlc + 0xc550b)
                #6  0x00007f9cae166bf7 _ZN3std3sys3pal4unix6thread6Thread3new12thread_start17h2717d4f9aca577e6E (librustc_driver-9c23edfdcf82221e.so + 0x5f66bf7)
                #7  0x00007f9ca7e969cb n/a (libc.so.6 + 0x969cb)
                #8  0x00007f9ca7f1aa0c n/a (libc.so.6 + 0x11aa0c)
                
                Stack trace of thread 802120:
                #0  0x00007f9ca7f1876d syscall (libc.so.6 + 0x11876d)
                #1  0x00007f9caca9b9d5 _ZN3std3sys4sync7condvar5futex7Condvar4wait17h684bd65cd207e576E (librustc_driver-9c23edfdcf82221e.so + 0x489b9d5)
                #2  0x000055c7f1879cb9 n/a (/usr/bin/rustowlc + 0xcdcb9)
                #3  0x000055c7f1883153 n/a (/usr/bin/rustowlc + 0xd7153)
                #4  0x000055c7f186b267 n/a (/usr/bin/rustowlc + 0xbf267)
                #5  0x000055c7f187150b n/a (/usr/bin/rustowlc + 0xc550b)
                #6  0x00007f9cae166bf7 _ZN3std3sys3pal4unix6thread6Thread3new12thread_start17h2717d4f9aca577e6E (librustc_driver-9c23edfdcf82221e.so + 0x5f66bf7)
                #7  0x00007f9ca7e969cb n/a (libc.so.6 + 0x969cb)
                #8  0x00007f9ca7f1aa0c n/a (libc.so.6 + 0x11aa0c)
                ELF object binary architecture: AMD x86-64

Environment

  • OS: Arch Linux x86_64
  • Kernel: Linux 6.16.3-arch1-1
  • rustc v1.89.0
  • rustup N\A => I use rust 1:1.89.0-1 pkg (According to ArchLinux wiki, using rust instead of rustup is not recommanded)
  • RustOwl v0.3.4
  • Neovim v0.11.3

My neovim configuration for rustowl.nvim:

return {
    'cordx56/rustowl',
    version = '*', -- Latest stable version
    build = 'cargo binstall rustowl',
    ft = 'rust',
    lazy = false, -- This plugin is already lazy
    opts = {
        client = {
            on_attach = function(_, buffer)
                Keymaps.rustowl(buffer) -- Simple global lua module to store my keybindings (see below)
            end,
        },
    },
}

-- === keymaps module ===
M.rustowl = function(buffer)
    vim.keymap.set('n', '<leader>o', function()
        require('rustowl').toggle(buffer)
    end, { buffer = buffer, desc = 'Toggle RustOwl' })
end

I will try rustup instead of rust and update this report if I notice any change.

Best regards,

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdont-closeDon't close this issue or pull request.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions