[vim/vim] vi crash occasionally when opening large file (Issue #17935)

18 views
Skip to first unread message

sxt1001

unread,
Aug 8, 2025, 11:39:39 AMAug 8
to vim/vim, Subscribed
xiaoge1001 created an issue (vim/vim#17935)

Steps to reproduce

  1. Generate a very large file, such as: fallocate -l 10G bigfile
    2. vi bigfile
  2. After about 30 seconds, run ':q" doesn't exit, press ctrl-c, vi program coredump exits

Expected behaviour

vi exits normally without coredump

Version of Vim

9.0

Environment

openEuler

Logs and stack traces

Program terminated with signal SIGSEGV, Segmentation fault.

The stack is as follows:

#0  kill()
#1  may_core_dump() os_unix.c:3519
#2  may_core_dump() os_unix.c:3514
#3 mch_exit()  
#4 <signal handler called>
#5 __memmove_evex_unaligned_erma()
#6 memmove()
#7 ml_append_int()
#8 ml_append_flush()
#9 ml_append()
#10 readfile()
#11 open_buffer()
#12 create_windows()
#13 vim_main2()
#14 __libc_start_call_main()
#15 __libc_start_main_impl()
#16 _start()


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935@github.com>

Christian Brabandt

unread,
Aug 8, 2025, 11:53:59 AMAug 8
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17935)

What version? Did you try vim --clean? Can you please check latest master version?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3168375501@github.com>

sxt1001

unread,
Aug 8, 2025, 12:11:28 PMAug 8
to vim/vim, Subscribed
xiaoge1001 left a comment (vim/vim#17935)

What version? Did you try vim --clean? Can you please check latest master version?

I'm very sorry, there is an occasional problem. I tried to reproduce it again later, but it was not successful.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3168453323@github.com>

sxt1001

unread,
Aug 8, 2025, 12:12:17 PMAug 8
to vim/vim, Subscribed
xiaoge1001 left a comment (vim/vim#17935)

Other information can be found at:
#17936 (comment)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3168458316@github.com>

sxt1001

unread,
Aug 8, 2025, 12:21:26 PMAug 8
to vim/vim, Subscribed
xiaoge1001 left a comment (vim/vim#17935)

I don't try to run vim --clean, can this avoid such problems?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3168506366@github.com>

sxt1001

unread,
Aug 8, 2025, 12:22:54 PMAug 8
to vim/vim, Subscribed
xiaoge1001 left a comment (vim/vim#17935)

I will try to reproduce the problem again, but it may not necessarily be successfully reproduced


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3168514764@github.com>

Christian Brabandt

unread,
Aug 8, 2025, 2:36:23 PMAug 8
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17935)

please try to build a debugging version so we have a better strack trace. Using ASAN builds would also help.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3168969649@github.com>

sxt1001

unread,
Aug 15, 2025, 3:16:04 AMAug 15
to vim/vim, Subscribed
xiaoge1001 left a comment (vim/vim#17935)

Steps to reproduce:

dd if=/dev/zero bs=1M count=10240 | tr '\0' 'A' > bigline.txt
echo -n "A" >> bigline.txt
echo "" >> bigline.txt
vi bigline.txt   # crash after waiting for a certain period of time.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3190820830@github.com>

Christian Brabandt

unread,
Aug 15, 2025, 3:20:17 AMAug 15
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17935)

Please get a DEBUG build and show the stack trace


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3190826886@github.com>

Bryan B.H.

unread,
Aug 15, 2025, 5:07:08 AMAug 15
to vim/vim, Subscribed
he7850 left a comment (vim/vim#17935)

#0 0x00007effe859442b in kill () from /usr/lib64/libc.so.6
#1 0x000055eb07a57dc3 in may_core_dump () at os_unix.c:3519
#2 may_core_dump () at os_unix.c:3514
#3 mch_exit (r=1) at os_unix.c:3485
#4
#5 0x00007effe86e295f in ?? () from /usr/lib64/libc.so.6
#6 0x000055eb07a2cae2 in memmove (__len=, __src=, __dest=)
at /usr/include/bits/string_fortified.h:36
#7 ml_append_int (buf=0x55eb08dbf320, lnum=lnum@entry=0, line_arg=line_arg@entry=0x7eff67265010 'A' <repeats 200 times>...,
len_arg=, flags=flags@entry=1) at memline.c:2895
#8 0x000055eb07a2e5db in ml_append_flush (flags=1, len=, line=0x7eff67265010 'A' <repeats 200 times>..., lnum=0,
buf=) at memline.c:3325
#9 0x000055eb07a2e62d in ml_append (lnum=lnum@entry=0, line=line@entry=0x7eff67265010 'A' <repeats 200 times>...,
len=, newfile=newfile@entry=1) at memline.c:3347
#10 0x000055eb07a0841a in readfile (fname=0x55eb08dc3fe0 "bigline.txt", sfname=0x55eb08dc3fe0 "bigline.txt", from=from@entry=0,
lines_to_skip=lines_to_skip@entry=0, lines_to_read=lines_to_read@entry=9223372036854775807, eap=eap@entry=0x0, flags=1)
at fileio.c:2238
#11 0x000055eb079d2655 in open_buffer (read_stdin=0, eap=0x0, flags=0) at buffer.c:253
#12 0x000055eb07abc2a4 in create_windows (parmp=0x55eb07b1b6e0 ) at main.c:2902
#13 vim_main2 () at main.c:711
#14 0x00007effe8580390 in ?? () from /usr/lib64/libc.so.6
#15 0x00007effe858043c in __libc_start_main () from /usr/lib64/libc.so.6
#16 0x000055eb079c8895 in _start ()


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3191018876@github.com>

sxt1001

unread,
Sep 8, 2025, 4:56:31 AMSep 8
to vim/vim, Subscribed
xiaoge1001 left a comment (vim/vim#17935)

Hello, is anyone still following this issue?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3265278705@github.com>

sxt1001

unread,
1:08 AM (19 hours ago) 1:08 AM
to vim/vim, Subscribed
xiaoge1001 left a comment (vim/vim#17935)

Steps to reproduce:

dd if=/dev/zero bs=1M count=10240 | tr '\0' 'A' > bigline.txt
echo -n "A" >> bigline.txt
echo "" >> bigline.txt
vi bigline.txt   # crash after waiting for a certain period of time.

vim-9.1.1984 is still reproducible. It took a long time, and a segmentation fault occurred after about 1 hour.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3658986367@github.com>

Christian Brabandt

unread,
3:30 AM (16 hours ago) 3:30 AM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17935)

Please get a DEBUG build and show the stack trace

Still waiting on the above. Also, please reproduce using vim --clean, to rule out any customizations.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17935/3659371952@github.com>

Reply all
Reply to author
Forward
0 new messages