[ https://issues.apache.org/jira/browse/THRIFT-2525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13997849#comment-13997849 ]
Peace C edited comment on THRIFT-2525 at 5/19/14 2:57 PM: ---------------------------------------------------------- Ben: I'm not able to break in OverlappedSubmissionThread.cpp while my server is running. The exception is happening in TPipe.cpp after line 134: readOverlap_.reset(buf, len, ready_event_.h); h (the final parameter) looks good. readOverlap looks ok too (_SINGLE_LIST_ENTRY is null which should be ok). However last_error = 6. You might try recreating this by having the client connect, disconnect, then reconnect again in rapid succession to the named pipe. Update: I've now seen the ERROR_INVALID_HANDLE with the prior TPipe code. It's sporadic and happens more consistently in release builds. Aside from the Thrift code itself, I suspect Visual Studio 2013 may be munging the compile. was (Author: peace): Ben: I'm not able to break in OverlappedSubmissionThread.cpp while my server is running. The exception is happening in TPipe.cpp after line 134: readOverlap_.reset(buf, len, ready_event_.h); h (the final parameter) looks good. readOverlap looks ok too (_SINGLE_LIST_ENTRY is null which should be ok). However last_error = 6. You might try recreating this by having the client connect, disconnect, then reconnect again in rapid succession to the named pipe. > C# client connecting to C++ server via named pipe transport gets > TTransportException > ------------------------------------------------------------------------------------ > > Key: THRIFT-2525 > URL: https://issues.apache.org/jira/browse/THRIFT-2525 > Project: Thrift > Issue Type: Bug > Components: C# - Library, C++ - Library > Affects Versions: 0.9.1 > Environment: Windows > Reporter: Peace C > Fix For: 0.9.2 > > > A C# client using TNamedPipeClientTransport, connecting to a C++ server using > TPipeServer, causes the following exception as reported by the debugger: > ------------------------------------------------------------------------------ > First-chance exception at 0x7703C41F in MyApp.exe: Microsoft C++ exception: > apache::thrift::transport::TTransportException at memory location 0x00D0EF80. > First-chance exception at 0x7703C41F in MyApp.exe: Microsoft C++ exception: > apache::thrift::transport::TTransportException at memory location 0x00D0EF80. > First-chance exception at 0x779C12F7 in MyApp.exe: 0xC0000008: An invalid > handle was specified. > ------------------------------------------------------------------------------ > Call Stack: > ------------------------------------------------------------------------------ > ntdll.dll!77b6f9d2() Unknown > [Frames below may be incorrect and/or missing, no symbols loaded for > ntdll.dll] > [External Code] > MyApp.exe!apache::thrift::TAutoHandle::~TAutoHandle() Line 83 C++ > [External Code] > > > > MyApp.exe!apache::thrift::transport::TWaitableNamedPipeImpl::beginAsyncRead(unsigned > > char * buf, unsigned int len) Line 149 C++ > > MyApp.exe!apache::thrift::transport::TWaitableNamedPipeImpl::TWaitableNamedPipeImpl(void > * pipehandle) Line 108 C++ > MyApp.exe!apache::thrift::transport::TPipe::TPipe(void * Pipe) Line 239 > C++ > MyApp.exe!apache::thrift::transport::TNamedPipeServer::acceptImpl() > Line 307 C++ > MyApp.exe!apache::thrift::transport::TPipeServer::acceptImpl() Line 215 > C++ > MyApp.exe!apache::thrift::transport::TServerTransport::accept() Line 57 > C++ > MyApp.exe!apache::thrift::server::TThreadedServer::serve() Line 159 > C++ > MyApp.exe!thriftServerFunc() Line 87 C++ > MyApp.exe!boost::detail::thread_data<void (__cdecl*)(void)>::run() Line > 117 C++ > MyApp.exe!boost::`anonymous namespace'::thread_start_function(void * > param) Line 217 C++ > [External Code] > ------------------------------------------------------------------------------ > The exception is thrown in TPipe.cpp, with readOverlap_.success = FALSE and > readOverlap_.last_error = 6 (ERROR_INVALID_HANDLE). > ------------------------------------------------------------------------------ > void TWaitableNamedPipeImpl::beginAsyncRead(uint8_t* buf, uint32_t len) > { > begin_unread_idx_ = end_unread_idx_ = 0; > readOverlap_.reset(buf, len, ready_event_.h); > thread_->addWorkItem(&readOverlap_); > if(readOverlap_.success == FALSE && readOverlap_.last_error != > ERROR_IO_PENDING) > { > GlobalOutput.perror("TPipe ::ReadFile errored GLE=", > readOverlap_.last_error); > throw TTransportException(TTransportException::UNKNOWN, "TPipe: ReadFile > failed"); > } > } > ------------------------------------------------------------------------------ -- This message was sent by Atlassian JIRA (v6.2#6252)