Backport #20325

libradosstriper silently fails to delete empty objects in jewel

Added by Stan K about 3 years ago. Updated almost 3 years ago.

Target version:
Crash signature:

libradosstriper_empty_rm.patch View (709 Bytes) Stan K, 06/15/2017 11:43 PM


#1 Updated by Nathan Cutler about 3 years ago

  • Tracker changed from Bug to Backport
  • Description updated (diff)


libradosstriper fails to delete striped objects of zero length without returning any kind of error.
Steps to reproduce:
  1. Create an empty striper object:
    ~# echo 123 | rados --striper -p sata put test -
    ~# rados --striper -p sata truncate test 0
    ~# rados --striper -p sata stat test 
    sata/test mtime 2017-06-16 02:31:42.000000, size 0

    Note: You cannot write empty object straight into libradosstriper, because it's causes an assertion failure. This issue is fixed in commit 7cce1e8c51640f466d8bb37a21c0d5f1b00db8ab which is not currently a part of jewel release.
  2. Try to remove striped object:
    ~# rados --striper -p sata rm test 
    ~# echo $?
  3. Check that object is still present:
    ~# rados -p sata ls 
    ~# rados --striper -p sata ls 

Expected result:
Striped object is deleted

It seems that stripe math in "libradosstriper::RadosStriperImpl::remove()" is missing corner case of an empty object, so I'm attaching a simple patch to fix this.

Also this issue is probably fixed in commit 7a50ea479e7e5c2909d899d89d33d3fb082257f8, which is not part of the jewel release and pretty massive to backport.

#2 Updated by Nathan Cutler about 3 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • Assignee set to Nathan Cutler

#3 Updated by Nathan Cutler about 3 years ago

@Stan: Thanks for the bug report and patch. I opened a github PR [1] in your name. Can you please provide your consent for us to use the code, like you did in #20240.


#4 Updated by Stan K about 3 years ago

@Nathan Cutler: Great, thanks. Yes, of course you have my permission to use this code.

#5 Updated by Nathan Cutler about 3 years ago

  • Status changed from In Progress to Need More Info

Clarifying whether tests need to be added.

#6 Updated by Nathan Cutler almost 3 years ago

  • Status changed from Need More Info to Resolved
  • Target version set to v10.2.10

The question of tests was answered in the PR.

Also available in: Atom PDF