shiyilei / protobuf-c

Automatically exported from code.google.com/p/protobuf-c
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

RPC Server segfaults with too many simultaneous connections #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Write a program that opens a TCP connection with an RPC service and 
calls a method, but doesn't close the socket
2. Run this program simultaneously more than 8 times

What is the expected output? What do you see instead?
Expected to receive the service to reply to all the instances on the 
program; instead, the service segfaults

What version of the product are you using? On what operating system?
protobuf-c svn196 on various versions of Linux

Please provide any additional information below.
This appears to be because the dispatcher's callbacks array is not 
expanded when the notifies array is. Attached is a patch that seems to 
fix it.

Original issue reported on code.google.com by leszek.s...@gmail.com on 28 Dec 2009 at 12:54

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks, great catch!  will be in 0.13 release.

Original comment by lahike...@gmail.com on 24 Jan 2010 at 5:09

GoogleCodeExporter commented 8 years ago
The problem of synchronising notifies_desired with callbacks crops up in 
another part
of the file. The deallocate_notify_desired_index function updates 
"notifies_desired"
and "n_notifies_desired" without updating "callbacks". Patch included.

Original comment by leszek.s...@gmail.com on 25 Jan 2010 at 9:21

Attachments:

GoogleCodeExporter commented 8 years ago
Once again, I thank you!  I am about to start using this code (just the 
dispatch part) more seriously and I 
appreciate these fixes very much!  (I would enjoy hearing how you are using it, 
if you don't mind... i am 
lahiker42@gmail.com)

Original comment by lahike...@gmail.com on 8 Feb 2010 at 4:43

GoogleCodeExporter commented 8 years ago

Original comment by lahike...@gmail.com on 18 Mar 2010 at 2:44