-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memcached crashes on setting first key #64
Comments
What's the commit hash you were running? A bug was fixed recently in this area. |
On Sun, Oct 18, 2015 at 09:10:04AM -0700, Avi Kivity wrote:
|
@avikivity It's commit 46fd389. Thanks! |
@gleb-cloudius when I close the output stream it is not jolly at all: diff --git a/apps/memcached/memcache.cc b/apps/memcached/memcache.cc
index 659c66b..f487c94 100644
--- a/apps/memcached/memcache.cc
+++ b/apps/memcached/memcache.cc
@@ -1303,7 +1303,9 @@ public:
auto conn = make_lw_shared<connection>(std::move(fd), addr, _cache, _system_stats);
do_until([conn] { return conn->_in.eof(); }, [this, conn] {
return conn->_proto.handle(conn->_in, conn->_out).then([conn] {
- return conn->_out.flush();
+ return conn->_out.flush().then([conn] {
+ return conn->_out.close();
+ });
});
});
});
|
On Sun, Oct 18, 2015 at 09:52:44AM -0700, 0xmjk wrote:
|
Hmm, I've tried it and tried also: diff --git a/apps/memcached/memcache.cc b/apps/memcached/memcache.cc
index 659c66b..ceca3e8 100644
--- a/apps/memcached/memcache.cc
+++ b/apps/memcached/memcache.cc
@@ -1303,7 +1303,7 @@ public:
auto conn = make_lw_shared<connection>(std::move(fd), addr, _cache, _system_stats);
do_until([conn] { return conn->_in.eof(); }, [this, conn] {
return conn->_proto.handle(conn->_in, conn->_out).then([conn] {
- return conn->_out.flush();
+ return conn->_out.close().finally([conn] {});
});
});
}); Which should call flush() according to whats in the iostream-impl: template <typename CharType>
future<>
output_stream<CharType>::close() {
return flush().finally([this] {
if (_in_batch) {
return _in_batch.value().get_future();
} else {
return make_ready_future();
}
}).then([this] {
// report final exception as close error
if (_ex) {
std::rethrow_exception(_ex);
}
}).finally([this] {
return _fd.close();
});
} But it is still giving me a stacktrace that suggests that conn->_in has been cleared up already. |
On Sun, Oct 18, 2015 at 11:49:32AM -0700, 0xmjk wrote:
|
@tgrabiec ^^ |
I think I resolved it, but I don't understand why it works. This works @@ -1303,7 +1307,7 @@ public:
auto conn = make_lw_shared<connection>(std::move(fd), addr, _cache, _system_stats);
do_until([conn] { return conn->_in.eof(); }, [this, conn] {
return conn->_proto.handle(conn->_in, conn->_out).then([conn] {
- return conn->_out.flush();
+ return conn->_out.flush().then([conn] { conn->_out.close().finally([conn] { });});
});
});
}); But this doesn't: @@ -1303,7 +1307,7 @@ public:
auto conn = make_lw_shared<connection>(std::move(fd), addr, _cache, _system_stats);
do_until([conn] { return conn->_in.eof(); }, [this, conn] {
return conn->_proto.handle(conn->_in, conn->_out).then([conn] {
- return conn->_out.flush();
+ return conn->_out.flush().then([conn] { return conn->_out.close().finally([conn] { });});
});
});
}); |
On Mon, Oct 19, 2015 at 08:32:18AM -0700, 0xmjk wrote:
Closing connection here is incorrect since this is processing loop and diff --git a/apps/memcached/memcache.cc b/apps/memcached/memcache.cc
index 659c66b..115aa0e 100644
--- a/apps/memcached/memcache.cc
+++ b/apps/memcached/memcache.cc
@@ -1305,6 +1305,8 @@ public:
return conn->_proto.handle(conn->_in, conn->_out).then([conn] {
return conn->_out.flush();
});
+ }).finally([conn] {
+ return conn->_out.close().finally([conn]{});
});
});
}).or_terminate();
|
It works and the tests are much happier http://pastebin.com/nwwRzfdx |
Hi,
I get the following error
when running a simple test:
I get quite a lot of errors when running ./test.py. (http://pastebin.com/d2dkePc0)
The above error seems related to a commit from couple days ago. However, I'm not sure if it is this or my setup - I'm running under VirtualBox and docker; my lscpu output:
And Dockerfile:
Thanks!
The text was updated successfully, but these errors were encountered: