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

tank-cli crash if message has key but no length #39

Closed
rkrambovitis opened this issue Aug 24, 2016 · 3 comments
Closed

tank-cli crash if message has key but no length #39

rkrambovitis opened this issue Aug 24, 2016 · 3 comments

Comments

@rkrambovitis
Copy link
Contributor

Steps:

  1. ./tank-cli -b localhost:11011 -p 0 -t foo set -K hello foo
#0  Buffer::Reserved (this=<optimized out>) at Switch/buffer.h:173
#1  TankClient::get_buffer (this=0x7ffcac33b8a0) at tank_client.h:474
#2  TankClient::try_recv (this=this@entry=0x7ffcac33b8a0, c=c@entry=0x799830) at client.cpp:2010
#3  0x0000000000418f5b in TankClient::poll (this=0x7ffcac33b8a0, timeoutMS=<optimized out>, timeoutMS@entry=800) at client.cpp:2453
#4  0x00000000004039af in <lambda()>::operator()(void) const (__closure=0x7ffcac33b730) at cli.cpp:949
#5  0x0000000000406cbd in main (argc=2, argv=<optimized out>) at cli.cpp:1201
  1. (after setting blanks in step 1) ./tank-cli -b localhost:11011 -p 0 -t foo get 0
#0  TankClient::get_payload (this=this@entry=0x7ffc61b47630) at tank_client.h:501
#1  0x000000000041ebbb in TankClient::consume_from_leader (this=this@entry=0x7ffc61b47630, clientReqId=clientReqId@entry=2, leader=..., 
    leader@entry=..., from=from@entry=0x12c3a70, total=total@entry=1, maxWait=maxWait@entry=8000, minSize=0) at client.cpp:914
#2  0x0000000000422007 in TankClient::consume (this=this@entry=0x7ffc61b47630, req=std::vector of length 1, capacity 1 = {...}, 
    maxWait=maxWait@entry=8000, minSize=minSize@entry=0) at client.cpp:2698
#3  0x0000000000407227 in main (argc=<optimized out>, argv=<optimized out>) at cli.cpp:348
@markpapadakis
Copy link
Member

For set -K you need to use key=value notation. It shouldn't have crashed though.
set -K foo=bar key=val

@rkrambovitis
Copy link
Contributor Author

it seems to crash even with message

./tank-cli -b localhost:11011 -p 0 -t foo set -K hello=foo
Segmentation fault (core dumped)

#0  Buffer::Reserved (this=<optimized out>) at Switch/buffer.h:173
#1  TankClient::get_buffer (this=0x7ffc785e53e0) at tank_client.h:474
#2  TankClient::try_recv (this=this@entry=0x7ffc785e53e0, c=c@entry=0xed1830) at client.cpp:2010
#3  0x0000000000418f5b in TankClient::poll (this=0x7ffc785e53e0, timeoutMS=<optimized out>, timeoutMS@entry=800) at client.cpp:2453
#4  0x00000000004039af in <lambda()>::operator()(void) const (__closure=0x7ffc785e5270) at cli.cpp:949
#5  0x0000000000406cbd in main (argc=1, argv=<optimized out>) at cli.cpp:1201

@markpapadakis
Copy link
Member

Likely fixed - thanks for reporting it.
This was an edge case where we 'd collapse bundles from multiple segments into the same segment due to min file.size constraints.

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

No branches or pull requests

2 participants