Still problems with UTF8 encoded filenames in Samba4

Michael Drüing michael at drueing.de
Mon Apr 3 20:52:39 GMT 2006


Hi,
 
I'm still experiencing problems with samba4 when creating files/directories
which contain German umlauts (like äöü). I started samba with "-d" to get
some debug info, and here's what I got (find the two lines that start with
"E2BIG")

...........*snip*...........

sign_outgoing_message: SENT SIG (seq: 243): sent SMB signature of
[000] F6 53 56 F7 54 11 2D DB                           .SV.T.-. 
[Mon Apr  3 21:18:35 2006 CEST, 10 smb_server/smb_server.c:91:smbsrv_recv()]
smbsrv_recv
[Mon Apr  3 21:18:35 2006 CEST, 15
libcli/raw/smb_signing.c:191:check_signed_incoming_message()]
check_signed_incoming_message: GOOD SIG (seq: 244): got SMB signature of
[000] 2F 20 C3 A3 34 1C 6D D5                           / ..4.m. 
[Mon Apr  3 21:18:35 2006 CEST, 5
smb_server/smb/receive.c:494:switch_message()]
switch message SMBntcreateX (task_id 8364)
[Mon Apr  3 21:18:35 2006 CEST, 0
lib/charset/charcnv.c:178:convert_string()]
E2BIG: convert_string(UTF8,UTF8): srclen=46 destlen=45 -
'/export/Software/Blödes Verzeichnis/DISK.002'
[Mon Apr  3 21:18:35 2006 CEST, 5
libcli/raw/smb_signing.c:130:sign_outgoing_message()]
sign_outgoing_message: SENT SIG (seq: 245): sent SMB signature of
[000] 51 B5 92 7A 0D 2A 6D A7                           Q..z.*m. 
[Mon Apr  3 21:18:35 2006 CEST, 10 smb_server/smb_server.c:91:smbsrv_recv()]
smbsrv_recv
[Mon Apr  3 21:18:35 2006 CEST, 15
libcli/raw/smb_signing.c:191:check_signed_incoming_message()]
check_signed_incoming_message: GOOD SIG (seq: 246): got SMB signature of
[000] C0 B9 80 DC CE 1F D0 42                           .......B 
[Mon Apr  3 21:18:35 2006 CEST, 5
smb_server/smb/receive.c:494:switch_message()]
switch message SMBtrans2 (task_id 8364)
[Mon Apr  3 21:18:35 2006 CEST, 5
libcli/raw/smb_signing.c:130:sign_outgoing_message()]
sign_outgoing_message: SENT SIG (seq: 247): sent SMB signature of
[000] A1 91 DF 3F A0 16 7B EA                           ...?..{. 
[Mon Apr  3 21:18:35 2006 CEST, 10 smb_server/smb_server.c:91:smbsrv_recv()]
smbsrv_recv
[Mon Apr  3 21:18:35 2006 CEST, 15
libcli/raw/smb_signing.c:191:check_signed_incoming_message()]
check_signed_incoming_message: GOOD SIG (seq: 248): got SMB signature of
[000] 9B 6C B5 A3 1E 05 2D F7                           .l....-. 
[Mon Apr  3 21:18:35 2006 CEST, 5
smb_server/smb/receive.c:494:switch_message()]
switch message SMBclose (task_id 8364)
[Mon Apr  3 21:18:35 2006 CEST, 5
libcli/raw/smb_signing.c:130:sign_outgoing_message()]
sign_outgoing_message: SENT SIG (seq: 249): sent SMB signature of
[000] 81 70 A9 A0 8F 46 44 0A                           .p...FD. 
[Mon Apr  3 21:18:35 2006 CEST, 10 smb_server/smb_server.c:91:smbsrv_recv()]
smbsrv_recv
[Mon Apr  3 21:18:35 2006 CEST, 15
libcli/raw/smb_signing.c:191:check_signed_incoming_message()]
check_signed_incoming_message: GOOD SIG (seq: 250): got SMB signature of
[000] 0B F9 FA FE A2 C7 64 57                           ......dW 
[Mon Apr  3 21:18:35 2006 CEST, 5
smb_server/smb/receive.c:494:switch_message()]
switch message SMBntcreateX (task_id 8364)
[Mon Apr  3 21:18:35 2006 CEST, 0
lib/charset/charcnv.c:178:convert_string()]
E2BIG: convert_string(UTF8,UTF8): srclen=46 destlen=45 -
'/export/Software/Blödes Verzeichnis/DISK.002'
[Mon Apr  3 21:18:35 2006 CEST, 5
libcli/raw/smb_signing.c:130:sign_outgoing_message()]
sign_outgoing_message: SENT SIG (seq: 251): sent SMB signature of
[000] 7F 2D 0B 8C 42 CB AA 0A                           .-..B... 
[Mon Apr  3 21:18:35 2006 CEST, 10 smb_server/smb_server.c:91:smbsrv_recv()]
smbsrv_recv

...........*snip*...........

Sometimes after creating such a directory, I cannot change into it or delete
it from the client. After I restart samba, it works, until the same error
comes up later after which there's a chance that I again cannot enter these
newly created folders.

I then tried to debug Samba, and here's the backtrace when trying to copy a
file to a directory with an umlaut in it:

lavie:~ # gdb smbd
GNU gdb 6.4
Copyright 2005 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 "i586-suse-linux"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) b charcnv.c:173
Breakpoint 1 at 0x8365c2f: file lib/charset/charcnv.c, line 173.
(gdb) run -i -M single
Starting program: /opt/samba4/sbin/smbd -i -M single
[Thread debugging using libthread_db enabled]
[New Thread -1210997072 (LWP 2624)]
smbd version 4.0.0tp3-SVN-build-14843 started.
Copyright Andrew Tridgell and the Samba Team 1992-2006
smbd: using 'single' process model
[Switching to Thread -1210997072 (LWP 2624)]

Breakpoint 1, convert_string (from=CH_UNIX, to=CH_UTF8, src=0x888ea80,
srclen=46, dest=0x888fe71, destlen=45)
    at lib/charset/charcnv.c:173
173                                     reason="No more room"; 
(gdb) bt
#0  convert_string (from=CH_UNIX, to=CH_UTF8, src=0x888ea80, srclen=46,
dest=0x888fe71, destlen=45)
    at lib/charset/charcnv.c:173
#1  0x084dd53d in ndr_push_string (ndr=0x888fe10, ndr_flags=1, 
    s=0x888ea80 "/export/Software/Blödes Verzeichnis/DISK.002") at
librpc/ndr/ndr_string.c:416
#2  0x08714594 in ndr_push_opendb_file (ndr=0x888fe10, ndr_flags=3,
r=0xbffb64e8) at librpc/gen_ndr/ndr_opendb.c:98
#3  0x084d74e1 in ndr_push_struct_blob (blob=0xbffb647c, mem_ctx=0x888fcf8,
p=0xbffb64e8, 
    fn=0x87144ba <ndr_push_opendb_file>) at librpc/ndr/ndr.c:744
#4  0x085e830d in odb_push_record (lck=0x888fcf8, file=0xbffb64e8) at
ntvfs/common/opendb.c:237
#5  0x085e85d4 in odb_open_file (lck=0x888fcf8, file_handle=0x888f000,
stream_id=0, share_access=3, access_mask=131487, 
    delete_on_close=false, path=0x888ea80 "/export/Software/Blödes
Verzeichnis/DISK.002") at ntvfs/common/opendb.c:308
#6  0x0863aadf in pvfs_create_file (pvfs=0x8871810, req=0x888e2c8,
name=0x888e888, io=0x888e658)
    at ntvfs/posix/pvfs_open.c:681
#7  0x0863b70f in pvfs_open (ntvfs=0x88808e8, req=0x888e2c8, io=0x888e658)
at ntvfs/posix/pvfs_open.c:1079
#8  0x08410362 in ntvfs_next_open (ntvfs=0x8881da0, req=0x888e2c8,
oi=0x888e658) at ntvfs/ntvfs_interface.c:465
#9  0x082a7bd9 in unixuid_open (ntvfs=0x8881da0, req=0x888e2c8,
io=0x888e658) at ntvfs/unixuid/vfs_unixuid.c:338
#10 0x0840f44c in ntvfs_open (req=0x888e2c8, oi=0x888e658) at
ntvfs/ntvfs_interface.c:112
#11 0x08164c31 in smbsrv_reply_ntcreate_and_X (req=0x888e5a0) at
smb_server/smb/reply.c:2122
#12 0x081585ec in switch_message (type=162, req=0x888e5a0) at
smb_server/smb/receive.c:559
#13 0x0815819f in smbsrv_recv_smb_request (private=0x887aea0, blob={data =
0x888e4c8 "", length = 164})
    at smb_server/smb/receive.c:157
#14 0x08621025 in packet_recv (pc=0x88296c0) at lib/stream/packet.c:375
#15 0x083280ed in smbsrv_recv (conn=0x882a6e8, flags=1) at
smb_server/smb_server.c:93
#16 0x08399d0d in stream_io_handler (ev=0x881fa38, fde=0x882b330, flags=1,
private=0x882a6e8) at smbd/service_stream.c:94
#17 0x082bc3e4 in epoll_event_loop (std_ev=0x881fb38, tvalp=0xbffb6af4) at
lib/events/events_standard.c:278
#18 0x082bcf0b in std_event_loop_once (ev=0x881fa38) at
lib/events/events_standard.c:599
#19 0x082bcf79 in std_event_loop_wait (ev=0x881fa38) at
lib/events/events_standard.c:616
#20 0x082bbc8c in event_loop_wait (ev=0x881fa38) at lib/events/events.c:156
#21 0x08057f9b in binary_smbd_main (binary_name=0x872049b "smbd", argc=4,
argv=0xbffb6d74) at smbd/server.c:294
#22 0x08057ff5 in main (argc=65200, argv=0xb7f96790) at smbd/server.c:305
(gdb) 

I'll try and track down the bug, but maybe someone has already an idea about
what's going on here...?

Oh, and I'm running recent SVN from maybe 1 hour ago.

Thanks
--Michael



More information about the samba-technical mailing list