lidavidm commented on PR #36517:
URL: https://github.com/apache/arrow/pull/36517#issuecomment-1638772872

   ```
       frame #0: 0x00007ff80697fffe libsystem_kernel.dylib`__pthread_kill + 10
       frame #1: 0x00007ff8069b61ff libsystem_pthread.dylib`pthread_kill + 263
       frame #2: 0x00007ff806901d24 libsystem_c.dylib`abort + 123
       frame #3: 0x000000010f6733e4 
libgpr.33.0.0.dylib`grpc_core::Crash(std::__1::basic_string_view<char, 
std::__1::char_traits<char> >, grpc_core::SourceLocation) + 186
       frame #4: 0x000000010f6746e6 libgpr.33.0.0.dylib`grpc_core::(anonymous 
namespace)::ThreadInternalsPosix::Join() + 138
       frame #5: 0x000000011046299c 
libgrpc++.1.56.2.dylib`grpc_core::Thread::Join() + 24
       frame #6: 0x0000000110444ee0 
libgrpc++.1.56.2.dylib`grpc::CompletionQueue::ReleaseCallbackAlternativeCQ(grpc::CompletionQueue*)
 + 84
       frame #7: 0x000000011043c746 
libgrpc++.1.56.2.dylib`grpc::Channel::~Channel() + 58
       frame #8: 0x000000011043ebc9 
libgrpc++.1.56.2.dylib`std::__1::__shared_ptr_pointer<grpc::Channel*, 
std::__1::shared_ptr<grpc::Channel>::__shared_ptr_default_delete<grpc::Channel, 
grpc::Channel>, std::__1::allocator<grpc::Channel> >::__on_zero_shared() + 23
       frame #9: 0x000000011043ef21 
libgrpc++.1.56.2.dylib`std::__1::shared_ptr<grpc::ChannelCredentials>::~shared_ptr()
 + 49
       frame #10: 0x0000000111ea89c5 
libarrow_flight.1300.0.0.dylib`::~ClientRpc() at grpc_client.cc:69:8
       frame #11: 0x0000000111e9c725 
libarrow_flight.1300.0.0.dylib`::~ClientRpc() at grpc_client.cc:69:8
       frame #12: 0x0000000111eb3cda 
libarrow_flight.1300.0.0.dylib`::~UnaryUnaryAsyncCall() at grpc_client.cc:588:7
       frame #13: 0x0000000111eb3755 
libarrow_flight.1300.0.0.dylib`::~UnaryUnaryAsyncCall() at grpc_client.cc:588:7
       frame #14: 0x0000000111eb3779 
libarrow_flight.1300.0.0.dylib`::~UnaryUnaryAsyncCall() at grpc_client.cc:588:7
       frame #15: 0x0000000111e79ebc 
libarrow_flight.1300.0.0.dylib`::operator()() at unique_ptr.h:57:5
       frame #16: 0x0000000111e79dcc libarrow_flight.1300.0.0.dylib`::reset() 
at unique_ptr.h:318:7
       frame #17: 0x0000000111e7154d 
libarrow_flight.1300.0.0.dylib`::operator=() at unique_ptr.h:237:5
       frame #18: 0x0000000111e71509 
libarrow_flight.1300.0.0.dylib`::SetAsyncRpc() at transport.cc:107:24
       frame #19: 0x0000000111eb4032 libarrow_flight.1300.0.0.dylib`::Finish() 
at grpc_client.cc:622:5
       frame #20: 0x0000000111eb392f libarrow_flight.1300.0.0.dylib`::OnDone() 
at grpc_client.cc:613:5
   ```
   
   I suppose we can't/shouldn't try to drop ourselves (because we might try to 
drop ourselves from the gRPC thread that we implicitly own?) and instead let 
ourselves naturally drop when the listener goes out of scope. So despite having 
a `shared_ptr<Listener>`, we still have unsafety (since if the client doesn't 
hold on to the listener, the listener will go out of scope and this situation 
will happen), in which case I'd sort of prefer the API use `Listener*` to make 
it clear that the client is responsible for lifetime...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to