Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCrash multithreaded server #175
Comments
Sounds like That said, can you describe what the use case is for running multiple threads like this? Wouldn't |
I have several services on linux. One service is one program, and I have several physical mashine. I would like to use several programming language togethe (C++ with Python, maybe with Go ...), Thanks for your reply. |
OK, so the client you listed here is an artificial example that can trigger the bug. Until this gets fixed, I recommend structuring your clients so that they don't disconnect so frequently (because in your example they do). I'm curious if that's what happens in your real programs as well (i.e. do you get the same stack trace?) |
We are starting project and we are choosing a system communication of programs. We have two applicants for this role. (We used D-Bus in previous project, but it not work for network). We took Rpclib and Apache Thrift. We are making tests for these libraries now. You are right. We will have one connection for several call for production but we are must making tests for all pismimetic scenarios. About stack trace. I got three different trace after fall. 1
2
3
|
It looks like the 1st one is different - I would be interested in a test program that can trigger this. The 2nd one is what you originally reported. The 3rd one just looks like the stack trace of the main thread, not where the actual crash happened. |
The test program that can trigger this it is a very simple program. I wrote this program in the first message (Server and Client). I can give you test program with other scenarios. Please tell me if you want test program with cmake file. |
@STPR if you have a cmake file, I'll take it, but I can write one myself if not. |
I mean, what it is one case from my test. Sory for my bad English. cmake file for the previous example:
Server
|
Yes, go ahead, and thanks! Pull requests are preferred against the |
I also encounter all cases, in my project, 8 clients send request to server (2 thread). branch is 2.2.1, ubuntu16.04. And the most case is system::error (bad file descriptor). implementation.socket_ = -1, and implementation.reactor_data_ = 0. In lib/rpc/detail/server_session.cc, I doubts I also found clmdep_asio has been accpeted by boost project, so I hope you add testcases to make rpclib working with boost library. |
Just wondering about the state of this issue. We had a lot of users requesting this mode as well. If this is not fixed yet, is |
Hi,
I am using rpclib for microservices of system. I made multi-thread client and server and found bug.
I have error:
or
I created multi-thread server and multi-thread client.
Server
Client
Build
CXX_FLAGS "-std=c++14 -lpthread -O2
(gdb) backtrace in policy
or
(gdb) backtrace in master
I tryed branches:
All have this bug.
Can you please tell me if there is any fix or workaround for this issue?
Thanks,
Alex.