[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iLvxarujvEbenJ5-sZD_4m8U-rF_9iq5udeuP9vf6vyRg@mail.gmail.com>
Date: Sun, 24 Jan 2016 19:18:18 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: Kui Zhang <kuizhang@...il.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
David Miller <davem@...emloft.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: connection failure after "tcp: remove max_qlen_log"
On Sun, Jan 24, 2016 at 2:17 AM, Kui Zhang <kuizhang@...il.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,
Powered by blists - more mailing lists