Bug 1361 - different md5sum on file larger than 4GB
Summary: different md5sum on file larger than 4GB
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.22
Hardware: All Linux
: P3 major
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact:
URL:
Keywords:
: 1363 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-05-18 07:36 UTC by Marco Berizzi
Modified: 2010-04-26 03:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Berizzi 2004-05-18 07:36:25 UTC
I'm experimenting this problem with
samba 3.0.4 and linux 2.4.26 with
ReiserFS (same behaviour with XFS).
When I copy (put) a large file (5GB)
from a Windows NT terminal server sp6a
to the samba-linux box, the md5sum is
different between the two file. Files
size are identical.
I'm using this command to copy these
files from windows to samba:

net use h: \\samba_box\backup
copy priv.edb h:\exchange

I have also tried to delete the old
files from the samba share, but nothing
change: I always get two different md5sum.
With smaller files (400MB) md5sum is
identical.
When I transfer this large file with ftp
(proftpd 1.2.9 on Linux), md5sum is ok.

These two systems are connected to a 3COM
100bit/s switch. No collision/no error are
detected at linux side box. Samba doesn't
log anything relevant. No kernel error.
Nothing. Samba box is running Slackware 9.1
+ kernel 2.4.26 + samba 3.0.4 compiled
from sources.

I have also upgraded to linux kernel
2.6.5. However this problem hasn't gone away.
The md5 check is fine, coping the same file
from NT4TSE to a Windoze 2000sp4.
Coping the same file from a windoze 2000sp4
to the samba share is ok. So the problem is
between NT4TSE and samba.

NT4TSE --> SAMBA = KO
WIN2k  --> SAMBA = OK
NT4TSE --> WIN2K = OK

Last, I have switched back to samba 2.2.8a
(compiled from source) on linux 2.6.5:
same behaviour.

Other info:
http://lists.samba.org/archive/samba/2004-May/086020.html
http://lists.samba.org/archive/samba/2004-May/086026.html
http://lists.samba.org/archive/samba/2004-May/086054.html
http://lists.samba.org/archive/samba/2004-May/086088.html
Comment 1 Marco Berizzi 2004-07-12 01:22:20 UTC
I have written

log level = 5 

on smb.conf and the problem has gone away.
(samba 3.0.5rc1 + kernel 2.4.26)
Comment 2 Marco Berizzi 2004-07-15 07:27:49 UTC
I have increased log level to 9.
Here is piece:

[2004/07/15 00:44:33, 3] smbd/process.c:switch_message(887)
  switch message SMBwritebraw (pid 512) conn 0x838f198
[2004/07/15 00:44:33, 4] smbd/uid.c:change_to_user(193)
  change_to_user: Skipping user change - already user
[2004/07/15 00:44:33, 8] locking/posix.c:posix_fcntl_lock(650)

**********************************************
  posix_fcntl_lock 25 12 4294963200 61440 1
**********************************************

[2004/07/15 00:44:33, 8] lib/util.c:fcntl_lock(1646)
  fcntl_lock 25 12 4294963200 61440 1
[2004/07/15 00:44:33, 8] locking/posix.c:posix_fcntl_lock(680)
  posix_fcntl_lock: Lock call failed
[2004/07/15 00:44:33, 3] smbd/reply.c:reply_writebraw(2265)
  writebraw1 fnum=8313 start=4294963200 num=16580 wrote=16580 sync=0
[2004/07/15 00:44:33, 6] lib/util_sock.c:write_socket(449)
  write_socket(22,41)
[2004/07/15 00:44:33, 6] lib/util_sock.c:write_socket(452)
  write_socket(22,41) wrote 41
[2004/07/15 00:44:33, 3] smbd/reply.c:reply_writebraw(2328)
  writebraw2 fnum=8313 start=4294963200 num=44860 wrote=61440
[2004/07/15 00:44:33, 6] smbd/process.c:process_smb(1091)
  got message type 0x0 of len 0x4104
[2004/07/15 00:44:33, 3] smbd/process.c:process_smb(1092)
  Transaction 70190 of length 16648
[2004/07/15 00:44:33, 5] lib/util.c:show_msg(443)
[2004/07/15 00:44:33, 5] lib/util.c:show_msg(453)
  size=16644
  smb_com=0x1d
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=24
  smb_flg2=32771
  smb_tid=1
  smb_pid=51966
  smb_uid=100
  smb_mid=35584
  smt_wct=14
  smb_vwv[ 0]= 8313 (0x2079)
  smb_vwv[ 1]=61440 (0xF000)
  smb_vwv[ 2]=    0 (0x0)
  smb_vwv[ 3]=57344 (0xE000)
  smb_vwv[ 4]=    0 (0x0)
  smb_vwv[ 5]=    0 (0x0)
  smb_vwv[ 6]=    0 (0x0)
  smb_vwv[ 7]=    0 (0x0)
  smb_vwv[ 8]=    0 (0x0)
  smb_vwv[ 9]=    0 (0x0)
  smb_vwv[10]=16580 (0x40C4)
  smb_vwv[11]=   64 (0x40)
  smb_vwv[12]=    1 (0x1)
  smb_vwv[13]=    0 (0x0)
  smb_bcc=16581
[2004/07/15 00:44:33, 3] smbd/process.c:switch_message(887)
  switch message SMBwritebraw (pid 512) conn 0x838f198
[2004/07/15 00:44:33, 4] smbd/uid.c:change_to_user(193)
  change_to_user: Skipping user change - already user
[2004/07/15 00:44:33, 8] locking/posix.c:posix_fcntl_lock(650)

****************************************
  posix_fcntl_lock 25 12 57344 61440 1
****************************************
                         ^^^^^

Why is it smaller?


[2004/07/15 00:44:33, 8] lib/util.c:fcntl_lock(1646)
  fcntl_lock 25 12 57344 61440 1
[2004/07/15 00:44:33, 8] locking/posix.c:posix_fcntl_lock(680)
  posix_fcntl_lock: Lock call failed
[2004/07/15 00:44:33, 3] smbd/reply.c:reply_writebraw(2265)
  writebraw1 fnum=8313 start=57344 num=16580 wrote=16580 sync=0
[2004/07/15 00:44:33, 6] lib/util_sock.c:write_socket(449)
  write_socket(22,41)
[2004/07/15 00:44:33, 6] lib/util_sock.c:write_socket(452)
  write_socket(22,41) wrote 41
[2004/07/15 00:44:33, 3] smbd/reply.c:reply_writebraw(2328)
  writebraw2 fnum=8313 start=57344 num=44860 wrote=61440
[2004/07/15 00:44:33, 6] smbd/process.c:process_smb(1091)
  got message type 0x0 of len 0x4104
[2004/07/15 00:44:33, 3] smbd/process.c:process_smb(1092)
  Transaction 70191 of length 16648
[2004/07/15 00:44:33, 5] lib/util.c:show_msg(443)
[2004/07/15 00:44:33, 5] lib/util.c:show_msg(453)
  size=16644
  smb_com=0x1d
  smb_rcls=0
  smb_reh=0


Running stat file_name I get:

root@Mimas:/mnt/data/backup/exchange/exchsrvr/MDBDATA# stat  priv.edb
  File: `priv.edb'
  Size: 5393883136      Blocks: 8388728    IO Block: 4096   regular file
Device: 308h/776d       Inode: 7           Links: 1
Access: (0744/-rwxr--r--)  Uid: (10000/AIVE\!schedule)   Gid: (10000/AIVE\Domain
Users)
Access: 2004-07-15 06:06:59.000000000 +0200
Modify: 2004-07-14 23:30:36.000000000 +0200
Change: 2004-07-15 00:50:57.000000000 +0200

size is different than blocks*512. Why?
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-02-11 07:49:16 UTC
*** Bug 1363 has been marked as a duplicate of this bug. ***
Comment 4 Gerald (Jerry) Carter (dead mail address) 2006-04-08 22:50:05 UTC
Please retest against a current release and reopen if the issue still exists.
Comment 5 Marco Berizzi 2006-05-26 03:10:50 UTC
same problem with 3.0.22 and linux 2.4.26 & linux 2.4.32
Comment 6 Marco Berizzi 2006-05-26 03:13:43 UTC
As you can see blocks*512= 4 295 024 640

root@Mimas:/mnt/data/backup/exchange/exchsrvr/MDBDATA# stat priv.edb
  File: `priv.edb'
  Size: 7908368384      Blocks: 8388720    IO Block: 4096   regular file
Device: 308h/776d       Inode: 87          Links: 1
Access: (0744/-rwxr--r--)  Uid: (10002/DOMAIN\administrator)   Gid: (10000/DOMAIN\domain users)
Access: 2006-05-26 09:15:30.000000000 +0200
Modify: 2006-05-26 09:39:23.000000000 +0200
Change: 2006-05-26 09:39:23.000000000 +0200
Comment 7 Marco Berizzi 2006-05-30 03:45:57 UTC
I think I have found where the problem is.
The problem is the file itself, not is size. Copying another big file (18GB) from that NT4 TSE system to the same samba box is fine.
The problematic file is a micro$oft exchange 5.5 database.
What kind of information should I give to resolve this bug?
Comment 8 Stefan Metzmacher 2010-04-26 03:33:29 UTC
If it's still broken in 3.5, please reopen.
3.0 isn't supported anymore.