macos X11-Athena test_gui.vim Segmentation fault

18 views
Skip to first unread message

raf

unread,
Dec 30, 2020, 7:19:31 PM12/30/20
to vim...@googlegroups.com
Hi,

Happy New Year Bram et al!

I just tried to compile and test vim for the
first time in ages and got a segmentation fault.

Environment:

macos-10.14.6
vim-8.2 patches 1-2251
XQuartz 2.7.11 (xorg-server 1.18.4)
(plus other xorg stuff via macports might be relevant)

Configure:

./configure \
--disable-darwin \
--with-x \
--enable-gui=athena \
--enable-multibyte \
--with-mac-arch=current \
--with-features=huge \
--disable-acl

Compiler:

> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.16)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Dynamic links:

> otool -L src/vim
src/vim:
/opt/local/lib/libXaw.7.dylib (compatibility version 8.0.0, current version 8.0.0)
/opt/local/lib/libXmu.6.dylib (compatibility version 9.0.0, current version 9.0.0)
/opt/local/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/opt/local/lib/libXpm.4.dylib (compatibility version 16.0.0, current version 16.0.0)
/opt/local/lib/libXt.6.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libX11.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/opt/local/lib/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0)
/opt/local/lib/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
/opt/local/lib/libncurses.6.dylib (compatibility version 6.0.0, current version 6.0.0)
/opt/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)

Test:

The first time, test_gui.vim crashed after a 32 second pause.
The second time, it crashed after 222 seconds.

VIMRUNTIME=../../runtime ../vim -f -u unix.vim -u NONE -U NONE --noplugin --not-a-term -S runtest.vim test_gui.vim


Vim: Caught deadly signal SEGV
Vim: Finished.

"test.log" [New]
"test.log"
"test.log" [New] 5L, 87B written
^[[1mExecuted 11 tests in 222.290445 seconds^[[m
1 FAILED:
"messages"
"messages" 1311L, 86050B
"messages"
"messages" 1330L, 87126B writtenmake[2]: *** [test_gui.res] Segmentation fault: 11 (core dumped)
make[1]: *** [scripttests] Error 2
make: *** [test] Error 2

The src/testdir/test.log file contains:

From test_gui.vim:
Found errors in Test_menu():
Test caused Vim to exit: Test_menu()

There is no test_gui.res file.

The src/testdir/message file ends with this:

From test_gui.vim:
^[[1mExecuted Test_1_set_secure() in 1.235305 seconds^[[m
Executed Test_balloon_show() in 0.000347 seconds
^[[1mExecuted Test_colorscheme() in 1.629247 seconds^[[m
Skipped
Executed Test_encoding_conversion() in 0.000283 seconds
Executed Test_getfontname_with_arg() in 0.018520 seconds
Executed Test_getfontname_without_arg() in 0.002640 seconds
Executed Test_getwinpos() in 0.000318 seconds
^[[1mExecuted Test_gui_dash_g() in 0.251007 seconds^[[m
^[[1mExecuted Test_gui_dash_y() in 0.286530 seconds^[[m
Executed Test_gui_recursive_mapping() in 0.000890 seconds
^[[1mExecuted Test_gui_run_cmd_in_terminal() in 218.827624 seconds^[[m
^[[1mExecuted 11 tests in 222.290445 seconds^[[m
1 FAILED:
Found errors in Test_menu():
Test caused Vim to exit: Test_menu()
SKIPPED Test_encoding_conversion(): gui_gtk feature missing

The backtrace is:

> lldb src/vim -c /cores/core.41972
(lldb) target create "src/vim" --core "/cores/core.41972"
Core file '/cores/core.41972' (x86_64) was loaded.
(lldb) bt
warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.
* thread #1, stop reason = signal SIGSTOP
* frame #0: 0x00007fff6aa8fbf6 libsystem_kernel.dylib`__kill + 10
frame #1: 0x000000010229ff6b vim`mch_exit [inlined] may_core_dump at os_unix.c:3432:2 [opt]
frame #2: 0x000000010229ff43 vim`mch_exit(r=0) at os_unix.c:3398 [opt]
frame #3: 0x00000001023fc838 vim`getout(exitval=0) at main.c:1689:5 [opt]
frame #4: 0x00000001021facd4 vim`ex_quit_all(eap=0x0000000102944cf0) at ex_docmd.c:5455:2 [opt]
frame #5: 0x00000001021f13ac vim`do_cmdline [inlined] do_one_cmd(cmdlinep=<unavailable>, flags=7, cstack=0x0000000000000000, fgetline=<unavailable>, cookie=0x00007fdbb1813200) at ex_docmd.c:2588:2 [opt]
frame #6: 0x00000001021efeda vim`do_cmdline(cmdline=<unavailable>, fgetline=<unavailable>, cookie=<unavailable>, flags=7) at ex_docmd.c:1003 [opt]
frame #7: 0x00000001023839ab vim`call_user_func_check [inlined] call_user_func(fp=<unavailable>, argcount=<unavailable>, argvars=<unavailable>, rettv=<unavailable>, funcexe=<unavailable>, selfdict=<unavailable>) at userfunc.c:1849:2 [opt]
frame #8: 0x0000000102382fd7 vim`call_user_func_check(fp=0x00007fdbafe04570, argcount=1, argvars=0x0000000102945aa0, rettv=0x0000000102945cf0, funcexe=<unavailable>, selfdict=<unavailable>) at userfunc.c:2003 [opt]
frame #9: 0x0000000102382090 vim`call_func(funcname="FinishTesting", len=<unavailable>, rettv=0x0000000000000000, argcount_in=<unavailable>, argvars_in=0x0000000102945aa0, funcexe=0x0000000102945c80) at userfunc.c:2461:11 [opt]
frame #10: 0x0000000102381976 vim`get_func_tv(name="FinishTesting", len=-1, rettv=0x0000000102945cf0, arg=0x0000000102945d10, evalarg=<unavailable>, funcexe=0x0000000102945c80) at userfunc.c:870:8 [opt]
frame #11: 0x00000001023889d1 vim`ex_call(eap=0x0000000102945f30) at userfunc.c:4370:6 [opt]
frame #12: 0x00000001021f13ac vim`do_cmdline [inlined] do_one_cmd(cmdlinep=<unavailable>, flags=7, cstack=0x0000000000000003, fgetline=<unavailable>, cookie=0x00007fdbb1808400) at ex_docmd.c:2588:2 [opt]
frame #13: 0x00000001021efeda vim`do_cmdline(cmdline=<unavailable>, fgetline=<unavailable>, cookie=<unavailable>, flags=7) at ex_docmd.c:1003 [opt]
frame #14: 0x00000001023839ab vim`call_user_func_check [inlined] call_user_func(fp=<unavailable>, argcount=<unavailable>, argvars=<unavailable>, rettv=<unavailable>, funcexe=<unavailable>, selfdict=<unavailable>) at userfunc.c:1849:2 [opt]
frame #15: 0x0000000102382fd7 vim`call_user_func_check(fp=0x00007fdbafe03b70, argcount=1, argvars=0x0000000102946ce0, rettv=0x0000000102946f30, funcexe=<unavailable>, selfdict=<unavailable>) at userfunc.c:2003 [opt]
frame #16: 0x0000000102382090 vim`call_func(funcname="EarlyExit", len=<unavailable>, rettv=0x0000000000000000, argcount_in=<unavailable>, argvars_in=0x0000000102946ce0, funcexe=0x0000000102946ec0) at userfunc.c:2461:11 [opt]
frame #17: 0x0000000102381976 vim`get_func_tv(name="EarlyExit", len=-1, rettv=0x0000000102946f30, arg=0x0000000102946f50, evalarg=<unavailable>, funcexe=0x0000000102946ec0) at userfunc.c:870:8 [opt]
frame #18: 0x00000001023889d1 vim`ex_call(eap=0x0000000102947170) at userfunc.c:4370:6 [opt]
frame #19: 0x00000001021f13ac vim`do_cmdline [inlined] do_one_cmd(cmdlinep=<unavailable>, flags=7, cstack=0x0000000000000001, fgetline=<unavailable>, cookie=0x0000000102947950) at ex_docmd.c:2588:2 [opt]
frame #20: 0x00000001021efeda vim`do_cmdline(cmdline=<unavailable>, fgetline=<unavailable>, cookie=<unavailable>, flags=7) at ex_docmd.c:1003 [opt]
frame #21: 0x0000000102181b01 vim`apply_autocmds_group(event=<unavailable>, fname="", fname_io="", force=<unavailable>, group=0, buf=0x00007fdbb1810e00, eap=0x0000000000000000) at autocmd.c:2109:2 [opt]
frame #22: 0x000000010218258e vim`apply_autocmds(event=<unavailable>, fname=<unavailable>, fname_io=<unavailable>, force=<unavailable>, buf=<unavailable>) at autocmd.c:1621:12 [opt]
frame #23: 0x00000001023fc73c vim`getout(exitval=1) at main.c:1601:2 [opt]
frame #24: 0x00007fff6ab3fb5d libsystem_platform.dylib`_sigtramp + 29
frame #25: 0x00000001025fb076 libXt.6.dylib`XtWidgetToApplicationContext + 14
frame #26: 0x00000001025f9a98 libXt.6.dylib`XtDestroyWidget + 18
frame #27: 0x00000001023c5237 vim`gui_mch_destroy_menu(menu=0x00007fdbafe22220) at gui_athena.c:1582:2 [opt]
frame #28: 0x0000000102265c75 vim`free_menu(menup=0x00007fdbafe3ce80) at menu.c:1057:2 [opt]
frame #29: 0x0000000102262b8d vim`remove_menu(menup=0x00007fdbafe3ce80, name="Help", modes=64, silent=0) at menu.c:1025:6 [opt]
frame #30: 0x00000001022619ec vim`ex_menu(eap=0x00007ffe00000002) at menu.c:359:2 [opt]
frame #31: 0x00000001021f13ac vim`do_cmdline [inlined] do_one_cmd(cmdlinep=<unavailable>, flags=7, cstack=0x00007ffeeda70003, fgetline=<unavailable>, cookie=0x00007fdbb0014a00) at ex_docmd.c:2588:2 [opt]
frame #32: 0x00000001021efeda vim`do_cmdline(cmdline=<unavailable>, fgetline=<unavailable>, cookie=<unavailable>, flags=7) at ex_docmd.c:1003 [opt]
frame #33: 0x00000001023839ab vim`call_user_func_check [inlined] call_user_func(fp=<unavailable>, argcount=<unavailable>, argvars=<unavailable>, rettv=<unavailable>, funcexe=<unavailable>, selfdict=<unavailable>) at userfunc.c:1849:2 [opt]
frame #34: 0x0000000102382fd7 vim`call_user_func_check(fp=0x00007fdbafe1c220, argcount=32767, argvars=0x00007ffeeda7f8e0, rettv=0x00007ffeeda7fb30, funcexe=<unavailable>, selfdict=<unavailable>) at userfunc.c:2003 [opt]
frame #35: 0x0000000102382090 vim`call_func(funcname="Test_menu", len=<unavailable>, rettv=0x0000000000000000, argcount_in=<unavailable>, argvars_in=0x00007ffeeda7f8e0, funcexe=0x00007ffeeda7fac0) at userfunc.c:2461:11 [opt]
frame #36: 0x0000000102381976 vim`get_func_tv(name="Test_menu", len=-1, rettv=0x00007ffeeda7fb30, arg=0x00007ffeeda7fb50, evalarg=<unavailable>, funcexe=0x00007ffeeda7fac0) at userfunc.c:870:8 [opt]
frame #37: 0x00000001023889d1 vim`ex_call(eap=0x00007ffeeda7fd70) at userfunc.c:4370:6 [opt]
frame #38: 0x00000001021f13ac vim`do_cmdline [inlined] do_one_cmd(cmdlinep=<unavailable>, flags=3, cstack=0x000000000000ffff, fgetline=<unavailable>, cookie=0x00007fdbb0014000) at ex_docmd.c:2588:2 [opt]
frame #39: 0x00000001021efeda vim`do_cmdline(cmdline=<unavailable>, fgetline=<unavailable>, cookie=<unavailable>, flags=3) at ex_docmd.c:1003 [opt]
frame #40: 0x00000001021ce8f6 vim`ex_execute(eap=0x00007ffeeda80790) at eval.c:6005:6 [opt]
frame #41: 0x00000001021f13ac vim`do_cmdline [inlined] do_one_cmd(cmdlinep=<unavailable>, flags=7, cstack=0x0000000001030006, fgetline=<unavailable>, cookie=0x00007fdbb0014000) at ex_docmd.c:2588:2 [opt]
frame #42: 0x00000001021efeda vim`do_cmdline(cmdline=<unavailable>, fgetline=<unavailable>, cookie=<unavailable>, flags=7) at ex_docmd.c:1003 [opt]
frame #43: 0x00000001023839ab vim`call_user_func_check [inlined] call_user_func(fp=<unavailable>, argcount=<unavailable>, argvars=<unavailable>, rettv=<unavailable>, funcexe=<unavailable>, selfdict=<unavailable>) at userfunc.c:1849:2 [opt]
frame #44: 0x0000000102382fd7 vim`call_user_func_check(fp=0x00007fdbafe03610, argcount=1, argvars=0x00007ffeeda81540, rettv=0x00007ffeeda81790, funcexe=<unavailable>, selfdict=<unavailable>) at userfunc.c:2003 [opt]
frame #45: 0x0000000102382090 vim`call_func(funcname="RunTheTest", len=<unavailable>, rettv=0x00000000eda81740, argcount_in=<unavailable>, argvars_in=0x00007ffeeda81540, funcexe=0x00007ffeeda81720) at userfunc.c:2461:11 [opt]
frame #46: 0x0000000102381976 vim`get_func_tv(name="RunTheTest", len=-1, rettv=0x00007ffeeda81790, arg=0x00007ffeeda817b0, evalarg=<unavailable>, funcexe=0x00007ffeeda81720) at userfunc.c:870:8 [opt]
frame #47: 0x00000001023889d1 vim`ex_call(eap=0x00007ffeeda819d0) at userfunc.c:4370:6 [opt]
frame #48: 0x00000001021f13ac vim`do_cmdline [inlined] do_one_cmd(cmdlinep=<unavailable>, flags=7, cstack=0x0001000800000013, fgetline=<unavailable>, cookie=0x00007ffeeda818f8) at ex_docmd.c:2588:2 [opt]
frame #49: 0x00000001021efeda vim`do_cmdline(cmdline=<unavailable>, fgetline=<unavailable>, cookie=<unavailable>, flags=7) at ex_docmd.c:1003 [opt]
frame #50: 0x0000000102311990 vim`do_source(fname="runtest.vim", check_other=0, is_vimrc=0, ret_sid=0x0000000000000000) at scriptfile.c:1425:5 [opt]
frame #51: 0x0000000102311089 vim`cmd_source(fname="runtest.vim", eap=<unavailable>) at scriptfile.c:971:14 [opt]
frame #52: 0x00000001021f13ac vim`do_cmdline [inlined] do_one_cmd(cmdlinep=<unavailable>, flags=11, cstack=0x0000000000001000, fgetline=<unavailable>, cookie=0x0000000000000000) at ex_docmd.c:2588:2 [opt]
frame #53: 0x00000001021efeda vim`do_cmdline(cmdline=<unavailable>, fgetline=<unavailable>, cookie=<unavailable>, flags=11) at ex_docmd.c:1003 [opt]
frame #54: 0x00000001023fc0ca vim`vim_main2 [inlined] exe_commands(parmp=<unavailable>) at main.c:3056:2 [opt]
frame #55: 0x00000001023fc070 vim`vim_main2 at main.c:760 [opt]
frame #56: 0x00000001023fad74 vim`main(argc=<unavailable>, argv=<unavailable>) at main.c:412:12 [opt]
frame #57: 0x00007fff6a9543d5 libdyld.dylib`start + 1
frame #58: 0x00007fff6a9543d5 libdyld.dylib`start + 1

cheers,
raf

Dominique Pellé

unread,
Dec 31, 2020, 4:25:35 AM12/31/20
to vim_dev
raf <r...@raf.org> wrote:

> Hi,
>
> Happy New Year Bram et al!
>
> I just tried to compile and test vim for the
> first time in ages and got a segmentation fault.
>
> Environment:
>
> macos-10.14.6
> vim-8.2 patches 1-2251
> XQuartz 2.7.11 (xorg-server 1.18.4)
> (plus other xorg stuff via macports might be relevant)

Hi

Athena GUI works fine for me on Linux x86_6.

Can you try building Vim with the address sanitizer (asan)?
It should only be a matter of uncommenting this line vim
vim/src/Makefile:

SANITIZER_CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer

Then:

$ make clean ; make

Then try to reproduce the crash. If a memory error happens, asan will
dump useful information on stderr. You may need to redirect stderr
like this:

$ cd vim/src ; ./vim 2> asan.log

Alternatively, you can try running Vim with valgrind, which is
much slower. Don't use valgrind with a asan build though.
If you want to run tests with valgrind, you
can uncomment the following line in vim/src/testdir/Makefile:

VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=25
--log-file=valgrind.$*

I suggest to change it to the following to get even more information
at the cost of running slower:

VALGRIND = valgrind --track-origins=yes --leak-check=yes
--num-callers=40 --log-file=valgrind.$*

Regards
Dominique

Bram Moolenaar

unread,
Dec 31, 2020, 11:42:02 AM12/31/20
to vim...@googlegroups.com, raf

> I just tried to compile and test vim for the
> first time in ages and got a segmentation fault.
>
> Environment:
>
> macos-10.14.6
> vim-8.2 patches 1-2251
> XQuartz 2.7.11 (xorg-server 1.18.4)
> (plus other xorg stuff via macports might be relevant)
>
> Configure:
>
> ./configure \
> --disable-darwin \
> --with-x \
> --enable-gui=athena \
> --enable-multibyte \
> --with-mac-arch=current \
> --with-features=huge \
> --disable-acl
>
> Compiler:
>
> > gcc --version
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
> Apple clang version 11.0.0 (clang-1100.0.33.16)
> Target: x86_64-apple-darwin18.7.0
> Thread model: posix
> InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

[...]

> The first time, test_gui.vim crashed after a 32 second pause.
> The second time, it crashed after 222 seconds.
>
> VIMRUNTIME=../../runtime ../vim -f -u unix.vim -u NONE -U NONE --noplugin --not-a-term -S runtest.vim test_gui.vim
>
>
> Vim: Caught deadly signal SEGV
> Vim: Finished.

That looks like a real crash. No idea why, but it's probably GUI
related.

> Found errors in Test_menu():
> Test caused Vim to exit: Test_menu()
> SKIPPED Test_encoding_conversion(): gui_gtk feature missing
>
> The backtrace is:
>
> > lldb src/vim -c /cores/core.41972
> (lldb) target create "src/vim" --core "/cores/core.41972"
> Core file '/cores/core.41972' (x86_64) was loaded.
> (lldb) bt
> warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.
> * thread #1, stop reason = signal SIGSTOP
> * frame #0: 0x00007fff6aa8fbf6 libsystem_kernel.dylib`__kill + 10
> frame #1: 0x000000010229ff6b vim`mch_exit [inlined] may_core_dump at os_unix.c:3432:2 [opt]
> frame #2: 0x000000010229ff43 vim`mch_exit(r=0) at os_unix.c:3398 [opt]
> frame #3: 0x00000001023fc838 vim`getout(exitval=0) at main.c:1689:5 [opt]
> frame #4: 0x00000001021facd4 vim`ex_quit_all(eap=0x0000000102944cf0) at ex_docmd.c:5455:2 [opt]

This is strange, it indicates that deadly_signal was set to SISTOP, but
that does not appear in the signal table, because it can't be caught.
Perhaps the definition of signals (mapping from name to number) isn't
quite right?


--
Be thankful to be in a traffic jam, because it means you own a car.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

raf

unread,
Jan 1, 2021, 3:15:52 AM1/1/21
to vim_dev
On Thu, Dec 31, 2020 at 10:24:55AM +0100, Dominique Pellé <dominiq...@gmail.com> wrote:

> raf <r...@raf.org> wrote:
>
> > Hi,
> >
> > Happy New Year Bram et al!
> >
> > I just tried to compile and test vim for the
> > first time in ages and got a segmentation fault.
> >
> > Environment:
> >
> > macos-10.14.6
> > vim-8.2 patches 1-2251
> > XQuartz 2.7.11 (xorg-server 1.18.4)
> > (plus other xorg stuff via macports might be relevant)
>
> Hi
>
> Athena GUI works fine for me on Linux x86_6.
>
> Can you try building Vim with the address sanitizer (asan)?
> It should only be a matter of uncommenting this line vim
> vim/src/Makefile:
>
> SANITIZER_CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer
>
> Then:
>
> $ make clean ; make
>
> Then try to reproduce the crash. If a memory error happens, asan will
> dump useful information on stderr. You may need to redirect stderr
> like this:
>
> $ cd vim/src ; ./vim 2> asan.log

With address sanitizing, it doesn't crash.
Maybe I should install it like that. :-)
I wonder if I'd notice the performance penalty.

I do get 3 or 4 test failures, though, But hopefully, they're not serious:

Executed: 3733 Tests
Skipped: 48 Tests
FAILED: 4 Tests

Failures:
From test_channel.vim:
Found errors in Test_out_cb():
Run 1:
command line..script /usr/local/src/vim/src/testdir/runtest.vim[468]..function RunTheTest[39]..Test_out_cb[36]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>117 line 1: Expected {'one': 1, 'two': 2, 'three': 3} but got ''
Run 2:
command line..script /usr/local/src/vim/src/testdir/runtest.vim[502]..function RunTheTest[39]..Test_out_cb[36]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>120 line 1: Expected {'one': 1, 'two': 2, 'three': 3} but got ''
Run 3:
command line..script /usr/local/src/vim/src/testdir/runtest.vim[502]..function RunTheTest[39]..Test_out_cb[36]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>123 line 1: Expected {'one': 1, 'two': 2, 'three': 3} but got ''
Run 4:
command line..script /usr/local/src/vim/src/testdir/runtest.vim[502]..function RunTheTest[39]..Test_out_cb[36]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>126 line 1: Expected {'one': 1, 'two': 2, 'three': 3} but got ''
Run 5:
command line..script /usr/local/src/vim/src/testdir/runtest.vim[502]..function RunTheTest[39]..Test_out_cb[36]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>129 line 1: Expected {'one': 1, 'two': 2, 'three': 3} but got ''
Flaky test failed too often, giving up
From test_options.vim:
Found errors in Test_set_ttytype():
command line..script /usr/local/src/vim/src/testdir/runtest.vim[468]..function RunTheTest[39]..Test_set_ttytype line 24: set ttytype=xxx did not fail
From test_startup.vim:
Found errors in Test_default_term():
command line..script /usr/local/src/vim/src/testdir/runtest.vim[468]..function RunTheTest[39]..Test_default_term line 8: Pattern 'defaulting to ''ansi''' does not match 'E437: terminal capability "cm" required\r\nPress ENTER or type command to continue\r\r\n'
From test_termcodes.vim:
Found errors in Test_list_builtin_terminals():
Run 1:
command line..script /usr/local/src/vim/src/testdir/runtest.vim[468]..function RunTheTest[39]..Test_list_builtin_terminals line 7: Pattern 'builtin_dumb' does not match '~\[ occurs 26 times]'
command line..script /usr/local/src/vim/src/testdir/runtest.vim[468]..function RunTheTest[39]..Test_list_builtin_terminals line 8: Pattern 'Not found in termcap' does not match ''
Run 2:
command line..script /usr/local/src/vim/src/testdir/runtest.vim[502]..function RunTheTest[39]..Test_list_builtin_terminals line 7: Pattern 'builtin_dumb' does not match '~\[ occurs 26 times]'
command line..script /usr/local/src/vim/src/testdir/runtest.vim[502]..function RunTheTest[39]..Test_list_builtin_terminals line 8: Pattern 'Not found in termcap' does not match ''
Run 3:
command line..script /usr/local/src/vim/src/testdir/runtest.vim[502]..function RunTheTest[39]..Test_list_builtin_terminals line 7: Pattern 'builtin_dumb' does not match '~\[ occurs 26 times]'
command line..script /usr/local/src/vim/src/testdir/runtest.vim[502]..function RunTheTest[39]..Test_list_builtin_terminals line 8: Pattern 'Not found in termcap' does not match ''
Flaky test failed too often, giving up

TEST FAILURE

Those first failures might be a problem
(Expected {'one': 1, 'two': 2, 'three': 3} but got ''),
but the tty failures look harmless. I think I've seen
them before in tests but not been affected by them.

> Alternatively, you can try running Vim with valgrind, which is
> much slower. Don't use valgrind with a asan build though.
> If you want to run tests with valgrind, you
> can uncomment the following line in vim/src/testdir/Makefile:
>
> VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=25
> --log-file=valgrind.$*
>
> I suggest to change it to the following to get even more information
> at the cost of running slower:
>
> VALGRIND = valgrind --track-origins=yes --leak-check=yes
> --num-callers=40 --log-file=valgrind.$*

Thanks, but the valgrind available via macports only supports macos-10.5
to macos-10.13, and I have 10.14.

Testing doesn't crash if I use macports' openmotif instead of athena,
and only similar tty test failures happen:

set ttytype=xxx did not fail
Pattern 'defaulting to ''ansi''' does not match 'E437: terminal capability "cm" required
Pattern 'builtin_dumb' does not match '~

They look harmless.

I'll use the athena version anyway. It'll probably be fine.
And if not, I'll switch to motif.

> Regards
> Dominique

cheers,
raf

Dominique Pellé

unread,
Jan 1, 2021, 6:58:35 AM1/1/21
to vim_dev
I assume you checked the content of the file asan.log
for errors.

asan probably makes vim 3x times slower or so.
It can be acceptable if you're really willing to discover
and report bugs in Vim.

> I do get 3 or 4 test failures, though, But hopefully, they're not serious:
>
> Executed: 3733 Tests
> Skipped: 48 Tests
> FAILED: 4 Tests
>
> Failures:
> From test_channel.vim:
> Found errors in Test_out_cb():
> Run 1:
> command line..script /usr/local/src/vim/src/testdir/runtest.vim[468]..function RunTheTest[39]..Test_out_cb[36]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>117 line 1: Expected {'one': 1, 'two': 2, 'three': 3} but got ''

No idea about the remaining failing tests.

Dominique

raf

unread,
Jan 1, 2021, 7:34:51 AM1/1/21
to vim...@googlegroups.com
> Be thankful to be in a traffic jam, because it means you own a car.
>
> /// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
> /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\ an exciting new programming language -- http://www.Zimbu.org ///
> \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

That can't be it, or it would happen with motif as well.
Actually, I just realised that I've been using the
motif version for ages anyway, not the athena version.
But I'll use the athena version and see if it there's
any problem in practice. I suspect it'll be fine.

cheers,
raf

raf

unread,
Jan 1, 2021, 7:12:16 PM1/1/21
to vim_dev
No, there was no stderr output with address sanitizing
turned on. I tried several combinations (little or no
optimization, with and without -fno-omit-frame-pointer),
and it always crashes without -fsanitize=address but
it didn't with -fsanitize=address, and there was no asan
output.

With -fsanitize=undefined, there was this:

message_test.c:185:40: runtime error: division by zero
message_test.c:190:40: runtime error: division by zero
message_test.c:195:41: runtime error: division by zero
eval.c:3161:15: runtime error: division by zero
eval.c:3161:15: runtime error: division by zero
eval.c:3161:15: runtime error: division by zero
make[2]: *** [test_gui.res] Segmentation fault: 11
make[1]: *** [scripttests] Error 2
make: *** [test] Error 2

But they all look deliberate and OK, and they aren't
related to the test_gui.vim that crashed.

> asan probably makes vim 3x times slower or so.
> It can be acceptable if you're really willing to discover
> and report bugs in Vim.
>
> Dominique

Thanks for your help. I'm assuming it probably won't
really be a problem in practice. I've started using it
anyway, and it's all good so far.

cheers,
raf

Reply all
Reply to author
Forward
0 new messages