<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:37:28 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-10704] open(2) with O_CREAT takes 60s (timeout) with virus scanning application</title>
                <link>https://jira.whamcloud.com/browse/LU-10704</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;On the client when Lustre creates a file, we create the inode and instantiate the dentry in ll_create_it(), it&apos;s still hidden by lld-&amp;gt;lld_invalid. Next lookup could discover it, however this brings an issue for some applications. like virus scanning, for example &lt;a href=&quot;https://www.f-secure.com/en/web/business_global/downloads/linux-security&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.f-secure.com/en/web/business_global/downloads/linux-security&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;f-secure does real time scanning using fanotify. When client creates a file using open(2) with O_CREAT, the process will wait in fanotify until f-secure scanning thread does its job:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffff8124b785&amp;gt;&amp;#93;&lt;/span&gt; fanotify_handle_event+0x1e5/0x330&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffff81247e15&amp;gt;&amp;#93;&lt;/span&gt; fsnotify+0x285/0x510&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffff812b4936&amp;gt;&amp;#93;&lt;/span&gt; security_file_open+0x66/0x70&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffff81200539&amp;gt;&amp;#93;&lt;/span&gt; do_dentry_open+0xb9/0x2e0&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffff8120078f&amp;gt;&amp;#93;&lt;/span&gt; finish_open+0x2f/0x40&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffffc0a31506&amp;gt;&amp;#93;&lt;/span&gt; ll_atomic_open+0x1d6/0x11f0 &lt;span class=&quot;error&quot;&gt;&amp;#91;lustre&amp;#93;&lt;/span&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffff812121bd&amp;gt;&amp;#93;&lt;/span&gt; do_last+0xa4d/0x12c0&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffff81212af2&amp;gt;&amp;#93;&lt;/span&gt; path_openat+0xc2/0x490&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffff8121508b&amp;gt;&amp;#93;&lt;/span&gt; do_filp_open+0x4b/0xb0&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffff81201bc3&amp;gt;&amp;#93;&lt;/span&gt; do_sys_open+0xf3/0x1f0&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffff81201cde&amp;gt;&amp;#93;&lt;/span&gt; SyS_open+0x1e/0x20&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffff816b89fd&amp;gt;&amp;#93;&lt;/span&gt; system_call_fastpath+0x16/0x1b&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;lt;ffffffffffffffff&amp;gt;&amp;#93;&lt;/span&gt; 0xffffffffffffffff&lt;/p&gt;

&lt;p&gt;The scanning thread will try to do lookup, the dcache lookup will fail because lld-&amp;gt;lld_invalid, so it tries lookup_real, which requires i_mutex holding by the thread creating the file and waiting for the scanning thread.&lt;/p&gt;

&lt;p&gt;Eventually scanning thread will be killed by f-secure after the timeout, and file creation could finish. Any thread tries to take i_mutex on the parent will block during the timeout.&lt;/p&gt;</description>
                <environment></environment>
        <key id="50919">LU-10704</key>
            <summary>open(2) with O_CREAT takes 60s (timeout) with virus scanning application</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="dongyang">Dongyang Li</assignee>
                                    <reporter username="lidongyang">Li Dongyang</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Fri, 23 Feb 2018 05:00:25 +0000</created>
                <updated>Fri, 17 Aug 2018 22:22:39 +0000</updated>
                                            <version>Upstream</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="221544" author="gerrit" created="Fri, 23 Feb 2018 05:04:04 +0000"  >&lt;p&gt;Li Dongyang (dongyangli@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/31390&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31390&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10704&quot; title=&quot;open(2) with O_CREAT takes 60s (timeout) with virus scanning application&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10704&quot;&gt;LU-10704&lt;/a&gt; llite: unhide the dentry for O_CREAT&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: b3e75d0570349547dd1d9f618ef99a196977d37c&lt;/p&gt;</comment>
                            <comment id="221555" author="laisiyao" created="Fri, 23 Feb 2018 11:42:35 +0000"  >&lt;p&gt;IMHO the root cause is creating thread holds i_mutex and waiting, which should release i_mutex and then wait.&lt;/p&gt;</comment>
                            <comment id="222296" author="lidongyang" created="Mon, 5 Mar 2018 03:32:48 +0000"  >&lt;p&gt;Attached debug log with dentry dlmtrace and rpctrace&lt;/p&gt;</comment>
                            <comment id="222345" author="laisiyao" created="Mon, 5 Mar 2018 09:15:11 +0000"  >&lt;p&gt;I just updated the patch, please take a try.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="29684" name="debug-log" size="97796" author="lidongyang" created="Mon, 5 Mar 2018 04:22:24 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzzt7j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>