if --listen is passed a hostname which returns duplicate addresses, the second listen attempt will fail, and eventually gearmand will fail too
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman |
Fix Released
|
Low
|
Clint Byrum |
Bug Description
Test case:
On linux:
edit /etc/hosts and add *two* entries for 127.0.0.1 localhost
run
gearmand --listen=localhost
This will fail, because it listens on 127.0.0.1 once, then tries again.
$ strace -e trace=bind,
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
bind(7, {sa_family=
connect(7, {sa_family=AF_FILE, path="/
connect(7, {sa_family=AF_FILE, path="/
connect(7, {sa_family=AF_INET, sin_port=
bind(7, {sa_family=AF_INET, sin_port=
bind(7, {sa_family=AF_INET, sin_port=
bind(7, {sa_family=AF_INET, sin_port=
listen(7, 32) = 0
bind(8, {sa_family=AF_INET, sin_port=
bind(8, {sa_family=AF_INET, sin_port=
bind(8, {sa_family=AF_INET, sin_port=
bind(8, {sa_family=AF_INET, sin_port=
This is an uncommon situation, but one that happens regularly on Ubuntu buildds, causing the entire test suite to fail.
Related branches
- Gearman-developers: Pending requested
-
Diff: 26 lines (+9/-0)1 file modifiedlibgearman-server/gearmand.cc (+9/-0)
Changed in gearmand: | |
assignee: | nobody → Clint Byrum (clint-fewbar) |
status: | New → In Progress |
importance: | Undecided → Low |
Changed in gearmand: | |
status: | In Progress → Fix Committed |
status: | Fix Committed → In Progress |
Changed in gearmand: | |
status: | Fix Committed → Fix Released |
How does this work for same host, multiple ports?