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

ra_serf fails: too many open files, with 1.8 client and server

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: ---
    • Fix Version/s: 1.8.0
    • Component/s: libsvn_ra_serf
    • Labels:
      None

      Description

      Using a trunk client with ra_serf checkout ^/subversion/branches/1.7.x and then
      switch to ^/subversion/branches/1.8.x.  On my system with ulimit -n set to 1024
      the switch fails:
      
      ../src/subversion/libsvn_client/switch.c:486,
      ../src/subversion/libsvn_client/switch.c:352,
      ../src/subversion/libsvn_wc/adm_crawler.c:845,
      ../src/subversion/libsvn_ra_serf/update.c:2897,
      ../src/subversion/libsvn_ra_serf/util.c:2093,
      ../src/subversion/libsvn_ra_serf/util.c:2074,
      ../src/subversion/libsvn_ra_serf/util.c:1694,
      ../src/subversion/libsvn_ra_serf/util.c:1408,
      ../src/subversion/libsvn_ra_serf/update.c:2334,
      ../src/subversion/libsvn_ra_serf/update.c:1491,
      ../src/subversion/libsvn_ra_serf/update.c:1055,
      ../src/subversion/libsvn_wc/update_editor.c:3647,
      ../src/subversion/libsvn_wc/adm_files.c:317,
      ../src/subversion/libsvn_subr/stream.c:888,
      ../src/subversion/libsvn_subr/io.c:4650,
      ../src/subversion/libsvn_subr/io.c:4465: (apr_err=EMFILE)
      svn: E000024: Can't create temporary file from template
      '/home/pm/sw/subversion/src-1.8/.svn/tmp/svn-XXXXXX': Too many open files
      
      Looking at /proc/NNN/fd I see that the program has 558 open files in .svn/tmp
      and 455 open files in .svn/pristine.
      
      The same switch is perfectly OK with 1.7/neon.
      
      
      Stack trace when raising the error:
      
      #0  temp_file_create (new_file=0x7fffffffd018, new_file_name=0x7fffffffd010, 
          directory=0x7ffff06f6278 "/home/pm/sw/subversion/src-1.8/.svn/tmp", 
          flags=231, result_pool=0x7ffff06f4028, scratch_pool=0x7ffff06f6028)
          at ../src/subversion/libsvn_subr/io.c:4465
      #1  0x00007ffff6fd9580 in svn_io_open_unique_file3 (file=0x7fffffffd0a0, 
          unique_path=0x7ffff06f40c0, 
          dirpath=0x7ffff06f6278 "/home/pm/sw/subversion/src-1.8/.svn/tmp", 
          delete_when=svn_io_file_del_none, result_pool=0x7ffff06f4028, 
          scratch_pool=0x7ffff06f6028) at ../src/subversion/libsvn_subr/io.c:4649
      #2  0x00007ffff6ff4ead in svn_stream_open_unique (stream=0x7fffffffd168, 
          temp_path=0x7ffff06f40c0, 
          dirpath=0x7ffff06f6278 "/home/pm/sw/subversion/src-1.8/.svn/tmp", 
          delete_when=svn_io_file_del_none, result_pool=0x7ffff06f4028, 
          scratch_pool=0x7ffff06f6028) at ../src/subversion/libsvn_subr/stream.c:887
      #3  0x00007ffff788962b in svn_wc__open_writable_base (stream=0x7fffffffd168, 
          temp_base_abspath=0x7ffff06f40c0, md5_checksum=0x0, 
          sha1_checksum=0x7ffff06f40f0, db=0x7ffff7fe6090, 
          wri_abspath=0x7ffff7f28218 "/home/pm/sw/subversion/src-1.8", 
          result_pool=0x7ffff06f4028, scratch_pool=0x7ffff06f6028)
          at ../src/subversion/libsvn_wc/adm_files.c:313
      #4  0x00007ffff78dc8d7 in apply_textdelta (file_baton=0x7ffff06f20a0, 
          expected_checksum=0x7ffff06f8800 "2d1da6bac1710df5026aff22c924f0e3", 
          pool=0x7ffff06f6028, handler=0x7ffff0716e50, handler_baton=0x7ffff0716e58)
          at ../src/subversion/libsvn_wc/update_editor.c:3640
      #5  0x00007ffff744c93a in apply_textdelta (file_baton=0x7ffff06f60a0, 
          base_checksum=0x7ffff06f8800 "2d1da6bac1710df5026aff22c924f0e3", 
          pool=0x7ffff06f6028, handler=0x7ffff0716e50, handler_baton=0x7ffff0716e58)
          at ../src/subversion/libsvn_delta/cancel.c:217
      #6  0x00007ffff5af3aea in open_updated_file (info=0x7ffff0716dc8, 
          force_apply_textdelta=0, scratch_pool=0x7ffff06f8028)
          at ../src/subversion/libsvn_ra_serf/update.c:1051
      #7  0x00007ffff5af4a5f in fetch_file (ctx=0x7ffff7f69a80, info=0x7ffff0716dc8)
          at ../src/subversion/libsvn_ra_serf/update.c:1491
      #8  0x00007ffff5af7296 in end_report (parser=0x7ffff7f74650, name=..., 
          scratch_pool=0x7ffff7e82028)
          at ../src/subversion/libsvn_ra_serf/update.c:2334
      #9  0x00007ffff5afc1fc in end_xml (userData=0x7ffff7f74650, 
          raw_name=0x888db0 "S:open-file")
          at ../src/subversion/libsvn_ra_serf/util.c:1314
      #10 0x00007ffff569ba04 in ?? () from /lib/x86_64-linux-gnu/libexpat.so.1
      #11 0x00007ffff569cc61 in ?? () from /lib/x86_64-linux-gnu/libexpat.so.1
      #12 0x00007ffff569ea6d in XML_ParseBuffer ()
         from /lib/x86_64-linux-gnu/libexpat.so.1
      #13 0x00007ffff5afc4ac in inject_to_parser (ctx=0x7ffff7f74650, 
          data=0x7ffff7f22064 "60259</S:set-prop>\n<S:set-prop
      name=\"svn:entry:committed-date\">2012-07-11T16:15:06.352188Z</S:set-prop>\n<S:set-prop
      name=\"svn:entry:last-author\">stefan2</S:set-prop>\n<S:set-prop
      name=\"svn:entry:uuid\">"..., len=3210, sl=0x7fffffffd700) at
      ../src/subversion/libsvn_ra_serf/util.c:1395
      #14 0x00007ffff5afce2e in svn_ra_serf__handle_xml_parser (
          request=0x7ffff7f26038, response=0x7ffff7f1c6b8, baton=0x7ffff7f74650, 
          pool=0x7ffff7f12028) at ../src/subversion/libsvn_ra_serf/util.c:1681
      

        Attachments

        1. 1_x.x
          6 kB
          Philip Martin

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              philipm Philip Martin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: