Samba 2.0.7 is writing NULLs to file
Eric Boehm
boehm at nortelnetworks.com
Thu Feb 7 06:53:06 GMT 2002
I have recently seen something odd with Samba 2.0.7.
I have a share that access an NFS mounted file system on the Samba
server. When I write to that file, I am getting a file that is the
right length but contains all NULLs instead of the real data.
I set up a share on the same Samba server that writes to a local file
system. If I write the file to this share instead, everything is
fine.
I captured level 10 logs of both situations. I can clearly see that
the NULLs are being written but I don't see any error indication that
would explain this result.
I then grabbed SAMBA_2_2 CVS as of 2/5/02 16:13 EST and repeated the
test. This time, both files were written correctly.
I realize that 2.0.7 is not the current release. However, there have
been significant problems with the 2.2.x releases under Solaris. I
can't put the new release into production until I am sure that these
problems are solved.
I have level 10 logs of all 4 situations
1. Samba 2.0.7, share is to NFS mount
2. Samba 2.0.7, share is to local disk
3. SAMBA_2_2, share is to NFS mount
4. SAMBA_2_2, share is to local disk
I am including excerpts from item 1, which writes nulls to the file. I
hesitate to include full details for all because it would be 12,000+
lines. I can provide the logs on request.
Any assistance or insight would be appreciated.
1. Samba 2.0.7, share is to NFS mount
[2002/02/05 16:35:00, 10, pid=25021] smbd/nttrans.c:(386)
map_create_disposition: Mapped create_disposition 5 to 12
[2002/02/05 16:35:00, 10, pid=25021] smbd/nttrans.c:(253)
get_filename: data_offset = 87, data_len = 51, fname_len = 51
[2002/02/05 16:35:00, 10, pid=25021] smbd/nttrans.c:(482)
map_share_mode: Mapped desired access 20196, share access 3, file attributes 1 to open_mode 41
[2002/02/05 16:35:00, 5, pid=25021] smbd/filename.c:(329)
unix_convert called on file "\dbserver\requests\20020205.1634.boehm.boehm-1.req"
[2002/02/05 16:35:00, 3, pid=25021] lib/util.c:(522)
unix_clean_name [/dbserver/requests/20020205.1634.boehm.boehm-1.req]
[2002/02/05 16:35:00, 5, pid=25021] smbd/mangle.c:(338)
Checking 20020205.1634.boehm.boehm-1.req for 8.3
[2002/02/05 16:35:00, 5, pid=25021] smbd/filename.c:(436)
unix_convert begin: name = dbserver/requests/20020205.1634.boehm.boehm-1.req, dirpath = dbserver/requests, start = 20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2430)
is_in_path: .
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2435)
is_in_path: no name list.
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2430)
is_in_path: ..
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2435)
is_in_path: no name list.
[2002/02/05 16:35:00, 5, pid=25021] smbd/filename.c:(564)
New file 20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 5, pid=25021] smbd/files.c:(105)
allocated file structure 7104, fnum = 11200 (1 used)
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2430)
is_in_path: dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2435)
is_in_path: no name list.
[2002/02/05 16:35:00, 3, pid=25021] lib/util.c:(522)
unix_clean_name [dbserver/requests/20020205.1634.boehm.boehm-1.req]
[2002/02/05 16:35:00, 10, pid=25021] smbd/open.c:(830)
open_file_shared: fname = dbserver/requests/20020205.1634.boehm.boehm-1.req, share_mode = 41, ofun = 12, mode = 444, oplock request = 3
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2430)
is_in_path: dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2435)
is_in_path: no name list.
[2002/02/05 16:35:00, 3, pid=25021] lib/util.c:(522)
unix_clean_name [dbserver/requests/20020205.1634.boehm.boehm-1.req]
[2002/02/05 16:35:00, 4, pid=25021] smbd/open.c:(1025)
calling open_file with flags=0x1 flags2=0x300 mode=0444
[2002/02/05 16:35:00, 5, pid=25021] smbd/files.c:(173)
allocated fd_ptr structure (1 used)
[2002/02/05 16:35:00, 2, pid=25021] smbd/open.c:(602)
boehm opened file dbserver/requests/20020205.1634.boehm.boehm-1.req read=No write=Yes (numopen=1)
[2002/02/05 16:35:00, 6, pid=25021] locking/shmem_sysv.c:(253)
shm_alloc : allocated 107 bytes at offset 347152
[2002/02/05 16:35:00, 3, pid=25021] locking/locking_shm.c:(456)
set_share_mode: Created share record for dbserver/requests/20020205.1634.boehm.boehm-1.req (dev 601 inode 1607753)
[2002/02/05 16:35:00, 6, pid=25021] locking/shmem_sysv.c:(253)
shm_alloc : allocated 40 bytes at offset 347272
[2002/02/05 16:35:00, 3, pid=25021] locking/locking_shm.c:(495)
set_share_mode: Created share entry for dbserver/requests/20020205.1634.boehm.boehm-1.req with mode 0x41 pid=25021
[2002/02/05 16:35:00, 8, pid=25021] smbd/dosmode.c:(123)
dos_mode: dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2430)
is_in_path: dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2435)
is_in_path: no name list.
[2002/02/05 16:35:00, 8, pid=25021] smbd/dosmode.c:(167)
dos_mode returning r
[2002/02/05 16:35:00, 5, pid=25021] smbd/nttrans.c:(959)
reply_ntcreate_and_X: fnum = 11200, open name = dbserver/requests/20020205.1634.boehm.boehm-1.req
[...]
[2002/02/05 16:35:00, 3, pid=25021] smbd/trans2.c:(1363)
call_trans2qfilepathinfo dbserver/requests/20020205.1634.boehm.boehm-1.req level=257 call=7 total_data=0
[2002/02/05 16:35:00, 8, pid=25021] smbd/dosmode.c:(123)
dos_mode: dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2430)
is_in_path: dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2435)
is_in_path: no name list.
[2002/02/05 16:35:00, 8, pid=25021] smbd/dosmode.c:(167)
dos_mode returning r
[2002/02/05 16:35:00, 5, pid=25021] smbd/trans2.c:(1431)
SMB_QFBI - create: Tue Feb 5 16:35:00 2002
access: Tue Feb 5 16:35:00 2002
write: Tue Feb 5 16:35:00 2002
change: Tue Feb 5 16:35:00 2002
mode: 1
[2002/02/05 16:35:00, 9, pid=25021] smbd/trans2.c:(159)
t2_rep: params_sent_thistime = 2, data_sent_thistime = 36, useable_space = 65471
[2002/02/05 16:35:00, 9, pid=25021] smbd/trans2.c:(161)
t2_rep: params_to_send = 2, data_to_send = 36, paramsize = 2, datasize = 36
[2002/02/05 16:35:00, 6, pid=25021] lib/util_sock.c:(561)
write_socket(8,102)
[2002/02/05 16:35:00, 6, pid=25021] lib/util_sock.c:(564)
write_socket(8,102) wrote 102
[2002/02/05 16:35:00, 10, pid=25021] lib/util_sock.c:(603)
got smb length of 72
[2002/02/05 16:35:00, 6, pid=25021] smbd/process.c:(617)
got message type 0x0 of len 0x48
[2002/02/05 16:35:00, 3, pid=25021] smbd/process.c:(618)
Transaction 13539 of length 76
[...]
[2002/02/05 16:35:00, 10, pid=25021] smbd/nttrans.c:(386)
map_create_disposition: Mapped create_disposition 1 to 1
[2002/02/05 16:35:00, 10, pid=25021] smbd/nttrans.c:(253)
get_filename: data_offset = 87, data_len = 51, fname_len = 51
[2002/02/05 16:35:00, 10, pid=25021] smbd/nttrans.c:(482)
map_share_mode: Mapped desired access 20089, share access 7, file attributes 80 to open_mode 8040
[2002/02/05 16:35:00, 5, pid=25021] smbd/filename.c:(329)
unix_convert called on file "\dbserver\requests\20020205.1634.boehm.boehm-1.req"
[2002/02/05 16:35:00, 3, pid=25021] lib/util.c:(522)
unix_clean_name [/dbserver/requests/20020205.1634.boehm.boehm-1.req]
[2002/02/05 16:35:00, 5, pid=25021] smbd/mangle.c:(338)
Checking 20020205.1634.boehm.boehm-1.req for 8.3
[2002/02/05 16:35:00, 5, pid=25021] smbd/filename.c:(216)
stat_cache_add: Added entry DBSERVER/REQUESTS/20020205.1634.BOEHM.BOEHM-1.REQ -> dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 5, pid=25021] smbd/filename.c:(429)
conversion finished dbserver/requests/20020205.1634.boehm.boehm-1.req -> dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 5, pid=25021] smbd/files.c:(105)
allocated file structure 7105, fnum = 11201 (2 used)
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2430)
is_in_path: dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2435)
is_in_path: no name list.
[2002/02/05 16:35:00, 3, pid=25021] lib/util.c:(522)
unix_clean_name [dbserver/requests/20020205.1634.boehm.boehm-1.req]
[2002/02/05 16:35:00, 10, pid=25021] smbd/open.c:(830)
open_file_shared: fname = dbserver/requests/20020205.1634.boehm.boehm-1.req, share_mode = 8040, ofun = 1, mode = 664, oplock request = 3
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2430)
is_in_path: dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2435)
is_in_path: no name list.
[2002/02/05 16:35:00, 3, pid=25021] lib/util.c:(522)
unix_clean_name [dbserver/requests/20020205.1634.boehm.boehm-1.req]
[2002/02/05 16:35:00, 5, pid=25021] locking/locking_shm.c:(230)
get_share_modes Read share mode 0x41 pid=25021
[2002/02/05 16:35:00, 5, pid=25021] locking/locking_shm.c:(255)
get_share_modes: file with dev 601 inode 1607753 -> 1 entries
[2002/02/05 16:35:00, 4, pid=25021] smbd/open.c:(1025)
calling open_file with flags=0x0 flags2=0x0 mode=0664
[2002/02/05 16:35:00, 3, pid=25021] smbd/files.c:(132)
Re-used file_fd_struct dev = 601, inode = 1607753, ref_count = 2
[2002/02/05 16:35:00, 2, pid=25021] smbd/open.c:(602)
boehm opened file dbserver/requests/20020205.1634.boehm.boehm-1.req read=Yes write=No (numopen=2)
[2002/02/05 16:35:00, 6, pid=25021] locking/shmem_sysv.c:(253)
shm_alloc : allocated 40 bytes at offset 348736
[2002/02/05 16:35:00, 3, pid=25021] locking/locking_shm.c:(495)
set_share_mode: Created share entry for dbserver/requests/20020205.1634.boehm.boehm-1.req with mode 0x8040 pid=25021
[2002/02/05 16:35:00, 8, pid=25021] smbd/dosmode.c:(123)
dos_mode: dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2430)
is_in_path: dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 8, pid=25021] lib/util.c:(2435)
is_in_path: no name list.
[2002/02/05 16:35:00, 8, pid=25021] smbd/dosmode.c:(167)
dos_mode returning r
[2002/02/05 16:35:00, 5, pid=25021] smbd/nttrans.c:(959)
reply_ntcreate_and_X: fnum = 11201, open name = dbserver/requests/20020205.1634.boehm.boehm-1.req
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(430)
[...]
[2002/02/05 16:35:00, 10, pid=25021] smbd/fileio.c:(63)
seek_file: requested pos = 0, new pos = 0
[2002/02/05 16:35:00, 3, pid=25021] smbd/reply.c:(2322)
readX fnum=11201 min=256 max=256 nread=256
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(430)
size=315
smb_com=0x2e
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(436)
smb_tid=2
smb_pid=65279
smb_uid=100
smb_mid=51073
smt_wct=12
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[0]=255 (0xFF)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[1]=0 (0x0)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[2]=0 (0x0)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[3]=0 (0x0)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[4]=0 (0x0)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[5]=256 (0x100)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[6]=59 (0x3B)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[7]=0 (0x0)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[8]=0 (0x0)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[9]=0 (0x0)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[10]=0 (0x0)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(441)
smb_vwv[11]=0 (0x0)
[2002/02/05 16:35:00, 5, pid=25021] lib/util.c:(446)
smb_bcc=256
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2918)
[000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[010] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[020] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[030] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[040] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[050] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[060] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[070] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[080] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[090] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[0A0] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[0B0] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[0C0] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[0D0] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[0E0] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 10, pid=25021] lib/util.c:(2926)
[0F0] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[2002/02/05 16:35:00, 6, pid=25021] lib/util_sock.c:(561)
write_socket(8,319)
[2002/02/05 16:35:00, 6, pid=25021] lib/util_sock.c:(564)
write_socket(8,319) wrote 319
[2002/02/05 16:35:00, 10, pid=25021] lib/util_sock.c:(603)
got smb length of 59
[2002/02/05 16:35:00, 6, pid=25021] smbd/process.c:(617)
got message type 0x0 of len 0x3b
[2002/02/05 16:35:00, 3, pid=25021] smbd/process.c:(618)
Transaction 13547 of length 63
--
Eric M. Boehm /"\ ASCII Ribbon Campaign
boehm at nortelnetworks.com \ / No HTML or RTF in mail
X No proprietary word-processing
/ \ files in mail
/ \ Respect Open Standards
More information about the samba-technical
mailing list