[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [BUG] svn log output truncated on IRIX.

From: Carsten Koch <Carsten.Koch_at_icem.com>
Date: 2006-06-21 23:30:20 CEST

Julian Foad wrote:
> Carsten Koch wrote:
> [...]
>> The log entry simply stops before the first Umlaut.
>> The output continues with the next log entry without
>> a line feed.
>>
>> I tried my test case on AIX, HP-UX, IRIX, Linux and Solaris.
>> It fails only on IRIX.
> [...]
>>
>> I'll be happy to debug this, but I have no idea
>> where to start looking. Can somebody point me to
>> the right place in the source, please?
>
> The output is converted to the local character encoding and printed
> within the function svn_cmdline_printf(), called near the end of
> log_message_receiver() in subversion/svn/log-cmd.c. You need to step
> through that and see where it truncates the output and why it doesn't
> return an error when doing so.

Thanks!

I did and found out that log_message_receiver calls svn_cmdline_printf,
which calls svn_cmdline_fputs, which calls svn_cmdline_cstring_from_utf8,
which calls svn_utf_cstring_from_utf8, which calls convert_cstring,
which calls convert_to_stringbuf, which calls apr_xlate_conv_buffer,
which puts a 0 byte into the buffer and continues to convert happily
after that without returning an error message.

Here is some output from the debugger:

(dbx) next
Process 83874 Thread 0x10000 (svn) stopped at [apr_xlate_conv_buffer:357 ,0x422ffb4]
 357 if (translated == (apr_size_t)-1) {
(dbx) print translated
5
(dbx) print inbuf
0x100470a8 = "\nMod author: wahl.\nMod name: wahl-0522-approximation.\nMod description:\n\nISD: remove unused approximation ui sources:\nL\342\200\224sche \..."
(dbx) print outbuf
0x10047378 = "\nMod author: wahl.\nMod name: wahl-0522-approximation.\nMod description:\n\nISD: remove unused approximation ui sources:\nL"
(dbx) 0x10047378/200c
10047378: '\12' 'M' 'o' 'd' ' ' 'a' 'u' 't' 'h' 'o' 'r' ':' ' ' 'w' 'a' 'h'
10047388: 'l' '.' '\12' 'M' 'o' 'd' ' ' 'n' 'a' 'm' 'e' ':' ' ' 'w' 'a' 'h'
10047398: 'l' '-' '0' '5' '2' '2' '-' 'a' 'p' 'p' 'r' 'o' 'x' 'i' 'm' 'a'
100473a8: 't' 'i' 'o' 'n' '.' '\12' 'M' 'o' 'd' ' ' 'd' 'e' 's' 'c' 'r' 'i'
100473b8: 'p' 't' 'i' 'o' 'n' ':' '\12' '\12' 'I' 'S' 'D' ':' ' ' 'r' 'e' 'm'
100473c8: 'o' 'v' 'e' ' ' 'u' 'n' 'u' 's' 'e' 'd' ' ' 'a' 'p' 'p' 'r' 'o'
100473d8: 'x' 'i' 'm' 'a' 't' 'i' 'o' 'n' ' ' 'u' 'i' ' ' 's' 'o' 'u' 'r'
100473e8: 'c' 'e' 's' ':' '\12' 'L' '\0' 's' 'c' 'h' 'e' ' ' ' ' ' ' ' ' ' '
100473f8: ' ' ' ' ' ' ' ' 's' 'r' 'c' '\' 'P' 'r' 'o' 'd' 'u' 'c' 't' 's'
10047408: '\' 'I' 'C' 'M' 'C' 'L' 'A' 'S' 'h' 'a' 'p' 'e' 'U' 'I' '\' 'C'
10047418: 'N' 'e' 'x' 't' '\' 'r' 'e' 's' 'o' 'u' 'r' 'c' 'e' 's' '\' 'm'
10047428: 's' 'g' 'c' 'a' 't' 'a' 'l' 'o' 'g' '\' 'F' 'r' 'e' 'n' 'c' 'h'
10047438: '\' 'I' 'C' 'M' 'C' 'L' 'A' 'S'
(dbx) where

Thread 0x10000
> 0 apr_xlate_conv_buffer(convset = 0x10031910, inbuf = 0x100470a8 = "\nMod author: wahl.\nMod name: wahl-0522-approximation.\nMod description:\n\nISD: remove unused approximation ui sources:\nL\342\200\224sche \...", inbytes_left = 0x7ffd7034, outbuf = 0x10047378 = "\nMod author: wahl.\nMod name: wahl-0522-approximation.\nMod description:\n\nISD: remove unused approximation ui sources:\nL", outbytes_left = 0x7ffd7038) ["/opt/local/source/subversion-1.3.2/apr-util/xlate/xlate.c":357, 0x422ffb4]
   1 convert_to_stringbuf(node = 0x10031950, src_data = 0x100470a8 = "\nMod author: wahl.\nMod name: wahl-0522-approximation.\nMod description:\n\nISD: remove unused approximation ui sources:\nL\342\200\224sche \...", src_length = 691, dest = 0x7ffd7090, pool = 0x100469d8) ["/opt/local/source/subversion-1.3.2/subversion/libsvn_subr/utf.c":432, 0x41e9a1c]
   2 convert_cstring(dest = 0x7ffd7160, src = 0x100470a8 = "\nMod author: wahl.\nMod name: wahl-0522-approximation.\nMod description:\n\nISD: remove unused approximation ui sources:\nL\342\200\224sche \...", node = 0x10031950, pool = 0x100469d8) ["/opt/local/source/subversion-1.3.2/subversion/libsvn_subr/utf.c":655, 0x41ea3f4]
   3 svn_utf_cstring_from_utf8(dest = 0x7ffd7160, src = 0x100470a8 = "\nMod author: wahl.\nMod name: wahl-0522-approximation.\nMod description:\n\nISD: remove unused approximation ui sources:\nL\342\200\224sche \...", pool = 0x100469d8) ["/opt/local/source/subversion-1.3.2/subversion/libsvn_subr/utf.c":780, 0x41eaaf8]
   4 svn_cmdline_cstring_from_utf8(dest = 0x7ffd7160, src = 0x100470a8 = "\nMod author: wahl.\nMod name: wahl-0522-approximation.\nMod description:\n\nISD: remove unused approximation ui sources:\nL\342\200\224sche \...", pool = 0x100469d8) ["/opt/local/source/subversion-1.3.2/subversion/libsvn_subr/cmdline.c":182, 0x41cb808]
   5 svn_cmdline_fputs(string = 0x100470a8 = "\nMod author: wahl.\nMod name: wahl-0522-approximation.\nMod description:\n\nISD: remove unused approximation ui sources:\nL\342\200\224sche \...", stream = 0x447f7a0, pool = 0x100469d8) ["/opt/local/source/subversion-1.3.2/subversion/libsvn_subr/cmdline.c":263, 0x41cbb1c]
   6 svn_cmdline_printf(pool = 0x100469d8, fmt = 0x10025df0 = "\n%s\n", ... = <void>) ["/opt/local/source/subversion-1.3.2/subversion/libsvn_subr/cmdline.c":239, 0x41cba40]
   7 log_message_receiver(baton = 0x7ffd7c88, changed_paths = (nil), rev = 22752, author = 0x10046a10 = "mg", date = 0x10046cf0 = "2006-05-24 09:07:16 +0200 (Wed, 24 May 2006)", msg = 0x10046a38 = "Mod author: wahl.\nMod name: wahl-0522-approximation.\nMod description:\n\nISD: remove unused approximation ui sources:\nL\342\200\224sche \...", pool = 0x100469d8) ["/opt/local/source/subversion-1.3.2/subversion/clients/cmdline/log-cmd.c":231, 0x1000d42c]
   8 log_end_element(userdata = 0x7ffd7a60, elm = 0x41930f0, cdata = 0x10056420 = "Mod author: wahl.\nMod name: wahl-0522-approximation.\nMod description:\n\nISD: remove unused approximation ui sources:\nL\342\200\224sche \...") ["/opt/local/source/subversion-1.3.2/subversion/libsvn_ra_dav/log.c":228, 0x4183af8]
   9 shim_endelm(userdata = 0x10054260, state = 235, nspace = 0x10043a80 = "svn:", name = 0x1004ad30 = "log-item") ["/opt/local/source/subversion-1.3.2/subversion/libsvn_ra_dav/util.c":199, 0x418cab0]
   10 end_element(userdata = 0x1004b018, name = 0x10051b8f = "S:log-item") ["/opt/local/source/subversion-1.3.2/neon/src/ne_xml.c":390, 0x42a7dbc]
   11 doContent(parser = 0x100556b8, startTagLevel = 0, enc = 0x42fb8a0, s = 0x10051300 = "</S:log-item>\n</S:log-report>\n/2.0.54 OpenSSL/0.\020\004\302\030", end = 0x1005131e = "/2.0.54 OpenSSL/0.\020\004\302\030", nextPtr = 0x100556d0) ["/opt/local/source/subversion-1.3.2/apr-util/xml/expat/lib/xmlparse.c":1744, 0x42caf58]
   12 contentProcessor(parser = 0x100556b8, start = 0x10050f77 = "<S:log-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:log-item>\n<D:version-name>22752</D:version-name>\n<D:creator-displayname>mg</D:cr\...", end = 0x1005131e = "/2.0.54 OpenSSL/0.\020\004\302\030", endPtr = 0x100556d0) ["/opt/local/source/subversion-1.3.2/apr-util/xml/expat/lib/xmlparse.c":1354, 0x42c9abc]
   13 doProlog(parser = 0x100556b8, enc = 0x42fb8a0, s = 0x10050f77 = "<S:log-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:log-item>\n<D:version-name>22752</D:version-name>\n<D:creator-displayname>mg</D:cr\...", end = 0x1005131e = "/2.0.54 OpenSSL/0.\020\004\302\030", tok = 29, next = 0x10050f77 = "<S:log-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:log-item>\n<D:version-name>22752</D:version-name>\n<D:creator-displayname>mg</D:cr\...", nextPtr = 0x100556d0) ["/opt/local/source/subversion-1.3.2/apr-util/xml/expat/lib/xmlparse.c":2692, 0x42ce0bc]
   14 prologProcessor(parser = 0x100556b8, s = 0x10050f50 = "<\?xml version=\"1.0\" encoding=\"utf-8\"\?>\n<S:log-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:log-item>\n<D:version-name>22752</D:versio\...", end = 0x1005131e = "/2.0.54 OpenSSL/0.\020\004\302\030", nextPtr = 0x100556d0) ["/opt/local/source/subversion-1.3.2/apr-util/xml/expat/lib/xmlparse.c":2528, 0x42cd914]
   15 prologInitProcessor(parser = 0x100556b8, s = 0x10050f50 = "<\?xml version=\"1.0\" encoding=\"utf-8\"\?>\n<S:log-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:log-item>\n<D:version-name>22752</D:versio\...", end = 0x1005131e = "/2.0.54 OpenSSL/0.\020\004\302\030", nextPtr = 0x100556d0) ["/opt/local/source/subversion-1.3.2/apr-util/xml/expat/lib/xmlparse.c":2517, 0x42cd86c]
   16 XML_ParseBuffer(parser = 0x100556b8, len = 974, isFinal = 0) ["/opt/local/source/subversion-1.3.2/apr-util/xml/expat/lib/xmlparse.c":1155, 0x42c9210]
   17 XML_Parse(parser = 0x100556b8, s = 0x10048a08 = "<\?xml version=\"1.0\" encoding=\"utf-8\"\?>\n<S:log-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:log-item>\n<D:version-name>22752</D:versio\...", len = 974, isFinal = 0) ["/opt/local/source/subversion-1.3.2/apr-util/xml/expat/lib/xmlparse.c":1145, 0x42c911c]
   18 ne_xml_parse(p = 0x1004b018, block = 0x10048a08 = "<\?xml version=\"1.0\" encoding=\"utf-8\"\?>\n<S:log-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:log-item>\n<D:version-name>22752</D:versio\...", len = 974) ["/opt/local/source/subversion-1.3.2/neon/src/ne_xml.c":530, 0x42a82c8]
   19 ne_xml_parse_v(userdata = 0x1004b018, block = 0x10048a08 = "<\?xml version=\"1.0\" encoding=\"utf-8\"\?>\n<S:log-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:log-item>\n<D:version-name>22752</D:versio\...", len = 974) ["/opt/local/source/subversion-1.3.2/neon/src/ne_xml.c":484, 0x42a81d4]
   20 gz_reader(ud = 0x1004ce50, buf = 0x10048a08 = "<\?xml version=\"1.0\" encoding=\"utf-8\"\?>\n<S:log-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:log-item>\n<D:version-name>22752</D:versio\...", len = 974) ["/opt/local/source/subversion-1.3.2/neon/src/ne_compress.c":306, 0x42a609c]
   21 ne_read_response_block(req = 0x100489c8, buffer = 0x10048a08 = "<\?xml version=\"1.0\" encoding=\"utf-8\"\?>\n<S:log-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:log-item>\n<D:version-name>22752</D:versio\...", buflen = 8192) ["/opt/local/source/subversion-1.3.2/neon/src/ne_request.c":882, 0x4296eb4]
   22 ne_discard_response(req = 0x100489c8) ["/opt/local/source/subversion-1.3.2/neon/src/ne_request.c":1418, 0x4298c70]
   23 ne_request_dispatch(req = 0x100489c8) ["/opt/local/source/subversion-1.3.2/neon/src/ne_request.c":1430, 0x4298cec]
   24 parsed_request(sess = 0x10043ab0, method = 0x4193c60 = "REPORT", url = 0x10054240 = "/testsupport/!svn/bc/22752", body = 0x100435e8 = "<S:log-report xmlns:S=\"svn:\"><S:start-revision>22752</S:start-revision><S:end-revision>22752</S:end-revision><S:path></S:path></\...", body_file = (nil), set_parser = (nil), elements = 0x41930e0, use_neon_shim = 1, validate_compat_cb = 0x4183660, startelm_compat_cb = 0x4183680, endelm_compat_cb = 0x41838e0, startelm_cb = (nil), cdata_cb = (nil), endelm_cb = (nil), baton = 0x7ffd7a60, extra_headers = (nil), status_code = (nil), spool_response = 0, pool = 0x10033810) ["/opt/local/source/subversion-1.3.2/subversion/libsvn_ra_dav/util.c":714, 0x418da2c]
   25 svn_ra_dav__parsed_request_compat(sess = 0x10043ab0, method = 0x4193c60 = "REPORT", url = 0x10054240 = "/testsupport/!svn/bc/22752", body = 0x100435e8 = "<S:log-report xmlns:S=\"svn:\"><S:start-revision>22752</S:start-revision><S:end-revision>22752</S:end-revision><S:path></S:path></\...", body_file = (nil), set_parser = (nil), elements = 0x41930e0, validate_cb = 0x4183660, startelm_cb = 0x4183680, endelm_cb = 0x41838e0, baton = 0x7ffd7a60, extra_headers = (nil), status_code = (nil), spool_response = 0, pool = 0x10033810) ["/opt/local/source/subversion-1.3.2/subversion/libsvn_ra_dav/util.c":875, 0x418dfd4]
   26 svn_ra_dav__get_log(session = 0x100433f0, paths = 0x100432a0, start = 22752, end = 22752, limit = 0, discover_changed_paths = 0, strict_node_history = 0, receiver = 0x1000cff8, receiver_baton = 0x7ffd7c88, pool = 0x10033810) ["/opt/local/source/subversion-1.3.2/subversion/libsvn_ra_dav/log.c":437, 0x4183f7c]
   27 svn_ra_get_log(session = 0x100433f0, paths = 0x100432a0, start = 22752, end = 22752, limit = 0, discover_changed_paths = 0, strict_node_history = 0, receiver = 0x1000cff8, receiver_baton = 0x7ffd7c88, pool = 0x10033810) ["/opt/local/source/subversion-1.3.2/subversion/libsvn_ra/ra_loader.c":480, 0x40550d4]
   28 svn_client_log2(targets = 0x100431b0, start = 0x7ffd7cf0, end = 0x7ffd7d00, limit = 0, discover_changed_paths = 0, strict_node_history = 0, receiver = 0x1000cff8, receiver_baton = 0x7ffd7c88, ctx = 0x10033d88, pool = 0x10033810) ["/opt/local/source/subversion-1.3.2/subversion/libsvn_client/log.c":256, 0x4269ac]
   29 svn_cl__log(os = 0x10033928, baton = 0x7ffd7e88, pool = 0x10033810) ["/opt/local/source/subversion-1.3.2/subversion/clients/cmdline/log-cmd.c":510, 0x1000dd58]
   30 main(argc = 4, argv = 0x7ffd7f14) ["/opt/local/source/subversion-1.3.2/subversion/clients/cmdline/main.c":1476, 0x10010844]
   31 __start() ["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M4/csu/crt1text.s":177, 0x10007d88]

So I guess SGI's iconv is broken.

Would it be better to build a GNU iconv or
simply #undef APU_HAVE_ICONV, so the loop at
the end of apr_xlate_conv_buffer is used
(assuming that works correctly)?

Thanks and Cheers,
Carsten.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 21 23:31:10 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.