After updating /usr/src, mount_smbfs corrupts. Here is a log file. I have created /etc/src.conf contains "WITH_ICONV=yes", but has no effect. The command "super" is just a setuided local program I have been using long time. [dohzono@abacusUSB ~]$ uname -a FreeBSD abacusUSB 9.3-STABLE FreeBSD 9.3-STABLE #9: Sat Dec 12 06:10:42 JST 2015 dohzono@abacusUSB:/usr/obj/usr/src/sys/GENERIC i386 [dohzono@abacusUSB ~]$ super mount_smbfs -E UTF-8:cp936 -N //dohzono@orange/share /mnt/orange Segmentation fault (core dumped) [dohzono@abacusUSB ~]$ super gdb /usr/sbin/mount_smbfs mount_smbfs.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols found)... warning: exec file is newer than core file. Core was generated by `mount_smbfs'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libsmb.so.4...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libsmb.so.4 Reading symbols from /lib/libkiconv.so.4...(no debugging symbols found)...done. Loaded symbols for /lib/libkiconv.so.4 Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /usr/local/lib/libiconv.so...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libiconv.so Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0x2807572b in nls_setrecode () from /usr/lib/libsmb.so.4 #2 0xbfbfe854 in ?? () #3 0xbfbfede5 in ?? () #4 0x28077814 in ?? () from /usr/lib/libsmb.so.4 #5 0xbfbfeddf in ?? () #6 0xbfbfe864 in ?? () #7 0xbfbfe678 in ?? () #8 0x28070b6d in smb_ctx_setcharset () from /usr/lib/libsmb.so.4 #9 0x00000036 in ?? () #10 0x00000000 in ?? () (gdb)
Do these symbols exist? /usr/src/contrib/smbfs/lib/smb/nls.c iconv_lib = dlopen("libiconv.so", RTLD_LAZY | RTLD_GLOBAL); if (iconv_lib == NULL) { warn("Unable to load iconv library: %s\n", dlerror()); iconv_loaded++; return ENOENT; } my_iconv_open = dlsym(iconv_lib, "iconv_open"); my_iconv = dlsym(iconv_lib, "iconv"); my_iconv_close = dlsym(iconv_lib, "iconv_close");
Solved. I found that nls.c referes to /usr/local/lib/libiconv.so, so I deintall/reinstalled /usr/ports/converters/libiconv, and this problem has gone.
Reproduced. mount_smbfs -E UTF-8:cp936 -N //dohzono@orange/share /mnt/orange with libiconv-1.14_8 => works ok. with libiconv-1.14_9 => core dumped.
I have reproduced on 9.3-RELEASE-p33 and libiconv-1.14_9. # mount_smbfs -E koi8-r:cp866 -W sibptus //scanserver@FS03-SIBPTUS/PUB /mnt2 Segmentation fault (core dumped) Need a fix ASAP.
I had to force-install libiconv-1.14_8.txz (which I had obtained from a tape dump) and this worked around the problem.
Why is libkiconv from the base system affected in any way by /usr/local/lib/libiconv from ports? Shouldn't we reclassify this bug into a more serious category?
This may be a fix for 10/stable of this issue. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=183153
Please see also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206740 for a fix.
IMHO vas is right; this bug is a particular case of bug #206740. It was triggered by ports r398996, that renamed all 'iconvxxx' symbols back into 'libiconvxxx'.
9.3 is EOL. So i think this is overcome by events.
(In reply to w.schwarzenfeld from comment #10) > 9.3 is EOL. So i think this is overcome by events. I think so. And also bug #206740 should be marked as such.