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

Segmentation fault when accessing BDB repositories with enabled run-time module search

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Won't Fix
    • 1.6.x
    • 1.10-consider
    • libsvn_fs_base
    • None

    Description

      When Subversion is configured with the '--enable-runtime-module-search' option,
      then segmentation faults occur during some operations when BDB repositories are
      accessed. This problem might be related to pool lifetime. This problem exists
      at least in Subversion 1.5.*, 1.6.* and trunk.
      
      $ svnadmin create --fs-type bdb repo
      $ svn co file:///$(pwd)/repo wc
      Segmentation fault
      $ 
      
      Output from GDB:
      $ gdb --args svn co file:///$(pwd)/repo wc
      GNU gdb 6.8
      Copyright (C) 2008 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
      and "show warranty" for details.
      This GDB was configured as "x86_64-pc-linux-gnu"...
      (gdb) br base_open
      Function "base_open" not defined.
      Make breakpoint pending on future shared library load? (y or [n]) y
      Breakpoint 1 (base_open) pending.
      (gdb) r
      Starting program: /usr/bin/svn co file:////tmp/repo wc
      [Thread debugging using libthread_db enabled]
      [New Thread 0x7fd634ebf740 (LWP 6450)]
      [Switching to Thread 0x7fd634ebf740 (LWP 6450)]
      
      Breakpoint 1, base_open (fs=0x101c5d0, path=0x1023920 "/tmp/repo/db",
      pool=0x1023598, common_pool=0x10275b8) at subversion/libsvn_fs_base/fs.c:731
      731       svn_boolean_t write_format_file = FALSE;                                                                                                
      (gdb) bt                                                                                                                                          
      #0  base_open (fs=0x101c5d0, path=0x1023920 "/tmp/repo/db", pool=0x1023598,
      common_pool=0x10275b8) at subversion/libsvn_fs_base/fs.c:731
      #1  0x00007fd6336c6d9b in svn_fs_open (fs_p=0x10238a8, path=0x1023920
      "/tmp/repo/db", fs_config=0x0, pool=0x1023598) at subversion/libsvn_fs/fs-
      #2  0x00007fd6338ec1be in get_repos (repos_p=0x1023738, path=0x1023760
      "/tmp/repo", exclusive=0, nonblocking=0, open_fs=1, pool=0x1023598)                  
          at subversion/libsvn_repos/repos.c:1344                                                                                                                 
      #3  0x00007fd6338ec2c3 in svn_repos_open (repos_p=0x1023738, path=0x1023760
      "/tmp/repo", pool=0x1023598) at subversion/libsvn_repos/repos.c:1389            
      #4  0x00007fd633b0375b in svn_ra_local__split_URL (repos=0x1023738,
      repos_url=0x1023728, fs_path=0x7fff3e3c4490, URL=0x1025640 "file:///tmp/repo",          
          pool=0x1023598) at subversion/libsvn_ra_local/split_url.c:138                                                                                           
      #5  0x00007fd633b00870 in svn_ra_local__open (session=0x1023708,
      repos_URL=0x1025640 "file:///tmp/repo", callbacks=0x1023618,
      callback_baton=0x1023668,
          config=0x1003ee0, pool=0x1023598) at
      subversion/libsvn_ra_local/ra_plugin.c:449                                                                         
      #6  0x00007fd635cf35d6 in svn_ra_open3 (session_p=0x7fff3e3c47e8,
      repos_URL=0x1025640 "file:///tmp/repo", uuid=0x0, callbacks=0x1023618,                    
          callback_baton=0x1023668, config=0x1003ee0, pool=0x1023598) at
      subversion/libsvn_ra/ra_loader.c:480                                                     
      #7  0x00007fd6361b3b64 in svn_client__open_ra_session_internal
      (ra_session=0x7fff3e3c47e8, base_url=0x1025640 "file:///tmp/repo",
      base_dir=0x0,
          base_access=0x0, commit_items=0x0, use_admin=0, read_only_wc=0,
      ctx=0x1003e40, pool=0x1023598) at subversion/libsvn_client/ra.c:296                     
      #8  0x00007fd6361b4053 in svn_client__ra_session_from_path
      (ra_session_p=0x7fff3e3c48f8, rev_p=0x7fff3e3c48f0, url_p=0x7fff3e3c48e8,                        
          path_or_url=0x1025640 "file:///tmp/repo", base_access=0x0,
      peg_revision_p=0x7fff3e3c4a90, revision=0x7fff3e3c4aa0, ctx=0x1003e40,
      pool=0x1023598)
          at subversion/libsvn_client/ra.c:446                                                                                                                    
      #9  0x00007fd63617ca2b in svn_client__checkout_internal (result_rev=0x0,
      url=0x1025640 "file:///tmp/repo", path=0x1022998 "wc",                             
          peg_revision=0x7fff3e3c4a90, revision=0x7fff3e3c4aa0, ra_cache=0x0,
      depth=svn_depth_unknown, ignore_externals=0, allow_unver_obstructions=0,            
          timestamp_sleep=0x0, ctx=0x1003e40, pool=0x10255a8) at
      subversion/libsvn_client/checkout.c:109                                                          
      #10 0x00007fd63617d0c6 in svn_client_checkout3 (result_rev=0x0, URL=0x1025628
      "file:///tmp/repo", path=0x1022998 "wc", peg_revision=0x7fff3e3c4a90,         
          revision=0x7fff3e3c4aa0, depth=svn_depth_unknown, ignore_externals=0,
      allow_unver_obstructions=0, ctx=0x1003e40, pool=0x10255a8)                        
          at subversion/libsvn_client/checkout.c:246                                                                                                              
      #11 0x000000000040720f in svn_cl__checkout (os=0x1003500, baton=0x7fff3e3c4ca0,
      pool=0x10032a8) at subversion/svn/checkout-cmd.c:161
      #12 0x0000000000411e9b in main (argc=4, argv=0x7fff3e3c5008) at
      subversion/svn/main.c:2099                                                                  
      (gdb) p bdb_cache                                                                                                                                           
      $1 = (apr_hash_t *) 0x103c978                                                                                                                               
      (gdb) cont                                                                                                                                                  
      Continuing.                                                                                                                                                 
      
      Breakpoint 1, base_open (fs=0x1028610, path=0x1026ba0 "/tmp/repo/db",
      pool=0x10255a8, common_pool=0x103e908) at subversion/libsvn_fs_base/fs.c:731
      731       svn_boolean_t write_format_file = FALSE;                                                                                                
      (gdb) bt                                                                                                                                          
      #0  base_open (fs=0x1028610, path=0x1026ba0 "/tmp/repo/db", pool=0x10255a8,
      common_pool=0x103e908) at subversion/libsvn_fs_base/fs.c:731
      #1  0x00007fd6336c6d9b in svn_fs_open (fs_p=0x1026b28, path=0x1026ba0
      "/tmp/repo/db", fs_config=0x0, pool=0x10255a8) at subversion/libsvn_fs/fs-
      #2  0x00007fd6338ec1be in get_repos (repos_p=0x10269b8, path=0x10269e0
      "/tmp/repo", exclusive=0, nonblocking=0, open_fs=1, pool=0x10255a8)                  
          at subversion/libsvn_repos/repos.c:1344                                                                                                                 
      #3  0x00007fd6338ec2c3 in svn_repos_open (repos_p=0x10269b8, path=0x10269e0
      "/tmp/repo", pool=0x10255a8) at subversion/libsvn_repos/repos.c:1389            
      #4  0x00007fd633b0375b in svn_ra_local__split_URL (repos=0x10269b8,
      repos_url=0x10269a8, fs_path=0x7fff3e3c4360, URL=0x10267b8 "file:///tmp/repo",          
          pool=0x10255a8) at subversion/libsvn_ra_local/split_url.c:138                                                                                           
      #5  0x00007fd633b00870 in svn_ra_local__open (session=0x1026988,
      repos_URL=0x10267b8 "file:///tmp/repo", callbacks=0x1026878,
      callback_baton=0x10268c8,
          config=0x1003ee0, pool=0x10255a8) at
      subversion/libsvn_ra_local/ra_plugin.c:449                                                                         
      #6  0x00007fd635cf35d6 in svn_ra_open3 (session_p=0x7fff3e3c46e0,
      repos_URL=0x10267b8 "file:///tmp/repo",                                                   
          uuid=0x10267e8 "8c10cacc-06c7-40e4-ba6b-f52931912437", callbacks=0x1026878,
      callback_baton=0x10268c8, config=0x1003ee0, pool=0x10255a8)
          at subversion/libsvn_ra/ra_loader.c:480                                                                                                                 
      #7  0x00007fd6361b3b64 in svn_client__open_ra_session_internal
      (ra_session=0x7fff3e3c46e0, base_url=0x10267b8 "file:///tmp/repo",
      base_dir=0x103e7f0 "wc",
          base_access=0x103e7b8, commit_items=0x0, use_admin=1, read_only_wc=1,
      ctx=0x1003e40, pool=0x10255a8) at subversion/libsvn_client/ra.c:296               
      #8  0x00007fd6361bb629 in svn_client__update_internal (result_rev=0x0,
      path=0x1022998 "wc", revision=0x7fff3e3c4aa0, depth=svn_depth_infinity,              
          depth_is_sticky=1, ignore_externals=0, allow_unver_obstructions=0,
      timestamp_sleep=0x7fff3e3c4914, send_copyfrom_args=0, ctx=0x1003e40,
      pool=0x10255a8)
          at subversion/libsvn_client/update.c:207                                                                                                                
      #9  0x00007fd63617cd66 in svn_client__checkout_internal (result_rev=0x0,
      url=0x1025640 "file:///tmp/repo", path=0x1022998 "wc",                             
          peg_revision=0x7fff3e3c4a90, revision=0x7fff3e3c4aa0, ra_cache=0x0,
      depth=svn_depth_infinity, ignore_externals=0, allow_unver_obstructions=0,           
          timestamp_sleep=0x0, ctx=0x1003e40, pool=0x10255a8) at
      subversion/libsvn_client/checkout.c:169                                                          
      #10 0x00007fd63617d0c6 in svn_client_checkout3 (result_rev=0x0, URL=0x1025628
      "file:///tmp/repo", path=0x1022998 "wc", peg_revision=0x7fff3e3c4a90,
          revision=0x7fff3e3c4aa0, depth=svn_depth_unknown, ignore_externals=0,
      allow_unver_obstructions=0, ctx=0x1003e40, pool=0x10255a8)                        
          at subversion/libsvn_client/checkout.c:246                                                                                                              
      #11 0x000000000040720f in svn_cl__checkout (os=0x1003500, baton=0x7fff3e3c4ca0,
      pool=0x10032a8) at subversion/svn/checkout-cmd.c:161
      #12 0x0000000000411e9b in main (argc=4, argv=0x7fff3e3c5008) at
      subversion/svn/main.c:2099                                                                  
      (gdb) p bdb_cache                                                                                                                                            
      $2 = (apr_hash_t *) 0x0                                                                                                                                      
      (gdb) cont                                                                                                                                                   
      Continuing.                                                                                                                                                  
      
      Program received signal SIGSEGV, Segmentation fault.
      0x00000033122116f9 in apr_hash_get () from /usr/lib64/libapr-1.so.0
      (gdb) bt
      #0  0x00000033122116f9 in apr_hash_get () from /usr/lib64/libapr-1.so.0
      #1  0x00007fd633295daa in bdb_cache_get (keyp=0x7fff3e3c3f30,
      panicp=0x7fff3e3c3f24) at subversion/libsvn_fs_base/bdb/env.c:466
      #2  0x00007fd6332961b8 in svn_fs_bdb__open (bdb_batonp=0x1028740,
      path=0x1026ba0 "/tmp/repo/db", flags=17873, mode=438, pool=0x10255a8)
          at subversion/libsvn_fs_base/bdb/env.c:635
      #3  0x00007fd6332a01b2 in open_databases (fs=0x1028610, create=0, format=4,
      path=0x1026ba0 "/tmp/repo/db", pool=0x10255a8)
          at subversion/libsvn_fs_base/fs.c:526
      #4  0x00007fd6332a0cb4 in base_open (fs=0x1028610, path=0x1026ba0
      "/tmp/repo/db", pool=0x10255a8, common_pool=0x103e908)
          at subversion/libsvn_fs_base/fs.c:752
      #5  0x00007fd6336c6d9b in svn_fs_open (fs_p=0x1026b28, path=0x1026ba0
      "/tmp/repo/db", fs_config=0x0, pool=0x10255a8) at subversion/libsvn_fs/fs-
      #6  0x00007fd6338ec1be in get_repos (repos_p=0x10269b8, path=0x10269e0
      "/tmp/repo", exclusive=0, nonblocking=0, open_fs=1, pool=0x10255a8)
          at subversion/libsvn_repos/repos.c:1344
      #7  0x00007fd6338ec2c3 in svn_repos_open (repos_p=0x10269b8, path=0x10269e0
      "/tmp/repo", pool=0x10255a8) at subversion/libsvn_repos/repos.c:1389
      #8  0x00007fd633b0375b in svn_ra_local__split_URL (repos=0x10269b8,
      repos_url=0x10269a8, fs_path=0x7fff3e3c4360, URL=0x10267b8 "file:///tmp/repo",
          pool=0x10255a8) at subversion/libsvn_ra_local/split_url.c:138
      #9  0x00007fd633b00870 in svn_ra_local__open (session=0x1026988,
      repos_URL=0x10267b8 "file:///tmp/repo", callbacks=0x1026878,
      callback_baton=0x10268c8,
          config=0x1003ee0, pool=0x10255a8) at
      subversion/libsvn_ra_local/ra_plugin.c:449
      #10 0x00007fd635cf35d6 in svn_ra_open3 (session_p=0x7fff3e3c46e0,
      repos_URL=0x10267b8 "file:///tmp/repo",
          uuid=0x10267e8 "8c10cacc-06c7-40e4-ba6b-f52931912437", callbacks=0x1026878,
      callback_baton=0x10268c8, config=0x1003ee0, pool=0x10255a8)
          at subversion/libsvn_ra/ra_loader.c:480
      #11 0x00007fd6361b3b64 in svn_client__open_ra_session_internal
      (ra_session=0x7fff3e3c46e0, base_url=0x10267b8 "file:///tmp/repo",
      base_dir=0x103e7f0 "wc",
          base_access=0x103e7b8, commit_items=0x0, use_admin=1, read_only_wc=1,
      ctx=0x1003e40, pool=0x10255a8) at subversion/libsvn_client/ra.c:296
      #12 0x00007fd6361bb629 in svn_client__update_internal (result_rev=0x0,
      path=0x1022998 "wc", revision=0x7fff3e3c4aa0, depth=svn_depth_infinity,
          depth_is_sticky=1, ignore_externals=0, allow_unver_obstructions=0,
      timestamp_sleep=0x7fff3e3c4914, send_copyfrom_args=0, ctx=0x1003e40,
      pool=0x10255a8)
          at subversion/libsvn_client/update.c:207
      #13 0x00007fd63617cd66 in svn_client__checkout_internal (result_rev=0x0,
      url=0x1025640 "file:///tmp/repo", path=0x1022998 "wc",
          peg_revision=0x7fff3e3c4a90, revision=0x7fff3e3c4aa0, ra_cache=0x0,
      depth=svn_depth_infinity, ignore_externals=0, allow_unver_obstructions=0,
          timestamp_sleep=0x0, ctx=0x1003e40, pool=0x10255a8) at
      subversion/libsvn_client/checkout.c:169
      #14 0x00007fd63617d0c6 in svn_client_checkout3 (result_rev=0x0, URL=0x1025628
      "file:///tmp/repo", path=0x1022998 "wc", peg_revision=0x7fff3e3c4a90,
          revision=0x7fff3e3c4aa0, depth=svn_depth_unknown, ignore_externals=0,
      allow_unver_obstructions=0, ctx=0x1003e40, pool=0x10255a8)
          at subversion/libsvn_client/checkout.c:246
      #15 0x000000000040720f in svn_cl__checkout (os=0x1003500, baton=0x7fff3e3c4ca0,
      pool=0x10032a8) at subversion/svn/checkout-cmd.c:161
      #16 0x0000000000411e9b in main (argc=4, argv=0x7fff3e3c5008) at
      subversion/svn/main.c:2099
      (gdb)
      
      bdb_cache_get() calls apr_hash_get() with a NULL pointer (bdb_cache) to
      apr_hash_t.
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            arfrever Arfrever Frehtes Taifersar Arahesis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: