Uploaded image for project: 'CernVM'
  1. CernVM
  2. CVM-1605

Ingest the same tar with hardlink to the same location multiple times result in runtime error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: CernVM-FS 2.8
    • Component/s: CVMFS
    • Labels:
      None
    • Platforms:
      x86_64-slc6-gcc48-opt
    • Development:

      Description

      I was trying to re-ingest some docker images, and I notice the run time error:

       

      ```

      SQL Error: UNIQUE constraint failed: catalog.md5path_1, catalog.md5path_2
      cvmfs_swissknife: /home/simo/cvmfs2/cvmfs/catalog_rw.cc:174: void catalog::WritableCatalog::AddEntry(const catalog::DirectoryEntry&, const XattrList&, const string&, const string&): Assertion `retval' failed.

      Thread 1 "cvmfs_swissknif" received signal SIGABRT, Aborted.
      0x00007ffff67da428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
      54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
      (gdb) backtrace
      #0 0x00007ffff67da428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
      #1 0x00007ffff67dc02a in __GI_abort () at abort.c:89
      #2 0x00007ffff67d2bd7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x59f977 "retval", file=file@entry=0x5a6af8 "/home/simo/cvmfs2/cvmfs/catalog_rw.cc", line=line@entry=174,
      function=function@entry=0x5a7b80 <catalog::WritableCatalog::AddEntry(catalog::DirectoryEntry const&, XattrList const&, std::_cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::PRETTY_FUNCTION_> "void catalog::WritableCatalog::AddEntry(const catalog::DirectoryEntry&, const XattrList&, const string&, const string&)") at assert.c:92
      #3 0x00007ffff67d2c82 in _GI__assert_fail (assertion=assertion@entry=0x59f977 "retval", file=file@entry=0x5a6af8 "/home/simo/cvmfs2/cvmfs/catalog_rw.cc", line=174,
      function=0x5a7b80 <catalog::WritableCatalog::AddEntry(catalog::DirectoryEntry const&, XattrList const&, std::_cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::PRETTY_FUNCTION_> "void catalog::WritableCatalog::AddEntry(const catalog::DirectoryEntry&, const XattrList&, const string&, const string&)") at assert.c:101
      #4 0x000000000042e0ba in catalog::WritableCatalog::AddEntry (this=0x8fc8a0, entry=..., xattrs=..., entry_path="/atlas/1/bin/red", parent_path="/atlas/1/bin") at /home/simo/cvmfs2/cvmfs/catalog_rw.cc:174
      #5 0x00000000004235ff in catalog::WritableCatalogManager::AddFile (this=this@entry=0x7fffffffda98, entry=..., xattrs=..., parent_directory="atlas/1/bin") at /home/simo/cvmfs2/cvmfs/catalog_mgr_rw.cc:410
      #6 0x0000000000424081 in catalog::WritableCatalogManager::Clone (this=0x7fffffffda98, destination="atlas/1/bin/red", source="atlas/1/bin/ed") at /home/simo/cvmfs2/cvmfs/catalog_mgr_rw.cc:322
      #7 0x00000000004ba3d9 in publish::SyncMediator::Clone (this=0x7fffffffd968, from="atlas/1/bin/red", to="atlas/1/bin/ed") at /home/simo/cvmfs2/cvmfs/sync_mediator.cc:227
      #8 0x00000000004c3ea8 in publish::SyncUnionTarball::PostUpload (this=0x920bb0) at /home/simo/cvmfs2/cvmfs/sync_union_tarball.cc:257
      #9 0x00000000004bc419 in publish::SyncMediator::Commit (this=this@entry=0x7fffffffd968, manifest=0x8fe050) at /home/simo/cvmfs2/cvmfs/sync_mediator.cc:311
      #10 0x0000000000490c24 in swissknife::Ingest::Main (this=0x864c70, args=...) at /home/simo/cvmfs2/cvmfs/swissknife_ingest.cc:186
      #11 0x0000000000418c99 in main (argc=24, argv=<optimized out>) at /home/simo/cvmfs2/cvmfs/swissknife_main.cc:190
      (gdb) quit
      A debugging session is active.

      ```

      The Clone try to add twice the same UNIQUE key to the database which generate a runtime error.

       

      Not quite sure how to solve and why it happen.

        Attachments

          Activity

            People

            Assignee:
            smosciat Simone Mosciatti
            Reporter:
            smosciat Simone Mosciatti
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              PlannedEnd:
              PlannedStart: