Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-2157

unable to access repository via apache due to utf-8 errors

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Blocker
    • Resolution: Unresolved
    • Affects Version/s: 1.1.x
    • Fix Version/s: unscheduled
    • Component/s: libsvn_subr
    • Labels:
      None
    • Environment:

      SunOS

      Description

      i am trying to access repository via apache and getting:
      
      "Could not open the requested SVN filesystem"
      
      i can perform file-based operations on repository as user svn without any
      problems (import/checkout/commit/update/log).
      
      repository created as user svn with:
      
      cd /www/svn/repository
      svnadmin create --fs-type fsfs test
      
      everything underneath /www/svn is owned by svn:svn
      
      apache runtime environment:
      ===========================
      THREADS_TYPE=native_threads
      LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/opt/OpenSSL/lib:/opt/apache2/lib:/usr/platform/SUNW,Ultra-4/lib:/usr/ccs/lib:/opt/Svn/lib
      
      relevant lines from httpd.conf:
      ===============================
      User svn
      Group svn
      LoadModule dav_module		modules/mod_dav.so
      LoadModule dav_svn_module	modules/mod_dav_svn.so
      <Location /repos>
      	DAV svn
      	SVNParentPath /www/svn/repository
      </Location>
      
      if i run ps -fu svn i can see the relevant apache processess running as a
      correct user
      
      
      when i try to access http://hostname/repos/test, i get the following in the
      apache error log (LogLevel debug):
      
      [Tue Nov 30 13:45:01 2004] [notice] Apache configured -- resuming normal operations
      [Tue Nov 30 13:45:01 2004] [info] Server built: Nov 25 2004 13:48:13
      [Tue Nov 30 13:45:01 2004] [debug] worker.c(1631): AcceptMutex: pthread
      (default: fcntl)
      [Tue Nov 30 13:45:59 2004] [error] [client 1.2.3.4] (20014)Error string not
      specified yet: Can't create a converter from 'native' to 'UTF-8'
      [Tue Nov 30 13:45:59 2004] [error] [client 1.2.3.4] Could not fetch resource
      information.  [500, #0]
      [Tue Nov 30 13:45:59 2004] [error] [client 1.2.3.4] Could not open the requested
      SVN filesystem  [500, #2]
      [Tue Nov 30 13:45:59 2004] [error] [client 1.2.3.4] Could not open the requested
      SVN filesystem  [500, #2]
      [Tue Nov 30 13:45:59 2004] [debug] mod_headers.c(526): headers:
      ap_headers_output_filter()
      [Tue Nov 30 13:47:36 2004] [info] removed PID file
      /opt/apache2/logs/httpd.pid.svn (pid=24437)
      [Tue Nov 30 13:47:36 2004] [notice] caught SIGTERM, shutting down
      
      corresponding entry in the access log:
      
      1.2.3.4 - - [30/Nov/2004:13:45:59 -0500] "GET /repos/test HTTP/1.1" 500 234 "-"
      "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107
      Firefox/1.0" "-" "-"
      
      i tried using "SVNPath /www/svn/repository/test" instead of "SVNParentPath
      /www/svn/repository", the result is exactly the same when i try to access
      http://hostname/repos
      
      i also tried the following without success:
      
      find /www/svn/repository -exec chmod 777 {} \;
      
      
      
      httpd -l:
      =========
      Compiled in modules:
      core.c
      mod_access.c
      mod_auth.c
      mod_log_config.c
      mod_headers.c
      mod_setenvif.c
      worker.c
      http_core.c
      mod_mime.c
      mod_status.c
      mod_cgid.c
      mod_dir.c
      mod_alias.c
      mod_so.c
      
      ldd httpd:
      ==========
      libz.so =>       /usr/local/lib/libz.so
      libssl.so.0.9.7 =>       /opt/OpenSSL/lib/libssl.so.0.9.7
      libcrypto.so.0.9.7 =>    /opt/OpenSSL/lib/libcrypto.so.0.9.7
      libaprutil-0.so.0 =>     /opt/Svn/lib/libaprutil-0.so.0
      libexpat.so.0 =>         /usr/local/lib/libexpat.so.0
      libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
      libapr-0.so.0 =>         /opt/Svn/lib/libapr-0.so.0
      libsendfile.so.1 =>      /usr/lib/libsendfile.so.1
      librt.so.1 =>    /usr/lib/librt.so.1
      libm.so.1 =>     /usr/lib/libm.so.1
      libsocket.so.1 =>        /usr/lib/libsocket.so.1
      libnsl.so.1 =>   /usr/lib/libnsl.so.1
      libresolv.so.2 =>        /usr/lib/libresolv.so.2
      libpthread.so.1 =>       /usr/lib/libpthread.so.1
      libdl.so.1 =>    /usr/lib/libdl.so.1
      libc.so.1 =>     /usr/lib/libc.so.1
      libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
      libaio.so.1 =>   /usr/lib/libaio.so.1
      libmp.so.2 =>    /usr/lib/libmp.so.2
      libthread.so.1 =>        /usr/lib/libthread.so.1
      /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
      
      ldd mod_dav.so:
      ===============
      libc.so.1 =>     /usr/lib/libc.so.1
      libdl.so.1 =>    /usr/lib/libdl.so.1
      /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
      
      ldd mod_dav_svn.so:
      ===================
      libsvn_repos-1.so.0 =>   /opt/Svn/lib/libsvn_repos-1.so.0
      libsvn_fs-1.so.0 =>      /opt/Svn/lib/libsvn_fs-1.so.0
      libsvn_delta-1.so.0 =>   /opt/Svn/lib/libsvn_delta-1.so.0
      libsvn_subr-1.so.0 =>    /opt/Svn/lib/libsvn_subr-1.so.0
      libsocket.so.1 =>        /usr/lib/libsocket.so.1
      libz.so =>       /usr/local/lib/libz.so
      libc.so.1 =>     /usr/lib/libc.so.1
      libaprutil-0.so.0 =>     /opt/Svn/lib/libaprutil-0.so.0
      libexpat.so.0 =>         /usr/local/lib/libexpat.so.0
      libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
      libapr-0.so.0 =>         /opt/Svn/lib/libapr-0.so.0
      libsendfile.so.1 =>      /usr/lib/libsendfile.so.1
      librt.so.1 =>    /usr/lib/librt.so.1
      libm.so.1 =>     /usr/lib/libm.so.1
      libnsl.so.1 =>   /usr/lib/libnsl.so.1
      libresolv.so.2 =>        /usr/lib/libresolv.so.2
      libpthread.so.1 =>       /usr/lib/libpthread.so.1
      libdl.so.1 =>    /usr/lib/libdl.so.1
      libsvn_fs_fs-1.so.0 =>   /opt/Svn/lib/libsvn_fs_fs-1.so.0
      libaio.so.1 =>   /usr/lib/libaio.so.1
      libmp.so.2 =>    /usr/lib/libmp.so.2
      /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
      libthread.so.1 =>        /usr/lib/libthread.so.1
      
      
      subversion built with:
      ======================
      MAKE=/usr/local/bin/make
      APACHE_HOME=/opt/apache2
      SSL_HOME=/opt/OpenSSL
      
      ./configure \
      --with-apxs=$APACHE_HOME/bin/apxs \
      --without-berkeley-db \
      --prefix=/opt/VSDSvn \
      --with-zlib \
      --enable-shared \
      --disable-mod-activation \
      --with-ssl \
      --with-libs=$SSL_HOME && \
      $MAKE && \
      $MAKE check
      
      apache built with:
      ==================
      SSL_BASE=/opt/OpenSSL
      LIBS=/usr/lib/libC.so.5
      CFLAGS=-fPIC
      
      ./configure \
      --with-ssl=/opt/OpenSSL \
      --with-z=/usr/local/lib \
      --prefix=/opt/apache2 \
      --with-mpm=worker \
      --enable-nonportable-atomics \
      --disable-include \
      --disable-env \
      --disable-autoindex \
      --disable-asis \
      --disable-negotiation \
      --disable-imap \
      --disable-actions \
      --disable-userdir \
      --enable-modules="access alias auth cgid dir headers log_config mime
      setenvif so status" \
      --enable-mods-shared="rewrite autoindex ssl dav deflate proxy proxy-http
      proxy-connect" \
      && make
      
      host environment:
      =================
      SunOS 5.8 Generic_117000-05 sun4u sparc SUNW,Ultra-4
      expat-1.95
      python-2.3.3
      libtool-1.5
      perl-5.8.5
      autoconf-2.59
      zlib-1.2.2
      gcc-3.4.2
      libiconv-1.8
      openssl-0.9.7e
      apache-2.0.52
      subversion-1.1.1
      
      
      
      ====================
      
      Cory Omand (comand at blastwave dot org) sent me a patch that solved the problem
      for me. Below is his note:
      
      "I patched SVN 1.1.1 to remove the issues with the 'no converter found for UTF8
      -> Native' (or similar).  Basically, it's a problem with the APR conversion
      function, which is using a macro that does not appear to be expanding correctly
      on Solaris.  It's probably not the best solution, but it works for everyone that
      uses the blastwave packages -- I've attached the patch."
      
      utf.diff:
      ====================
      --- subversion-1.1.1.orig/subversion/libsvn_subr/utf.c	2004-10-21
      17:58:12.000000000 -0400
      +++ subversion-1.1.1/subversion/libsvn_subr/utf.c	2004-10-26 12:55:05.525332000
      -0400
      @@ -216,8 +216,8 @@
              this file, leading to infinite recursion. */
           return svn_error_createf
             (apr_err, NULL, "Can't create a converter from '%s' to '%s'",
      -       (topage == APR_LOCALE_CHARSET ? "native" : topage),
      -       (frompage == APR_LOCALE_CHARSET ? "native" : frompage));
      +       (topage == "ASCII" ? "native" : topage),
      +       (frompage == "ASCII" ? "native" : frompage));
       
         return SVN_NO_ERROR;
       }
      @@ -261,7 +261,7 @@
       static svn_error_t *
       get_ntou_xlate_handle_node (xlate_handle_node_t **ret, apr_pool_t *pool)
       {
      -  return get_xlate_handle_node (ret, "UTF-8", APR_LOCALE_CHARSET,
      +  return get_xlate_handle_node (ret, "UTF-8", "ASCII",
                                       SVN_UTF_NTOU_XLATE_HANDLE, pool);
       }
       
      @@ -274,7 +274,7 @@
       static svn_error_t *
       get_uton_xlate_handle_node (xlate_handle_node_t **ret, apr_pool_t *pool)
       {
      -  return get_xlate_handle_node (ret, APR_LOCALE_CHARSET, "UTF-8",
      +  return get_xlate_handle_node (ret, "ASCII", "UTF-8",
                                       SVN_UTF_UTON_XLATE_HANDLE, pool);
       }
      ====================
      
      the problem also exists with the Rev12095 from TRUNK that i pulled down and
      tried a few days ago.
      
      relevant mailing lists discussion:
      http://subversion.tigris.org/servlets/BrowseList?list=dev&by=thread&from=264039
      

      Original issue reported by amaximov

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              subversion-importer Subversion Importer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: