Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1317583
| From | Kui Zhang <kuizhang@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: connection failure after "tcp: remove max_qlen_log" |
| Date | 2016-01-26 08:50 +0100 |
| Message-ID | <qV6xX-SL-5@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <qUgzo-54S-5@gated-at.bofh.it> <qUihQ-6gG-3@gated-at.bofh.it> <qUiUy-6x1-5@gated-at.bofh.it> <qUpW1-3fE-7@gated-at.bofh.it> <qUFR8-66R-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
I was using 2.7.11.
Older version did set backlog to 1 ( http://bugs.python.org/issue8498 ).
On Sun, Jan 24, 2016 at 7:18 PM, Eric Dumazet <edumazet@google.com> wrote:
> On Sun, Jan 24, 2016 at 2:17 AM, Kui Zhang <kuizhang@gmail.com> wrote:
>> We licensed the java software. As far as I can tell, the connection is
>> for IPC with a child process. There should not be large RTT.
>>
>> I will contact vendor regarding to listen(fd,0) issue, on Monday.
>>
>> I am not fully convinced, that is the problem. I saw that man page for
>> listen. However accept() works, in python, with backlog = 0. The java
>> software works with kernel build one commit before.
>
> Note that python (2.4.6 here) translates sock.listen(0) to listen(fd,
> 1), maybe to avoid surprises on some OS ;)
>
> $ cat lis.py
> #!/usr/bin/python
>
> import socket
> sock = socket.socket()
> sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
> sock.bind(('127.0.0.1',42000))
> sock.listen(0)
> s, a= sock.accept()
>
> s.send('test')
>
> $ strace ./lis.py
> ...
> close(5) = 0
> close(4) = 0
> close(3) = 0
> futex(0x8d8e460, FUTEX_WAKE, 1) = 0
> socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
> setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
> bind(3, {sa_family=AF_INET, sin_port=htons(42000),
> sin_addr=inet_addr("127.0.0.1")}, 16) = 0
> listen(3, 1) = 0
> accept(3,
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
connection failure after "tcp: remove max_qlen_log" Kui Zhang <kuizhang@gmail.com> - 2016-01-24 01:00 +0100
Re: connection failure after "tcp: remove max_qlen_log" Eric Dumazet <eric.dumazet@gmail.com> - 2016-01-24 01:20 +0100
Re: connection failure after "tcp: remove max_qlen_log" Kui Zhang <kuizhang@gmail.com> - 2016-01-24 03:10 +0100
Re: connection failure after "tcp: remove max_qlen_log" Eric Dumazet <edumazet@google.com> - 2016-01-24 03:50 +0100
Re: connection failure after "tcp: remove max_qlen_log" Kui Zhang <kuizhang@gmail.com> - 2016-01-24 11:20 +0100
Re: connection failure after "tcp: remove max_qlen_log" Eric Dumazet <edumazet@google.com> - 2016-01-25 04:20 +0100
Re: connection failure after "tcp: remove max_qlen_log" Kui Zhang <kuizhang@gmail.com> - 2016-01-26 08:50 +0100
csiph-web