Fwd: Problem with DFREE COMMAND and SMBCLIENT on SAMBA-CVS 091200

Chen Shiyuan csy at hjc.edu.sg
Sat Dec 9 05:52:04 GMT 2000


Hello!

I am currently trying out samba-2.2cvs updated on 091200 and noticed two 
problems, one with the dfree command parameter in the /etc/smb.conf file 
and the other with the smbclient program and is wondering if anyone can 
help me with it?

DFREE COMMAND
=============
I have the following line in my /etc/smb.conf . dfree.pl is a working 
program that worked fine under 2.0.7 . I have also changed dfree.pl to 
just print out two numbers but the problem still presisted.

dfree command = /usr/bin/dfree.pl

When I used smbclient to connect to the share and do a dir, the 
following happens after the files and directories are listed out :-

smb: \> dir
<snip>
Error in dskattr: code 0
smb: \> dir
read_socket_with_timeout: timeout read. read error = Broken pipe.
code 0 listing \*
Broken pipe

And in /var/log/samba/log.smb, the following is noted :-

[2000/12/09 13:11:18, 0] lib/fault.c:fault_report(40)
  ===============================================================
[2000/12/09 13:11:18, 0] lib/fault.c:fault_report(41)
  INTERNAL ERROR: Signal 11 in pid 19704 (2.2.0-alpha1)
  Please read the file BUGS.txt in the distribution
[2000/12/09 13:11:18, 0] lib/fault.c:fault_report(43)
  ===============================================================
[2000/12/09 13:11:18, 0] lib/util.c:smb_panic(1139)
  PANIC: internal error

And if I use gdb on the above smbd process, I get the following :-

server:# gdb smbd 20326
GNU gdb 19991004
Copyright 1998 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-redhat-linux"...

/samba/docs/textdocs/20326: No such file or directory.
Attaching to program: /usr/bin/smbd, Pid 20326
Reading symbols from /usr/lib/libreadline.so.3...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libpam.so.0...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/libtermcap.so.2...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading symbols from /lib/libnss_nisplus.so.2...done.
Reading symbols from /lib/libnss_nis.so.2...done.
Reading symbols from /lib/libnss_dns.so.2...done.
Reading symbols from /lib/libresolv.so.2...done.
Reading symbols from /lib/libnss_ldap.so.2...done.
0x2abe515e in __select () from /lib/libc.so.6
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x80fd8a5 in file_lines_parse ()

(gdb) q


SMBCLIENT
=========
It appears that when there is a /var/lock/samba/unexpected.tdb file, 
smbclient will segfault when it tries to connect to netbios names. If I 
specify dns lookupable names on the commandline, smbclient will work 
just fine. But the moment I use netbios names, it will segfault. The 
commandline used is :-

smbclient -L \\\\<dns or netbios name>
smbclient \\\\<dns or netbios name>\\homes -U<xyz>

added interface ip=1.1.0.13 bcast=1.1.255.255 nmask=255.255.0.0
Got a positive name query response from 1.1.0.30 ( 1.1.0.30 )
Segmentation fault

And strace of the running process gives the following information :-

write(1, "Got a positive name query respon"..., 70) = 70
gettimeofday({976338763, 826163}, NULL) = 0
select(6, [4 5], NULL, NULL, {0, 90000}) = 0 (Timeout)
stat("/var/lock/samba", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/var/lock/samba/unexpected.tdb", O_RDONLY) = 7
read(7, "TDB file\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
168) = 168
fstat(7, {st_mode=S_IFREG|0600, st_size=8192, ...}) = 0
old_mmap(NULL, 8192, PROT_READ, MAP_SHARED, 7, 0) = 0x2aac1000
lseek(7, 40, SEEK_SET)                  = 40
write(7, "\0\0\0\0", 4)                 = -1 EBADF (Bad file descriptor)
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

But if I were to rm /var/lock/samba/unexpected.tdb , smbclient will work 
perfectly fine again.


I compiled samba with the following parameters :-

./configure --prefix=/usr --libdir=/etc --with-lockdir=/var/lock/samba --
with-swatdir=/usr/share/swat --localstatedir=/var/log/samba --with-
smbmount --with-pam

Does anyone have idea what has gone wrong? Is it a misconfig on my end 
or is it a bug with the cvs version?

Many thanks for your time.




More information about the samba mailing list