Bug #1184
Connection from socket client to server on different host sometimes hangs
Status: | Resolved | Start date: | 10/01/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Moringen | % Done: | 100% | |
Category: | Socket Transport | |||
Target version: | rsb-0.7 |
Description
Nao is the host (192.168.179.41) and a client pc (192.168.179.24).
On nao, multiple RSB streamer components are running in parallel in a single process but they should start up at the same time (probably in parallel).
open("/etc/rsb.conf", O_RDONLY) = -1 ENOENT (No such file or directory) open("/home/languitar/.config/rsb.conf", O_RDONLY) = 3 read(3, "[transport.spread]\nenabled = 0\n\n"..., 8191) = 222 read(3, "", 8191) = 0 close(3) = 0 open("rsb.conf", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/rsb.conf", O_RDONLY) = -1 ENOENT (No such file or directory) open("/home/languitar/.config/rsb.conf", O_RDONLY) = 3 read(3, "[transport.spread]\nenabled = 0\n\n"..., 8191) = 222 read(3, "", 8191) = 0 close(3) = 0 open("rsb.conf", O_RDONLY) = -1 ENOENT (No such file or directory) times({tms_utime=1, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 1435337080 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f9233a71000 mprotect(0x7f9233a71000, 4096, PROT_NONE) = 0 clone(child_stack=0x7f9234270fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f92342719d0, tls=0x7f9234271700, child_tidptr=0x7f92342719d0) = 30249 eventfd2(0, O_NONBLOCK|O_CLOEXEC) = 3 epoll_create1(EPOLL_CLOEXEC) = 4 timerfd_create(CLOCK_MONOTONIC, 0x80000 /* TFD_??? */) = 5 epoll_ctl(4, EPOLL_CTL_ADD, 3, {...}) = 0 write(3, "\1\0\0\0\0\0\0\0", 8) = 8 epoll_ctl(4, EPOLL_CTL_ADD, 5, {...}) = 0 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 6 epoll_ctl(4, EPOLL_CTL_ADD, 6, {...}) = 0 connect(6, {sa_family=AF_INET, sin_port=htons(4444), sin_addr=inet_addr("192.168.179.41")}, 16) = 0 recvmsg(6,
recvmsg is hanging.
On the node being the server:
koerperlos [0] ~ $ netstat -tapnl (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 3 0 0.0.0.0:4444 0.0.0.0:* LISTEN 3141/naoqi-bin tcp 0 0 127.0.0.1:4444 127.0.0.1:37871 ESTABLISHED - tcp 0 0 192.168.179.41:4444 192.168.179.24:36485 ESTABLISHED - tcp 0 0 192.168.179.41:4444 192.168.179.24:36484 ESTABLISHED -
Second entry is problematic, as all RSB-relevant parts are running in a single process and hence no local network connections should be necessary.
Associated revisions
Lock the creation of Bus instances in the socket::Factory.
Without this locking multiple bus objects can be created by parallel threads for a single endpoint.
fixes #1184
Backport: Lock the creation of Bus instances in the socket::Factory.
Without this locking multiple bus objects can be created by parallel threads for a single endpoint.
refs #1184
Lock the creation of Bus instances in the socket::Factory
fixes #1184
Without this locking multiple bus objects can be created by parallel
threads for a single endpoint.
Backport: Lock the creation of Bus instances in the socket::Factory.
Without this locking multiple bus objects can be created by parallel threads for a single endpoint.
refs #1184
History
#1 Updated by J. Wienke over 11 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset rsb-cpp|commit:5829bc5735765c912aa07b5ba444baab316a382d.