lmbench tcp lib backlog reservation too small, can cause hang.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lmbench (Ubuntu) |
Fix Released
|
Undecided
|
dann frazier | ||
Xenial |
Fix Released
|
Undecided
|
dann frazier | ||
Zesty |
Fix Released
|
Undecided
|
dann frazier |
Bug Description
[Impact]
Network related tests will hang on high-core count systems.
lib_tcp reserves backlog of 100. If there are more then 100 threads on the system, the backlog is pretty much guaranteed to fail. The clients will then fail to connect and lmbench will hang. Potential patch below works around this by reserving backlog for at least 4x number of processors reported in the system, assuming that common use case will be to run lmbench with as many threads as there are cpus reported from the OS. Alternatively, backlog reservation can be made into a config option.
[Test Case]
ubuntu@ubuntu:~$ /usr/lib/
connect: Connection timed out
connect: Connection timed out
connect: Connection timed out
connect: Connection timed out
connect: Connection timed out
connect: Connection timed out
connect: Connection timed out
connect: Connection timed out
connect: Connection timed out
connect: Connection timed out
With the patch:
ubuntu@
XX.XXXX microseconds
[Regression Risk]
The patch is careful to preserve the previous behavior for lower core count systems. Perhaps if there were a bug in the platform's sysconf(
tags: | added: cn99xx |
Changed in lmbench (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in lmbench (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in lmbench (Ubuntu): | |
status: | In Progress → Fix Committed |
assignee: | nobody → dann frazier (dannf) |
Changed in lmbench (Ubuntu Xenial): | |
status: | New → In Progress |
assignee: | nobody → dann frazier (dannf) |
Changed in lmbench (Ubuntu Zesty): | |
assignee: | nobody → dann frazier (dannf) |
status: | New → In Progress |
description: | updated |
small change, to maintain the same behavior as prev with <100 cores: backlog= 100;
int sock,np,backlog;
should be
int sock,np,