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

Fix ClassCastException and native crash when using kqueue transport. #8665

Merged
merged 1 commit into from
Dec 19, 2018

Conversation

normanmaurer
Copy link
Member

Motivation:

How we did the mapping from native code to AbstractKQueueChannel was not safe and could lead to heap corruption. This then sometimes produced ClassCastExceptions or could also lead to crashes. This happened sometimes when running the testsuite.

Modifications:

Use a Map for the mapping (just as we do in the native epoll transport).

Result:

No more heap corruption / crashes.

Motivation:

How we did the mapping from native code to AbstractKQueueChannel was not safe and could lead to heap corruption. This then sometimes produced ClassCastExceptions or could also lead to crashes. This happened sometimes when running the testsuite.

Modifications:

Use a Map for the mapping (just as we do in the native epoll transport).

Result:

No more heap corruption / crashes.
@normanmaurer
Copy link
Member Author

Let me also merge this so I can move forward. If we need we can do a followup.

@normanmaurer normanmaurer added this to the 4.1.33.Final milestone Dec 19, 2018
@normanmaurer normanmaurer merged commit d77bdea into 4.1 Dec 19, 2018
@normanmaurer normanmaurer deleted the kqueue_native_cce branch December 19, 2018 11:14
normanmaurer added a commit that referenced this pull request Dec 19, 2018
…8665)

Motivation:

How we did the mapping from native code to AbstractKQueueChannel was not safe and could lead to heap corruption. This then sometimes produced ClassCastExceptions or could also lead to crashes. This happened sometimes when running the testsuite.

Modifications:

Use a Map for the mapping (just as we do in the native epoll transport).

Result:

No more heap corruption / crashes.
@carl-mastrangelo
Copy link
Member

LGTM

normanmaurer added a commit that referenced this pull request Feb 22, 2019
…ue transport

Motivation:

In #8665 we changed how we handle the registration of Channels to KQueue but missed to removed some code which would deregister the Channel before it actual closed the underlying socket. This could lead to have events triggered still while not have a mapping to the Channel anymore.

Modifications:

Remove deregister call during socket closure.

Result:

Fixes #8849.
normanmaurer added a commit that referenced this pull request Feb 25, 2019
…ue transport (#8881)

Motivation:

In #8665 we changed how we handle the registration of Channels to KQueue but missed to removed some code which would deregister the Channel before it actual closed the underlying socket. This could lead to have events triggered still while not have a mapping to the Channel anymore.

Modifications:

Remove deregister call during socket closure.

Result:

Fixes #8849.
normanmaurer added a commit that referenced this pull request Feb 25, 2019
…ue transport (#8881)

Motivation:

In #8665 we changed how we handle the registration of Channels to KQueue but missed to removed some code which would deregister the Channel before it actual closed the underlying socket. This could lead to have events triggered still while not have a mapping to the Channel anymore.

Modifications:

Remove deregister call during socket closure.

Result:

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

Successfully merging this pull request may close these issues.

2 participants