<?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: mpigdb: attaching to Cannot access memory when using -gtool option for debugging in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1444990#M10234</link>
    <description>&lt;P&gt;Hi Santosh,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks very much for this. I have tried your solution and it does seem that it's also working on my computer. However, it won't work without first changing the settings as you suggested, which is not entirely unacceptable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;AUDIO style="display: none;" controls="controls"&gt;&lt;/AUDIO&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jan 2023 14:19:35 GMT</pubDate>
    <dc:creator>xsl</dc:creator>
    <dc:date>2023-01-09T14:19:35Z</dc:date>
    <item>
      <title>mpigdb: attaching to Cannot access memory when using -gtool option for debugging</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1366595#M9262</link>
      <description>&lt;P&gt;This is a follow up on my previous question:&amp;nbsp;&lt;A href="https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/Debugging-MPI-codes-with-gtool-or-gdb-hangs-nothing-happens-when/m-p/1284089" target="_blank"&gt;https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/Debugging-MPI-codes-with-gtool-or-gdb-hangs-nothing-happens-when/m-p/1284089&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was told the cause of the issue is that I did not use a supported OS at the time but now I am actually using a supported OS (Ubuntu 20.04.4 LTS) that is freshly installed just a couple hours ago.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I still get the same error here when I try to use -gtool option to attach GDB to my code.&amp;nbsp; Here is what I used to run my code&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="bash"&gt;mpirun -n 2 -gtool "gdb:0,1=attach" ./fogo&lt;/LI-CODE&gt;
&lt;P&gt;and this is what I get&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="bash"&gt;mpigdb: attaching to Cannot access memory
mpigdb: hangup detected: while read from [0]
mpigdb: attaching to Cannot access memory
mpigdb: hangup detected: while read from [1]&lt;/LI-CODE&gt;
&lt;P&gt;I have also tried to replace gdb with gdb-oneapi but got the same thing. I could use this option on our Compute Canada clusters but most of the nodes are slow for debugging / compilation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the same error when running&lt;/P&gt;
&lt;LI-CODE lang="bash"&gt;mpirun -n 3 -gtool "gdb:0,1=attach" $I_MPI_ROOT/bin/IMB-MPI1&lt;/LI-CODE&gt;
&lt;P&gt;Any idea what is causing this issue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;AUDIO style="display: none;" controls="controls"&gt;&lt;/AUDIO&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 01:38:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1366595#M9262</guid>
      <dc:creator>xsl</dc:creator>
      <dc:date>2022-03-08T01:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: mpigdb: attaching to Cannot access memory when using -gtool option for debugging</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1367408#M9277</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;We have reported this issue to the concerned development team. They are looking into your issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 07:08:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1367408#M9277</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2022-03-10T07:08:34Z</dc:date>
    </item>
    <item>
      <title>Re:mpigdb: attaching to Cannot access memory when using -gtool option for debugging</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1440075#M10167</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you please try Intel MPI 2021.7 and let us know if the issue persists?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Dec 2022 10:19:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1440075#M10167</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2022-12-20T10:19:57Z</dc:date>
    </item>
    <item>
      <title>Re:mpigdb: attaching to Cannot access memory when using -gtool option for debugging</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1441869#M10196</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We haven't heard back from you. Could you please try Intel MPI 2021.7 and let us know if the issue persists?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Dec 2022 06:33:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1441869#M10196</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2022-12-27T06:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: mpigdb: attaching to Cannot access memory when using -gtool option for debugging</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1444946#M10233</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please follow the below steps to resolve your issue:&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Steps&lt;/U&gt;:&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;sudo sysctl -w kernel.yama.ptrace_scope=0&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;mpirun -gdb -n 4 ./sample&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;We have tried at our end &amp;amp; we are able to get the desired results as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image-2023-01-09-16-00-07-836.png" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/36874iC527CC344FC7FC82/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="image-2023-01-09-16-00-07-836.png" alt="image-2023-01-09-16-00-07-836.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please try from your end &amp;amp; let us know if you face any issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 10:42:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1444946#M10233</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2023-01-09T10:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: mpigdb: attaching to Cannot access memory when using -gtool option for debugging</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1444990#M10234</link>
      <description>&lt;P&gt;Hi Santosh,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks very much for this. I have tried your solution and it does seem that it's also working on my computer. However, it won't work without first changing the settings as you suggested, which is not entirely unacceptable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;AUDIO style="display: none;" controls="controls"&gt;&lt;/AUDIO&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 14:19:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1444990#M10234</guid>
      <dc:creator>xsl</dc:creator>
      <dc:date>2023-01-09T14:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: mpigdb: attaching to Cannot access memory when using -gtool option for debugging</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1445242#M10238</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The issue is specific to the systems having PTRACE scope to "1"(kernel.yama.ptrace_scope = 1).&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The PTRACE system is used for debugging.&amp;nbsp;With it, a single user process can attach to any other dumpable process owned by the same user.&amp;nbsp;In the case of malicious software, it is possible to use PTRACE to access credentials that exist in memory (re-using existing SSH connections, extracting GPG agent information, etc).&lt;/LI&gt;
&lt;LI class="lia-align-left"&gt;&lt;STRONG&gt;A PTRACE scope of "0" is the more permissive mode.&amp;nbsp;A scope of "1" limits PTRACE only to direct child processes&lt;/STRONG&gt; (e.g. "gdb name-of-program" and "strace -f name-of-program" work, but gdb's "attach" and "strace -fp $PID" do not).&amp;nbsp;The PTRACE scope is ignored when a user has CAP_SYS_PTRACE, so "sudo strace -fp $PID" will work as before.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-align-left"&gt;For more details see:&amp;nbsp;&lt;A href="https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace" target="_blank" rel="noopener"&gt;https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, PTRACE is not needed for the average running Ubuntu system. To that end, the default is to set the PTRACE scope to "1"&lt;STRONG&gt;.&amp;nbsp;This value(kernel.yama.ptrace_scope = 1) may not be appropriate for developers or servers with only admin accounts.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thus, the issue can be simply resolved by setting&lt;STRONG&gt; kernel.yama.ptrace_scope = 0&lt;/STRONG&gt; &amp;amp; it it not an issue related to Intel MPI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 06:42:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1445242#M10238</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2023-01-10T06:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: mpigdb: attaching to Cannot access memory when using -gtool option for debugging</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1445326#M10240</link>
      <description>&lt;P&gt;Hi Santosh,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks very much for your detailed explanation. I now understand!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;AUDIO style="display: none;" controls="controls"&gt;&lt;/AUDIO&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 12:49:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1445326#M10240</guid>
      <dc:creator>xsl</dc:creator>
      <dc:date>2023-01-10T12:49:11Z</dc:date>
    </item>
    <item>
      <title>Re:mpigdb: attaching to Cannot access memory when using -gtool option for debugging</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1445614#M10244</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick response.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As your issue is resolved, we are closing this thread. If you need any additional information, please post a new question as this thread will no longer be monitored&lt;/P&gt;&lt;P&gt;by Intel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Jan 2023 06:23:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpigdb-attaching-to-Cannot-access-memory-when-using-gtool-option/m-p/1445614#M10244</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2023-01-11T06:23:43Z</dc:date>
    </item>
  </channel>
</rss>

