Skip to content
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

Broken pipe when killing a client #44

Closed
dorlaor opened this issue Jul 25, 2015 · 5 comments
Closed

Broken pipe when killing a client #44

dorlaor opened this issue Jul 25, 2015 · 5 comments

Comments

@dorlaor
Copy link
Contributor

dorlaor commented Jul 25, 2015

When running scylla head (095c2f2) using posix and testing
it against the datastax cpp driver with example/perf I got a broken pipe when the client was ctrl-c

To compile the client, download https://github.com/datastax/cpp-driver ,
build it (cmake) plus build the perf example gcc perf.c -o p -lcassandra -luv -L../../build -I../../include/

Results:

WARNING: exceptional future ignored of type 'std::system_error': Error system:32 (Broken pipe)

Program received signal SIGPIPE, Broken pipe.
0x00007ffff419d530 in writev () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff419d530 in writev () from /lib64/libc.so.6
#1  0x00000000004bfa9e in writev (iovcnt=<optimized out>, iov=<optimized out>, this=<optimized out>) at ./core/posix.hh:261
#2  operator() (__closure=__closure@entry=0x7fffffffd0f0) at ./core/reactor.hh:1161
#3  apply (args=args@entry=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x5c9149, DIE 0x66d56a>, 
    func=func@entry=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x5c9149, DIE 0x66d558>) at ./core/apply.hh:34
#4  apply<pollable_fd::write_some(net::packet&)::<lambda()> > (
    args=args@entry=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x5c9149, DIE 0x66d5ad>, 
    func=func@entry=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x5c9149, DIE 0x66d599>) at ./core/apply.hh:42
#5  futurize<future<unsigned long> >::apply<pollable_fd::write_some(net::packet&)::{lambda()#1}>(pollable_fd::write_some(net::packet&)::{lambda()#1}&&, std::tuple<>&&) (func=func@entry=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x5c9149, DIE 0x6b359f>, 
    args=args@entry=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x5c9149, DIE 0x6b3a46>) at ./core/future.hh:988
#6  0x00000000004bfbb7 in future<>::then<future<unsigned long>, pollable_fd::write_some(net::packet&)::{lambda()#1}, future<unsigned long> future<>::then<{lambda()#1}, future<unsigned long> >({lambda()#1}&&)::{lambda(future_state<>&&)#1}>(future<>::then&&, future<unsigned long> future<>::then<{lambda()#1}, future<unsigned long> >({lambda()#1}&&)::{lambda(future_state<>&&)#1}&&) (this=this@entry=0x7fffffffd0e0, 
    func=func@entry=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x5c9149, DIE 0x6b3c0c>, 
    param=param@entry=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x5c9149, DIE 0x6b3c22>) at ./core/future.hh:625
#7  0x00000000004bf252 in then<pollable_fd::write_some(net::packet&)::<lambda()>, future<long unsigned int> > (
    func=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x5c9149, DIE 0x6b023e>, this=0x7fffffffd0e0) at ./core/future.hh:753
#8  pollable_fd::write_some (this=<optimized out>, p=...) at ./core/reactor.hh:1169
#9  0x00000000004bf2ec in pollable_fd::write_all (this=<optimized out>, p=...) at ./core/reactor.hh:1180
#10 0x00000000004b8437 in net::posix_data_sink_impl::put (this=0x600000a4f150, p=...) at net/posix-stack.cc:166
#11 0x00000000006b1902 in put (p=..., this=0x600000aa3448) at /home/dor/src/urchin/seastar/core/iostream.hh:100
#12 output_stream<char>::write (this=this@entry=0x600000aa3448, p=...) at /home/dor/src/urchin/seastar/core/iostream-impl.hh:65
#13 0x00000000006a2407 in write (msg=..., this=0x600000aa3448) at /home/dor/src/urchin/seastar/core/iostream-impl.hh:49
#14 operator() (__closure=__closure@entry=0x7fffffffd260) at transport/server.cc:624
#15 apply (args=<optimized out>, func=func@entry=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x2c91d99, DIE 0x2dd658d>)
    at /home/dor/src/urchin/seastar/core/apply.hh:34
#16 apply<cql_server::connection::write_response(shared_ptr<cql_server::response>)::<lambda()> > (args=<optimized out>, 
    func=func@entry=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x2c91d99, DIE 0x2dd65fb>)
    at /home/dor/src/urchin/seastar/core/apply.hh:42
#17 futurize<future<> >::apply<cql_server::connection::write_response(shared_ptr<cql_server::response>)::<lambda()> >(<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x2c91d99, DIE 0x2dd663b>, <unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x2c91d99, DIE 0x2dd664e>) (func=func@entry=<unknown type in /home/dor/src/urchin/build/release/scylla, CU 0x2c91d99, DIE 0x2dd663b>, args=<optimized out>)
    at /home/dor/src/urchin/seastar/core/future.hh:988
@dorlaor dorlaor added the bug label Jul 25, 2015
@dorlaor dorlaor added this to the Beta milestone Jul 25, 2015
@dorlaor
Copy link
Contributor Author

dorlaor commented Jul 25, 2015

This is the schema for it (to load using cqlsh):
CREATE KEYSPACE examples
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};

USE examples;

CREATE TABLE songs (
id uuid PRIMARY KEY,
title text,
album text,
artist text,
tags set,
data blob
);

@vladzcloudius
Copy link
Contributor

client side:
cqlsh> CREATE KEYSPACE examples
... WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
cqlsh>
cqlsh> USE examples;
cqlsh:examples>
cqlsh:examples> CREATE TABLE songs (
... id uuid PRIMARY KEY,
... title text,
... album text,
... artist text,
... tags set,
... data blob
... );
SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="Failed parsing statement: [CREATE TABLE songs (
id uuid PRIMARY KEY,
title text,
album text,
artist text,
tags set,
data blob
);] reason: : syntax error...
">

Server side:
...
Seastar HTTP server listening on 127.1.11.1:10000 ...
WARNING: Not implemented: AUTH
warning: ignoring event registration
WARNING: Not implemented: METRICS
WARNING: Not implemented: PERMISSIONS
WARNING: Not implemented: PAGING
[shard 0] query_processor - The statement: CREATE TABLE songs (
id uuid PRIMARY KEY,
title text,
album text,
artist text,
tags set,
data blob
); could not be parsed: : syntax error...

@vladzcloudius
Copy link
Contributor

In CREATE TABLE statement in 'tags' column definition 'set' should have an elements' type definition, e.g. set.

@dorlaor
Copy link
Contributor Author

dorlaor commented Jul 29, 2015

avikivity pushed a commit that referenced this issue Aug 2, 2015
When process() terminated _ready_to_respond contains the future with the
state of the last I/O operation of this connection. Consume it at the
end of process().

Fixes issue #44

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
@vladzcloudius
Copy link
Contributor

The exceptional future that had been ignored was the one stored in _ready_to_respond. The solution is to return it from transport::cql_server::connection::process().
The appropriate patch has been committed to the master: commit 86e28bb

fruch added a commit to fruch/scylla that referenced this issue Sep 7, 2023
* tools/cqlsh 2254e920...66ae7eac (5):
  > switch from `ssl_options` to `ssl_context`
  > cqlsh should use cql v4 by default when connecting scylladb#44
  > Revert "Skip pp38-macosx wheel builds"
  > update to newer cibuildwheel
  > Skip pp38-macosx wheel builds
avikivity pushed a commit that referenced this issue Sep 7, 2023
* tools/cqlsh 2254e920...66ae7eac (5):
  > switch from `ssl_options` to `ssl_context`
  > cqlsh should use cql v4 by default when connecting #44
  > Revert "Skip pp38-macosx wheel builds"
  > update to newer cibuildwheel
  > Skip pp38-macosx wheel builds

Closes #15308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants