Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net.openhft.lang.Jvm#PID_BITS returns incorrect value for Linux #67

Closed
brasslock opened this issue May 14, 2014 · 2 comments
Closed

net.openhft.lang.Jvm#PID_BITS returns incorrect value for Linux #67

brasslock opened this issue May 14, 2014 · 2 comments

Comments

@brasslock
Copy link

VanillaChronicle breaks because the incorrect number of bits is returned for the pid_max in VanillaChronicleConfig#THREAD_ID_BITS (if pid_max is not a power of 2)

In our system, /proc/sys/kernel/pid_max = 4000000
which results in PID_BITS=21.
The max value for 21 bits is 2097152.
The correct value should be 22 bits to allow for the full range of process ids.

An easy workaround is to specify -Dos.max.pid.bits=22 in the parameters when launching the Java process.

@peter-lawrey
Copy link
Member

Interesting. We can fix this to round up the number of bits.
On 14 May 2014 04:09, "Ross Black" notifications@github.com wrote:

VanillaChronicle breaks because the incorrect number of bits is returned
for the pid_max in VanillaChronicleConfig#THREAD_ID_BITS.

In our system, /proc/sys/kernel/pid_max = 4000000
which results in PID_BITS=21.

The max value for 21 bits is 2097152.
The correct value should be 22 bits to allow for the full range of process
ids.

An easy workaround is to specify -Dos.max.pid.bits=22 in the parameters
when launching the Java process.


Reply to this email directly or view it on GitHubhttps://github.com/OpenHFT/Java-Chronicle/issues/67
.

@brasslock
Copy link
Author

Thanks for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants