[Bug 210726] tcp connect() can return invalid EADDRINUSE

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Sep 6 15:39:26 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210726

--- Comment #11 from David King <king.c.david at googlemail.com> ---
Not a script as such, however, to reproduce i create 2 jails with same IP,

reduce the ephemeral port range to increase the probability of hitting the
issue
net.inet.ip.portrange.hifirst: 51000
net.inet.ip.portrange.hilast: 5200

and run the following script in each jail and compare the logs, i'm sure there
is an easy way to do this with shell, but I couldn't get the low level error
with curl

#!/usr/local/bin/python

import requests
import logging
import threading

logging.basicConfig(filename='/tmp/python.log',level=logging.INFO)

def makerequests():
  try:
    r = requests.get(<% choose a local URL %>)
  except Exception as e:
    logging.info(e)

for i in range(0,10000):
  t = threading.Thread(target=makerequests)
  t.start()

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-net mailing list