# Test case failures related to seccomp

**URL:** <https://discuss.elastic.co/t/test-case-failures-related-to-seccomp/105228>\
**Category:** Elasticsearch\
**Created:** [October 25, 2017, 11:14am UTC](https://discuss.elastic.co/t/test-case-failures-related-to-seccomp/105228 "2017-10-25T11:14:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anuja](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@Anuja](https://discuss.elastic.co/u/Anuja)\
**Post date:** [October 25, 2017, 11:14am UTC](https://discuss.elastic.co/t/test-case-failures-related-to-seccomp/105228/1 "2017-10-25T11:14:39Z")

</div>

Elasticsearch version: 5.1.6

Plugins installed: No

Java Version: Openjdk version "1.8.0\_131"

Description of the problem  
I have added architecture support in SystemCallFilter.java for seccomp. However after making the above change I am facing test case failures in ":qa:evil-tests:" module. I If I remove the architecture support the test gets ignored.

Steps to reproduce:  
gradle test --continue -Dtests.haltonfailure=false -Dtests.es.node.mode=network

Logs  
1\> [2017-10-24T22:14:15,128][INFO][o.e.b.SystemCallFilterTests] [testNoExecutionFromThread]: before test  
2\> Otu 24, 2017 10:14:15 P. com.carrotsearch.randomizedtesting.RandomizedRunner$QueueUncaughtExceptionsHandler uncaughtException  
2\> WARNING: Uncaught exception in thread: Thread[Thread-1,5,TGRP-SystemCallFilterTests]  
2\> java.lang.AssertionError: should not have been able to execute!  
2\> at \_\_randomizedtesting.SeedInfo.seed([F0FB1F4393308C67]:0)  
2\> at org.junit.Assert.fail(Assert.java:88)  
2\> at org.elasticsearch.bootstrap.SystemCallFilterTests$1.run(SystemCallFilterTests.java:78)  
1\> [2017-10-24T22:14:15,162][INFO][o.e.b.SystemCallFilterTests] [testNoExecutionFromThread]: after test  
2\> REPRODUCE WITH: gradle :qa:evil-tests:test -Dtests.seed=F0FB1F4393308C67 -Dtests.class=org.elasticsearch.bootstrap.SystemCallFilterTests -Dtests.method="testNoExecutionFromThread" -Dtests.security.manager=false -Dtests.locale=fur -Dtests.timezone=US/Aleutian  
ERROR 0.04s J2 | SystemCallFilterTests.testNoExecutionFromThread \<\<\< FAILURES!  
Throwable #1: com.carrotsearch.randomizedtesting.UncaughtExceptionError: Captured an uncaught exception in thread: Thread[id=27, name=Thread-1, state=RUNNABLE, group=TGRP-SystemCallFilterTests]  
at \_\_randomizedtesting.SeedInfo.seed([F0FB1F4393308C67:AF239DDE65BCFC0C]:0)  
Caused by: java.lang.AssertionError: should not have been able to execute!  
at \_\_randomizedtesting.SeedInfo.seed([F0FB1F4393308C67]:0)  
at org.elasticsearch.bootstrap.SystemCallFilterTests$1.run(SystemCallFilterTests.java:78)  
1\> [2017-10-24T22:14:15,170][INFO][o.e.b.SystemCallFilterTests] [testNoExecution]: before test  
1\> [2017-10-24T22:14:15,171][INFO][o.e.b.SystemCallFilterTests] [testNoExecution]: after test  
2\> REPRODUCE WITH: gradle :qa:evil-tests:test -Dtests.seed=F0FB1F4393308C67 -Dtests.class=org.elasticsearch.bootstrap.SystemCallFilterTests -Dtests.method="testNoExecution" -Dtests.security.manager=false -Dtests.locale=fur -Dtests.timezone=US/Aleutian  
FAILURE 0.01s J2 | SystemCallFilterTests.testNoExecution \<\<\< FAILURES!  
Throwable #1: java.lang.AssertionError: should not have been able to execute!  
at \_\_randomizedtesting.SeedInfo.seed([F0FB1F4393308C67:ACB6FAED40CB3CD]:0)  
at org.elasticsearch.bootstrap.SystemCallFilterTests.testNoExecution(SystemCallFilterTests.java:52)  
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.base/java.lang.reflect.Method.invoke(Method.java:564)  
at java.base/java.lang.Thread.run(Thread.java:844)

If I remove seccomp support then the above tests gets ignored. Is there any way to resolve the test failure?

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [October 25, 2017, 2:01pm UTC](https://discuss.elastic.co/t/test-case-failures-related-to-seccomp/105228/2 "2017-10-25T14:01:34Z")

</div>

The test failure would seem to indicate execution is still working when seccomp is enabled on your architecture. Since blocking execution is the entire point of seccomp, I would suggest going back through the native calls you are making and double checking you are actually initializing seccomp correctly.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 22, 2017, 2:01pm UTC](https://discuss.elastic.co/t/test-case-failures-related-to-seccomp/105228/3 "2017-11-22T14:01:40Z")

</div>

Closed on November 22, 2017, 2:01pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
