diff --git a/src/object.hpp b/src/object.hpp index 05a3aa1..f5f6bad 100644 --- a/src/object.hpp +++ b/src/object.hpp @@ -7,11 +7,14 @@ #include "stats.hpp" #include "tempfile.hpp" +#include + #include #include #include #include #include +#include #include namespace yrmcds { @@ -97,8 +100,13 @@ class object { } void unlock(bool force = false) { - if( ! force && ! locked_by_self() ) - throw std::logic_error("object::unlock bug"); + if( ! force && ! locked_by_self() ) { + cybozu::dump_stack(); + throw std::logic_error("object::unlock bug (m_lock=" + + std::to_string(m_lock) + + ", g_context=" + + std::to_string(g_context) + ")"); + } m_lock = -1; }