Skip to content

MINOR: Add Timed wait to SslTransportLayerTest.testNetworkThreadTimeRecorded#4811

Merged
rajinisivaram merged 2 commits into
apache:trunkfrom
omkreddy:SslTransportLayerTest
Apr 3, 2018
Merged

MINOR: Add Timed wait to SslTransportLayerTest.testNetworkThreadTimeRecorded#4811
rajinisivaram merged 2 commits into
apache:trunkfrom
omkreddy:SslTransportLayerTest

Conversation

@omkreddy

@omkreddy omkreddy commented Apr 2, 2018

Copy link
Copy Markdown
Contributor

No description provided.

@omkreddy

omkreddy commented Apr 2, 2018

Copy link
Copy Markdown
Contributor Author

@rajinisivaram SslTransportLayerTest.testNetworkThreadTimeRecorded test is consistently getting stuck in infinite while loop (check below stack trace) on my machine. looks like some timing issues. spent some time to debug the issue, but no success.

For now, i changed the while loop to timed wait loop. Pls take a look.

"Test worker" #12 prio=5 os_prio=31 tid=0x00007f7fecbb9000 nid=0x5a03 runnable [0x00007000015d2000]
   java.lang.Thread.State: RUNNABLE
        at sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
        at sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:198)
        at sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:117)
        at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
        - locked <0x00000007969a1b98> (a sun.nio.ch.Util$2)
        - locked <0x00000007969a1b88> (a java.util.Collections$UnmodifiableSet)
        - locked <0x00000007969a1a68> (a sun.nio.ch.KQueueSelectorImpl)
        at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
        at org.apache.kafka.common.network.Selector.select(Selector.java:684)
        at org.apache.kafka.common.network.Selector.poll(Selector.java:408)
        at org.apache.kafka.common.network.SslTransportLayerTest.testNetworkThreadTimeRecorded(SslTransportLayerTest.java:665)

@omkreddy

omkreddy commented Apr 2, 2018

Copy link
Copy Markdown
Contributor Author

retest this please.

@rajinisivaram rajinisivaram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@omkreddy Thanks for the PR. Left a minor comment. So does this fail consistently with the PR? If so, can you run with debug logging and raise a JIRA with the logs? Thanks.

} catch (IOException e) {
return false;
}
return selector.completedReceives().size() > 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use !isEmpty() instead of .size()?

@omkreddy omkreddy Apr 3, 2018

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rajinisivaram Thanks for the review. test is failing most of the times. I will create JIRA with relevant logs.

@rajinisivaram rajinisivaram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@omkreddy Thanks for the update, LGTM.

@rajinisivaram

Copy link
Copy Markdown
Contributor

Test failures are unrelated, merging to trunk.

@rajinisivaram rajinisivaram merged commit e4c8e3e into apache:trunk Apr 3, 2018
@omkreddy omkreddy deleted the SslTransportLayerTest branch July 3, 2018 15:44
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

Successfully merging this pull request may close these issues.

2 participants