Bug 8082 - Conversion error: Illegal multibyte sequence
Summary: Conversion error: Illegal multibyte sequence
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Printing (show other bugs)
Version: 3.5.6
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Guenther Deschner
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 12:45 UTC by Piviul
Modified: 2020-12-29 11:30 UTC (History)
2 users (show)

See Also:


Attachments
log debug level 10 (1007.36 KB, text/plain)
2011-04-20 14:14 UTC, Piviul
no flags Details
tshark log file (766.12 KB, application/octet-stream)
2011-04-20 14:17 UTC, Piviul
no flags Details
loglevel 10 on 3.5.11 (456.95 KB, application/octet-stream)
2011-08-19 14:34 UTC, Piviul
no flags Details
tshark log file on 3.5.11 (42.17 KB, application/octet-stream)
2011-08-19 14:35 UTC, Piviul
no flags Details
3.5.6 log 10 (1018.37 KB, application/octet-stream)
2011-09-26 16:26 UTC, Achim Gottinger
no flags Details
tshark log (2.25 MB, application/octet-stream)
2011-09-26 16:28 UTC, Achim Gottinger
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piviul 2011-04-12 12:45:12 UTC
Hi all, I have a virtual printer having these settings in smb.conf:

[tuning]
comment = Conversione in PDF delle stampe di tuning degli strumenti
force group="@DOMINIOCSA\domain users"
printing = bsd
path = /tmp
printable = yes
guest ok = yes
print command = /opt/scripts/bin/tuningPDF.sh %s %H "%J" %p %m %S
'default' %D %H

When windows client print on it sometimes (very often) they get the error: couldn't start print job and in samba log I can find:

[2011/04/06 17:17:04.757701, 0] lib/charcnv.c:650(convert_string_talloc)
Conversion error: Illegal multibyte sequence(9 Æ)
[2011/04/06 17:17:04.758030, 0] rpc_server/srv_pipe.c:2439(api_rpcTNP)
api_rpcTNP: \spoolss: SPOOLSS_OPENPRINTEREX failed.

Until windows users doesn't restart the printer spooler they can't print any more and samba doesn't log any related print error.

If you need more information I'll be glad to send you

Have a great day

Piviul
Comment 1 Gennady G. Marchenko 2011-04-19 11:35:12 UTC
Same problem, when tries to print something with filename like "Исх. № 131 от 19.04.2011 (Приглашение, Луиджи).doc" to samba 3.4.9 printer with CUPS printer (http://cups.org/documentation.php/man-cupsaddsmb.html) from windows xp sp2

there is an error:

[2011/04/19 15:23:11,  0] lib/charcnv.c:641(convert_string_allocate)
  Conversion error: Illegal multibyte sequence(.! )
[2011/04/19 15:23:11,  1] ../librpc/ndr/ndr.c:377(ndr_pull_error)
  ndr_pull_error(5): Bad character conversion
[2011/04/19 15:23:11,  0] rpc_server/srv_pipe.c:2332(api_rpcTNP)
  api_rpcTNP: \spoolss: SPOOLSS_STARTDOCPRINTER failed.

If we will rename filename to "test.doc" - all works fine.
Comment 2 Stefan Metzmacher 2011-04-19 11:45:19 UTC
I assume this is related to
https://bugzilla.samba.org/show_bug.cgi?id=7594
Comment 3 Gennady G. Marchenko 2011-04-19 15:46:37 UTC
I have updated to 3.5.6 and problem with print was gone.
Comment 4 Stefan Metzmacher 2011-04-19 17:38:18 UTC
Thanks for the feedback!

Piviul, does this also solve your problem?
Comment 5 Piviul 2011-04-20 07:04:44 UTC
No, the samba version I use is already the 3.5.6 (I use debian squeeze). Before the upgrading to squeeze (debian lenny with samba 3.2.5) samba printing was working correctly.  If you need some more infos I'll be glad to send you.

Have a great day

Piviul
Comment 6 Stefan Metzmacher 2011-04-20 08:08:55 UTC
If this still happens in 3.5.8, please upload a log file with "log level = 10"
and a network capture.

See
https://wiki.samba.org/index.php/Client_specific_Log
and
https://wiki.samba.org/index.php/Capture_Packets
Comment 7 Piviul 2011-04-20 08:22:34 UTC
The server having the problem is a production server so I prefer don't upgrade it. Do you think is usefull for you if I attach log level and capture network of this samba version?

Piviul
Comment 8 Stefan Metzmacher 2011-04-20 08:54:53 UTC
It can't hurt:-)
Comment 9 Piviul 2011-04-20 14:14:50 UTC
Created attachment 6420 [details]
log debug level 10

This is the loglevel 10 of the client during a print failure
Comment 10 Piviul 2011-04-20 14:17:06 UTC
Created attachment 6421 [details]
tshark log file

This is the tshark log file during the same printing failure
Comment 11 Piviul 2011-04-21 15:14:13 UTC
I can confirm that the problem depends from the /unix charset/ option of smb.conf. If this option is set to UTF8 the problem disappear.

Have a great day

Piviul
Comment 12 Piviul 2011-08-19 14:34:33 UTC
Created attachment 6790 [details]
loglevel 10 on 3.5.11

The bug persists in samba 3.5.11 too. I attach the log level 10.
Comment 13 Piviul 2011-08-19 14:35:43 UTC
Created attachment 6791 [details]
tshark log file on 3.5.11

tshark for the same problem
Comment 14 Achim Gottinger 2011-09-26 16:24:25 UTC
Also having this erroro messages here randomly at five different office branches. All servers are debia lenny 64bit systems with latest samba 3.5.6 from the backport repository. Today i managed to grab an tshark log and an samba level 10 log.
The client is an win2003 based terminalserver with citrix presentation manager 4.5 on top. Printers are connected via network accross an ipsec based vpn.
If the multibyte error occures, nothing get's passed to the cups server and all printers on the samba printserver flap between not found and connecting for a while. After a few minutes printing works without further intervention.
Can provide more information if neccesary.
Comment 15 Achim Gottinger 2011-09-26 16:26:54 UTC
Created attachment 6939 [details]
3.5.6 log 10

Log contains two failed print tries
Comment 16 Achim Gottinger 2011-09-26 16:28:04 UTC
Created attachment 6940 [details]
tshark log
Comment 17 Achim Gottinger 2011-10-12 12:01:32 UTC
Update: Did backport the more actual 3.5.11 samba from debian wheezy to lenny, but it didi not fix the sporadic occuring multibyte sequence errors. Since the clients are all still windows xp machines I downgraded to the shipping samba version of lenny 3.2.5 and since then the errors are gone and printing works as expected.
Having trouble backporting the 3.6.0-1 samba package from the debian testing branch, otherwise I'd have tried that version.
To be future proof I'd prefer to run an samba version which supports windows 7 domain logons gonna try 3.2.15 next.
Comment 18 Björn Jacke 2020-12-29 11:30:36 UTC
I don't think this is an issue in up-to-date samba releases. If this still happend with 4.13, please file a new bug report for that.