[Samba] Re:[Samba]Upgrade broke file locking

adam at morrison-ind.com adam at morrison-ind.com
Tue Aug 20 11:37:00 GMT 2002


More info on file locking problem...

Dead PIDs are showing in "smbstatus -L" as still holding locks,  thus keeping
users out of their files.  I see (for example) a spreadsheet locked by process
30744, but "ps ax | grep 30744" shows nothing.  Rather scary.

Is there a patch or poosibly it is linked against a goobered library?

A debug level = 10 of the problem (user attempting to open a file locked by dead
process 30744)....

[2002/08/20 15:32:01, 3] lib/util.c:unix_clean_name(387)
  unix_clean_name [/ALLIED INVOICING/1878.doc]
[2002/08/20 15:32:01, 5] smbd/mangle_hash.c:is_8_3(368)
  Checking 1878.doc for 8.3
[2002/08/20 15:32:01, 5] smbd/statcache.c:stat_cache_add(132)
  stat_cache_add: Added entry ALLIED INVOICING/1878.DOC -> Allied Invoicing/1878.doc
[2002/08/20 15:32:01, 5] smbd/filename.c:unix_convert(188)
  conversion finished ALLIED INVOICING/1878.doc -> Allied Invoicing/1878.doc
[2002/08/20 15:32:01, 3] smbd/dosmode.c:unix_mode(111)
  unix_mode(Allied Invoicing/1878.doc) returning 0764
[2002/08/20 15:32:01, 5] smbd/files.c:file_new(120)
  allocated file structure 4914, fnum = 9010 (1 used)
[2002/08/20 15:32:01, 10] smbd/open.c:open_file_shared1(743)
  open_file_shared: fname = Allied Invoicing/1878.doc, share_mode = 90, ofun =
1, mode = 764, oplock request = 3
[2002/08/20 15:32:01, 8] lib/util.c:is_in_path(1143)
  is_in_path: Allied Invoicing/1878.doc
[2002/08/20 15:32:01, 8] lib/util.c:is_in_path(1177)
  is_in_path: match not found
[2002/08/20 15:32:01, 3] lib/util.c:unix_clean_name(387)
  unix_clean_name [Allied Invoicing/1878.doc]
[2002/08/20 15:32:01, 4] smbd/open.c:open_file_shared1(891)
  calling open_file with flags=0x0 flags2=0x0 mode=0764
[2002/08/20 15:32:01, 10] smbd/open.c:fd_open(52)
  fd_open: name Allied Invoicing/1878.doc, flags = 00 mode = 0764, fd = 26. 
[2002/08/20 15:32:01, 2] smbd/open.c:open_file(230)
  RNEUMAN opened file Allied Invoicing/1878.doc read=Yes write=No (numopen=1)
[2002/08/20 15:32:01, 10] smbd/open.c:open_file_shared1(993)
  open_file_shared : share_mode = 10
[2002/08/20 15:32:01, 10] locking/locking.c:set_share_mode(691)
  set_share_mode: creating entry for file Allied Invoicing/1878.doc.
num_share_modes = 1
[2002/08/20 15:32:01, 10] locking/locking.c:print_share_mode_table(445)
  print_share_mode_table: share_mode_entry[0]: pid = 21187, share_mode = 0x10,
desired_access = 0x1, port = 0x0, type= 0x0, file_id = 1, dev = 0x811, inode =
504574
[2002/08/20 15:32:01, 8] smbd/dosmode.c:dos_mode(123)
  dos_mode: Allied Invoicing/1878.doc
[2002/08/20 15:32:01, 8] lib/util.c:is_in_path(1143)
  is_in_path: Allied Invoicing/1878.doc
[2002/08/20 15:32:01, 8] lib/util.c:is_in_path(1148)
  is_in_path: no name list.
[2002/08/20 15:32:01, 8] smbd/dosmode.c:dos_mode(167)
  dos_mode returning a
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(268)
  size=65
  smb_com=0x2d
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=128
  smb_flg2=1
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(276)
  smb_tid=3
  smb_pid=5229
  smb_uid=100
  smb_mid=36225
  smt_wct=15
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[0]=255 (0xFF)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[1]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[2]=9010 (0x2332)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[3]=32 (0x20)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[4]=35842 (0x8C02)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[5]=15706 (0x3D5A)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[6]=55296 (0xD800)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[7]=6 (0x6)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[8]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[9]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[10]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[11]=1 (0x1)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[12]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[13]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[14]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(291)
  smb_bcc=0
[2002/08/20 15:32:01, 6] lib/util_sock.c:write_socket(518)
  write_socket(5,69)
[2002/08/20 15:32:01, 6] lib/util_sock.c:write_socket(521)
  write_socket(5,69) wrote 69
[2002/08/20 15:32:01, 10] lib/util_sock.c:read_smb_length_return_keepalive(559)
  got smb length of 41
[2002/08/20 15:32:01, 6] smbd/process.c:process_smb(876)
  got message type 0x0 of len 0x29
[2002/08/20 15:32:01, 3] smbd/process.c:process_smb(877)
  Transaction 193 of length 45
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(268)
  size=41
  smb_com=0x4
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=0
  smb_flg2=0
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(276)
  smb_tid=3
  smb_pid=5229
  smb_uid=100
  smb_mid=36353
  smt_wct=3
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[0]=9010 (0x2332)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[1]=65535 (0xFFFF)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[2]=65535 (0xFFFF)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(291)
  smb_bcc=0
[2002/08/20 15:32:01, 3] smbd/process.c:switch_message(684)
  switch message SMBclose (pid 21187)
[2002/08/20 15:32:01, 4] smbd/uid.c:change_to_user(119)
  change_to_user: Skipping user change - already user
[2002/08/20 15:32:01, 3] smbd/reply.c:reply_close(3028)
  close fd=26 fnum=9010 (numopen=1)
[2002/08/20 15:32:01, 10] locking/locking.c:del_share_entry(604)
  del_share_entry: num_share_modes = 1
[2002/08/20 15:32:01, 10] locking/locking.c:del_share_entry(608)
  del_share_entry: deleted share_mode_entry[0]: pid = 21187, share_mode = 0x10,
desired_access = 0x1, port = 0x0, type= 0x0, file_id = 1, dev = 0x811, inode =
504574
[2002/08/20 15:32:01, 10] locking/locking.c:del_share_entry(617)
  del_share_entry: deleting entry 0
[2002/08/20 15:32:01, 10] locking/locking.c:del_share_entry(639)
  del_share_entry: Remaining table.
[2002/08/20 15:32:01, 10] smbd/close.c:close_normal_file(152)
  close_normal_file: share_entry_count = 0 for file Allied Invoicing/1878.doc
[2002/08/20 15:32:01, 10] locking/posix.c:posix_locking_close_file(1245)
  posix_locking_close_file: file Allied Invoicing/1878.doc has no outstanding locks.
[2002/08/20 15:32:01, 2] smbd/close.c:close_normal_file(211)
  rneuman closed file Allied Invoicing/1878.doc (numopen=0) 
[2002/08/20 15:32:01, 5] smbd/files.c:file_free(338)
  freed files structure 9010 (0 used)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(268)
  size=35
  smb_com=0x4
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=128
  smb_flg2=1
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(276)
  smb_tid=3
  smb_pid=5229
  smb_uid=100
  smb_mid=36353
  smt_wct=0
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(291)
  smb_bcc=0
[2002/08/20 15:32:01, 6] lib/util_sock.c:write_socket(518)
  write_socket(5,39)
[2002/08/20 15:32:01, 6] lib/util_sock.c:write_socket(521)
  write_socket(5,39) wrote 39
[2002/08/20 15:32:01, 10] lib/util_sock.c:read_smb_length_return_keepalive(559)
  got smb length of 92
[2002/08/20 15:32:01, 6] smbd/process.c:process_smb(876)
  got message type 0x0 of len 0x5c
[2002/08/20 15:32:01, 3] smbd/process.c:process_smb(877)
  Transaction 194 of length 96
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(268)
  size=92
  smb_com=0x2d
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=0
  smb_flg2=0
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(276)
  smb_tid=3
  smb_pid=5229
  smb_uid=100
  smb_mid=36481
  smt_wct=15
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[0]=255 (0xFF)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[1]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[2]=7 (0x7)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[3]=160 (0xA0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[4]=22 (0x16)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[5]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[6]=24816 (0x60F0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[7]=15714 (0x3D62)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[8]=1 (0x1)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[9]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[10]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[11]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[12]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[13]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[14]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(291)
  smb_bcc=27
[2002/08/20 15:32:01, 10] lib/util.c:dump_data(1529)
  [000] 5C 41 4C 4C 49 45 44 20  49 4E 56 4F 49 43 49 4E  \ALLIED  INVOICIN
[2002/08/20 15:32:01, 10] lib/util.c:dump_data(1537)
  [010] 47 5C 31 38 37 38 2E 64  6F 63 00                 G\1878.d oc.
[2002/08/20 15:32:01, 3] smbd/process.c:switch_message(684)
  switch message SMBopenX (pid 21187)
[2002/08/20 15:32:01, 4] smbd/uid.c:change_to_user(119)
  change_to_user: Skipping user change - already user
[2002/08/20 15:32:01, 5] smbd/filename.c:unix_convert(119)
  unix_convert called on file "\ALLIED INVOICING\1878.doc"
[2002/08/20 15:32:01, 3] lib/util.c:unix_clean_name(387)
  unix_clean_name [/ALLIED INVOICING/1878.doc]
[2002/08/20 15:32:01, 5] smbd/mangle_hash.c:is_8_3(368)
  Checking 1878.doc for 8.3
[2002/08/20 15:32:01, 3] smbd/dosmode.c:unix_mode(111)
  unix_mode(Allied Invoicing/1878.doc) returning 0764
[2002/08/20 15:32:01, 5] smbd/files.c:file_new(120)
  allocated file structure 4915, fnum = 9011 (1 used)
[2002/08/20 15:32:01, 10] smbd/open.c:open_file_shared1(743)
  open_file_shared: fname = Allied Invoicing/1878.doc, share_mode = a0, ofun =
1, mode = 764, oplock request = 3
[2002/08/20 15:32:01, 8] lib/util.c:is_in_path(1143)
  is_in_path: Allied Invoicing/1878.doc
[2002/08/20 15:32:01, 8] lib/util.c:is_in_path(1177)
  is_in_path: match not found
[2002/08/20 15:32:01, 3] lib/util.c:unix_clean_name(387)
  unix_clean_name [Allied Invoicing/1878.doc]
[2002/08/20 15:32:01, 4] smbd/open.c:open_file_shared1(891)
  calling open_file with flags=0x0 flags2=0x0 mode=0764
[2002/08/20 15:32:01, 10] smbd/open.c:fd_open(52)
  fd_open: name Allied Invoicing/1878.doc, flags = 00 mode = 0764, fd = 26. 
[2002/08/20 15:32:01, 2] smbd/open.c:open_file(230)
  RNEUMAN opened file Allied Invoicing/1878.doc read=Yes write=No (numopen=1)
[2002/08/20 15:32:01, 10] smbd/open.c:open_file_shared1(993)
  open_file_shared : share_mode = 20
[2002/08/20 15:32:01, 10] locking/locking.c:set_share_mode(691)
  set_share_mode: creating entry for file Allied Invoicing/1878.doc.
num_share_modes = 1
[2002/08/20 15:32:01, 10] locking/locking.c:print_share_mode_table(445)
  print_share_mode_table: share_mode_entry[0]: pid = 21187, share_mode = 0x20,
desired_access = 0x1, port = 0x0, type= 0x0, file_id = 2, dev = 0x811, inode =
504574
[2002/08/20 15:32:01, 8] smbd/dosmode.c:dos_mode(123)
  dos_mode: Allied Invoicing/1878.doc
[2002/08/20 15:32:01, 8] lib/util.c:is_in_path(1143)
  is_in_path: Allied Invoicing/1878.doc
[2002/08/20 15:32:01, 8] lib/util.c:is_in_path(1148)
  is_in_path: no name list.
[2002/08/20 15:32:01, 8] smbd/dosmode.c:dos_mode(167)
  dos_mode returning a
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(268)
  size=65
  smb_com=0x2d
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=128
  smb_flg2=1
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(276)
  smb_tid=3
  smb_pid=5229
  smb_uid=100
  smb_mid=36481
  smt_wct=15
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[0]=255 (0xFF)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[1]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[2]=9011 (0x2333)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[3]=32 (0x20)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[4]=35842 (0x8C02)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[5]=15706 (0x3D5A)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[6]=55296 (0xD800)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[7]=6 (0x6)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[8]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[9]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[10]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[11]=1 (0x1)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[12]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[13]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[14]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(291)
  smb_bcc=0
[2002/08/20 15:32:01, 6] lib/util_sock.c:write_socket(518)
  write_socket(5,69)
[2002/08/20 15:32:01, 6] lib/util_sock.c:write_socket(521)
  write_socket(5,69) wrote 69
[2002/08/20 15:32:01, 10] lib/util_sock.c:read_smb_length_return_keepalive(559)
  got smb length of 61
[2002/08/20 15:32:01, 6] smbd/process.c:process_smb(876)
  got message type 0x0 of len 0x3d
[2002/08/20 15:32:01, 3] smbd/process.c:process_smb(877)
  Transaction 195 of length 65
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(268)
  size=61
  smb_com=0x24
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=0
  smb_flg2=0
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(276)
  smb_tid=3
  smb_pid=5229
  smb_uid=100
  smb_mid=36609
  smt_wct=8
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[0]=255 (0xFF)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[1]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[2]=9011 (0x2333)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[3]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[4]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[5]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[6]=0 (0x0)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(285)
  smb_vwv[7]=1 (0x1)
[2002/08/20 15:32:01, 5] lib/util.c:show_msg(291)
  smb_bcc=10
[2002/08/20 15:32:01, 10] lib/util.c:dump_data(1529)
  [000] 6D 14 92 FF FF 7F 01 00  00 00                    m....... ..
[2002/08/20 15:32:01, 3] smbd/process.c:switch_message(684)
  switch message SMBlockingX (pid 21187)
[2002/08/20 15:32:01, 4] smbd/uid.c:change_to_user(119)
  change_to_user: Skipping user change - already user
[2002/08/20 15:32:01, 10] smbd/reply.c:reply_lockingX(4574)
  reply_lockingX: lock start=2147483538, len=1 for pid 5229, file Allied
Invoicing/1878.doc timeout = 0
[2002/08/20 15:32:01, 10] locking/locking.c:do_lock(112)
  do_lock: lock type WRITE start=2147483538 len=1 requested for file Allied
Invoicing/1878.doc
[2002/08/20 15:32:01, 10] locking/posix.c:map_posix_lock_type(518)
  map_posix_lock_type: Downgrading write lock to read due to read-only file.
[2002/08/20 15:32:01, 5] locking/posix.c:set_posix_lock(972)
  set_posix_lock: File Allied Invoicing/1878.doc, offset = 2147483538, count =
1, type = WRITE
[2002/08/20 15:32:01, 10] locking/posix.c:posix_lock_in_range(635)
  posix_lock_in_range: offset_out = 2147483538, count_out = 1
[2002/08/20 15:32:01, 10] locking/posix.c:add_posix_lock_entry(391)
  add_posix_lock: File Allied Invoicing/1878.doc: type = READ: start=2147483538
size=1: dev=2065 inode=504574
[2002/08/20 15:32:01, 5] locking/posix.c:set_posix_lock(1058)
  set_posix_lock: Real lock: Type = READ: offset = 2147483538, count = 1
[2002/08/20 15:32:01, 8] locking/posix.c:posix_fcntl_lock(654)
  posix_fcntl_lock 26 13 2147483538 1 0
[2002/08/20 15:32:01, 8] lib/util.c:fcntl_lock(1302)
  fcntl_lock 26 13 2147483538 1 0
[2002/08/20 15:32:01, 8] lib/util.c:fcntl_lock(1340)
  fcntl_lock: Lock call successful
[2002/08/20 15:32:01, 8] locking/posix.c:posix_fcntl_lock(684)
  posix_fcntl_lock: Lock call successful
[2002/08/20 15:32:01, 3] smbd/reply.c:reply_lockingX(4626)



More information about the samba mailing list