darlingm / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Vim hangs when run within smbfs directory #330

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Mount SMBFS share with fstab record like this:
//GUEST@ALPHA/freebsdx /home/petrucci/freebsdx smbfs 
rw,-EUTF8:CP1251,-N,-I192.168.0.3 0 0
2. # cd /home/pertucci/freebsdx
3. # vim

What is the expected output? 
Vim is up and running.

What do you see instead?
Empty line after command, Vim hangs.

What version of the product are you using? On what operating system?

FreeBSD freebsdX 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 
21:02:49 UTC 2014     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC 
 amd64

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb  4 2015 10:19:09)
Patches: 1-207, 209-355, 357-591
(freebsd binary package vim-7.4.591)

# locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_ALL=

Please provide any additional information below.
(Vim runs in any other directory just fine.)

"vim --startuptime log.txt" results in empty file.

Truss shows infinite cycle of: open("@�.db",O_CLOEXEC,00) = 5 (0x5)

With gdb I found that it hangs 4 steps after break option.c:3348 [p = (char_u 
*)_(*(char **)options[opt_idx].var);]
s 4
Single stepping until exit from function pthread_timedjoin_np, which has no 
line number information. 
[hangs here] press ^C 
Program received signal SIGINT, Interrupt. 0x0000000803356908 in open () from 
/lib/libc.so.7

I don't have a world with debugging symbols by hand now to do further debugging

dumped options variable to the file - they are identical either for smbfs dir 
or ufs where vim runs.(attached)

Original issue reported on code.google.com by freegli...@gmail.com on 13 Feb 2015 at 3:24

Attachments:

GoogleCodeExporter commented 9 years ago
Can you show a backtrace? Could you build you own debug version to be able to 
get a meaningful backtrace?

Original comment by chrisbr...@googlemail.com on 13 Feb 2015 at 9:39

GoogleCodeExporter commented 9 years ago
I've build debug version of vim, so i could "break option.c:3348" in gdb, but 
the freeze seems to be in the pthread_np.so calling for open() in libc.so.7 in 
infinite loop, so as far as i understand i have to rebuild the world with debug 
symbols?

(it's first time i run gdb yesterday, but i have some background with reversing 
under softice)

Original comment by freegli...@gmail.com on 13 Feb 2015 at 12:23

GoogleCodeExporter commented 9 years ago
Breakpoint 1, set_init_1 () at option.c:3348
3348                p = (char_u *)_(*(char **)options[opt_idx].var);
Current language:  auto; currently minimal

(gdb) s 3
Single stepping until exit from function pthread_timedjoin_np, 
which has no line number information.
Single stepping until exit from function pthread_getspecific, 
which has no line number information.
0x00000008030073c7 in pthread_timedjoin_np () from /lib/libthr.so.3

(gdb) bt
#0  0x00000008030073c7 in pthread_timedjoin_np () from /lib/libthr.so.3
#1  0x000000080080c94d in _r_debug_postinit () from /libexec/ld-elf.so.1
#2  0x000000080080a15d in .text () from /libexec/ld-elf.so.1
#3  0x00000000004ed058 in set_init_1 () at option.c:3348
#4  0x00000000005aa624 in main (argc=<value optimized out>, argv=<value 
optimized out>)
    at main.c:334

(gdb) s
Single stepping until exit from function pthread_timedjoin_np, 
which has no line number information.

^C
Program received signal SIGINT, Interrupt.

0x0000000803356908 in open () from /lib/libc.so.7

(gdb) bt
#0  0x0000000803356908 in open () from /lib/libc.so.7
#1  0x0000000803000745 in open () from /lib/libthr.so.3
#2  0x00000008032a54fe in _citrus_map_file () from /lib/libc.so.7
#3  0x00000008032a0f7e in _citrus_mapper_set_persistent () from /lib/libc.so.7
#4  0x00000008032a115a in _citrus_mapper_set_persistent () from /lib/libc.so.7
#5  0x00000008032733a0 in _citrus_lookup_factory_convert () from /lib/libc.so.7
#6  0x000000080327111b in __bsd_iconv_open () from /lib/libc.so.7
#7  0x0000000801cc60ee in _nl_find_msg () from /usr/local/lib/libintl.so.8
#8  0x0000000801cc5685 in libintl_dcigettext () from /usr/local/lib/libintl.so.8
#9  0x00000000004ed058 in set_init_1 () at option.c:3348
#10 0x00000000005aa624 in main (argc=<value optimized out>, argv=<value 
optimized out>)
    at main.c:334

Original comment by freegli...@gmail.com on 13 Feb 2015 at 12:35

GoogleCodeExporter commented 9 years ago
btw if i mount the directory without -EUTF8:CP1251 vim runs fine too.

Original comment by freegli...@gmail.com on 13 Feb 2015 at 12:44