<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re:SIGBUS when running multiple threads in enclave in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SIGBUS-when-running-multiple-threads-in-enclave/m-p/1413335#M5466</link>
    <description>&lt;P&gt;Hi Xunf,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can you share the exact error messages you are getting?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Sahira&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 07 Sep 2022 18:58:13 GMT</pubDate>
    <dc:creator>Sahira_Intel</dc:creator>
    <dc:date>2022-09-07T18:58:13Z</dc:date>
    <item>
      <title>SIGBUS when running multiple threads in enclave</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SIGBUS-when-running-multiple-threads-in-enclave/m-p/1412805#M5457</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder if anyone have ever encountered bus errors when running multiple threads inside enclave.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My application launches multiple threads to enter enclave, each handling a request. Inside enclave they decrypt buffers of AES GCM encrypted contents in parallel and access shared data coordinated by mutexes. When I increase concurrency to 4 or 8 threads, some time the apps is terminated by SIGBUS signal. And the sgx-gdb points to locations with memory operations like memcpy/memset. I tried to implement similar logics outside SGX and no memory leak is detected with repeated testing using valgrind/asan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using SGX SDK 2.14 on ubuntu 20.04 with in-kernel driver. Any suggestions is greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;xunf&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 14:09:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SIGBUS-when-running-multiple-threads-in-enclave/m-p/1412805#M5457</guid>
      <dc:creator>xunf</dc:creator>
      <dc:date>2022-09-05T14:09:45Z</dc:date>
    </item>
    <item>
      <title>Re:SIGBUS when running multiple threads in enclave</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SIGBUS-when-running-multiple-threads-in-enclave/m-p/1413335#M5466</link>
      <description>&lt;P&gt;Hi Xunf,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can you share the exact error messages you are getting?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Sahira&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Sep 2022 18:58:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SIGBUS-when-running-multiple-threads-in-enclave/m-p/1413335#M5466</guid>
      <dc:creator>Sahira_Intel</dc:creator>
      <dc:date>2022-09-07T18:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: SIGBUS when running multiple threads in enclave</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SIGBUS-when-running-multiple-threads-in-enclave/m-p/1413508#M5468</link>
      <description>&lt;P&gt;Hi Sahira,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The message is like&amp;nbsp; "Bad memory access (SIGBUS) bus error".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have managed to get rid of the problem by rolling back to an older kernel version that worked for me: linux 5.13.0-41-generic. The problematic combination was linux 5.15.0-46 with SGX SDK 2.14. I am still not sure what caused the problem, any thoughts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Btw, is there any table that describes the compatibility between SDK versions and kernel versions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;xunf&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 12:07:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SIGBUS-when-running-multiple-threads-in-enclave/m-p/1413508#M5468</guid>
      <dc:creator>xunf</dc:creator>
      <dc:date>2022-09-08T12:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: SIGBUS when running multiple threads in enclave</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SIGBUS-when-running-multiple-threads-in-enclave/m-p/1414474#M5469</link>
      <description>&lt;P&gt;Hi Xunf,&lt;/P&gt;
&lt;P&gt;There's not any table listing compatibility specifically for the SGX SDK, but it is listed the mainline Linux kernel has built-in SGX support since release 5.11, and the in-kernel driver requires the platform to support and be configured for flexible launch control. If you are able to, I would suggest upgrading your SDK version to the latest 2.17 and trying again.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are still getting the error, would you be able to share a sample of your code so I can run it on my end?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;Sahira&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 16:01:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SIGBUS-when-running-multiple-threads-in-enclave/m-p/1414474#M5469</guid>
      <dc:creator>Sahira_Intel</dc:creator>
      <dc:date>2022-09-13T16:01:12Z</dc:date>
    </item>
  </channel>
</rss>

