SeattleTestbed / resource

Resource benchmarks for the SeattleTestbed installer
MIT License
0 stars 5 forks source link

Mac_BSD_resources fails if sysctl lacks kern.ipc.maxsockets key #5

Closed aaaaalbert closed 9 years ago

aaaaalbert commented 9 years ago

The Mac/BSD resource measurement script expects a sysctl key named kern.ipc.maxsockets to find the maximum number of sockets that a Seattle install should use. On OS X 10.10, this key does not always exist, and the mechanics of when it exists or is missing are unknown currently.

The error is seen during install,

$ ./install.sh
System benchmark starting...
sysctl: unknown oid 'kern.ipc.maxsockets'
Benchmark failed for insockets resource: unable to find max number of sockets
Benchmark failed for outsockets resource: unable to find max number of sockets
The above benchmarking error(s) occurred.
If you choose to continue anyways then default values will be used for failed benchmarks.
Failed.
This install cannot succeed either because required installation info is corrupted or resources are insufficient.
Please email the Seattle project for additional support, and attach the installer_benchmark.log and vesselinfo files, found in the seattle_repy directory, in order to help us diagnose the issue.

David A. Herrera from Universidad Antonio Nariño in Colombia helped developing and testing a patch, which essentially goes and preinitializes the number to 512 (the number found on my OS 10.6.8 box).

Before sending a PR, I would appreciate any Mac users to chime in and report the value found on their machines (if it exists!) by sending the output of

uname -v
sysctl kern.ipc.maxsockets
Darwin version OS X version (crossref) maxsockets by
Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 10.10.5 N/A @fmetzger, @StephenKing
Darwin Kernel Version 14.0.0: Sat Sep 27 03:58:47 PDT 2014; root:xnu-2782.1.97~11/RELEASE_X86_64 10.10 N/A @XuefengHuang
Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 10.9 512 @lukpueh, @michaelkux
Darwin Kernel Version 12.6.0: Wed Mar 18 16:23:48 PDT 2015; root:xnu-2050.48.19~1/RELEASE_X86_64 10.8.5 512 @pooledge
Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 10.6.8 512 @aaaaalbert

Thanks everyone for contributing!

StephenKing commented 9 years ago

Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 10.10.5 N/A

aaaaalbert commented 9 years ago

Thanks!

lukpueh commented 9 years ago

Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 kern.ipc.maxsockets: 512

pooledge commented 9 years ago

Darwin Kernel Version 12.6.0: Wed Mar 18 16:23:48 PDT 2015; root:xnu-2050.48.19~1/RELEASE_X86_64 kern.ipc.maxsockets: 512

michaelkux commented 9 years ago

$ uname -v; sysctl kern.ipc.maxsockets Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 kern.ipc.maxsockets: 512

aaaaalbert commented 9 years ago

Per PR #7, my fix is to use a default of 512.

Thank you all for testing and contibuting!