<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:48:52 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-12008] Accessing freed semaphore in llog_cat_add_rec after error</title>
                <link>https://jira.whamcloud.com/browse/LU-12008</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;I have this crash sporadically happening since Nov 2018 in racer:&lt;/p&gt;

&lt;p&gt;It&apos;s pretty clear that by the time we return from that llog_write_rec our log handle is no longer valid for some reason even though it was supposedly valid just as we got it.&lt;/p&gt;

&lt;p&gt;I cannot see any obvious reasons as of why.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[83062.246113] Lustre: server umount lustre-MDT0000 complete
[83063.937570] LustreError: 14362:0:(llog_cat.c:597:llog_cat_add_rec()) llog_write_rec -5: lh=ffff88009fc5ce00
[83063.956038] BUG: unable to handle kernel paging request at ffff88009fc5ce30
[83063.956917] IP: [&amp;lt;ffffffff810ba28b&amp;gt;] up_write+0xb/0x30
[83063.956917] PGD 241b067 PUD 33fa01067 PMD 33f902067 PTE 800000009fc5c060
[83063.956917] Oops: 0002 [#1] SMP DEBUG_PAGEALLOC
[83063.956917] Modules linked in: lustre(OE) ofd(OE) osp(OE) lod(OE) ost(OE) mdt(OE) mdd(OE) mgs(OE) osd_ldiskfs(OE) ldiskfs(OE) lquota(OE) lfsck(OE) obdecho(OE) mgc(OE) lov(OE) mdc(OE) osc(OE) lmv(OE) fid(OE) fld(OE) ptlrpc_gss(OE) ptlrpc(OE) obdclass(OE) ksocklnd(OE) lnet(OE) libcfs(OE) dm_mod loop zfs(PO) zunicode(PO) zavl(PO) icp(PO) zcommon(PO) znvpair(PO) spl(O) jbd2 mbcache crc_t10dif crct10dif_generic sb_edac edac_core iosf_mbi crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd virtio_balloon virtio_console pcspkr i2c_piix4 ip_tables rpcsec_gss_krb5 ata_generic drm_kms_helper crct10dif_pclmul ttm pata_acpi crct10dif_common drm ata_piix crc32c_intel drm_panel_orientation_quirks virtio_blk i2c_core serio_raw libata floppy [last unloaded: dm_flakey]
[83063.956917] CPU: 4 PID: 14362 Comm: mdt02_004 Kdump: loaded Tainted: P           OE  ------------   3.10.0-7.6-debug #1
[83063.956917] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
[83063.956917] task: ffff880083b8ea40 ti: ffff8802d1618000 task.ti: ffff8802d1618000
[83063.956917] RIP: 0010:[&amp;lt;ffffffff810ba28b&amp;gt;]  [&amp;lt;ffffffff810ba28b&amp;gt;] up_write+0xb/0x30
[83063.956917] RSP: 0018:ffff8802d161b8e0  EFLAGS: 00010246
[83063.956917] RAX: 0000000000000000 RBX: ffff88009fc5ce00 RCX: 0000000000000000
[83063.956917] RDX: 00000000ffffffff RSI: 0000000000000000 RDI: ffff88009fc5ce00
[83063.956917] RBP: ffff8802d161b930 R08: 0000000000000000 R09: 0000000000001cf1
[83063.956917] R10: 0000000000000198 R11: 0000000000000198 R12: ffff88008d8ade00
[83063.956917] R13: 0000000000000000 R14: 00000000fffffffb R15: ffff8802be9f4e40
[83063.956917] FS:  0000000000000000(0000) GS:ffff88033db00000(0000) knlGS:0000000000000000
[83063.956917] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[83063.956917] CR2: ffff88009fc5ce30 CR3: 00000000b5452000 CR4: 00000000001607e0
[83063.956917] Call Trace:
[83063.956917]  [&amp;lt;ffffffffa04087aa&amp;gt;] ? llog_cat_add_rec+0x35a/0x8a0 [obdclass]
[83063.956917]  [&amp;lt;ffffffffa04004aa&amp;gt;] llog_add+0x7a/0x1a0 [obdclass]
[83063.956917]  [&amp;lt;ffffffffa042ed09&amp;gt;] ? lprocfs_counter_add+0xf9/0x160 [obdclass]
[83063.956917]  [&amp;lt;ffffffffa073cae3&amp;gt;] sub_updates_write+0x2b9/0xcb6 [ptlrpc]
[83063.956917]  [&amp;lt;ffffffffa07207ef&amp;gt;] top_trans_stop+0x65f/0xa10 [ptlrpc]
[83063.956917]  [&amp;lt;ffffffffa0df0b3c&amp;gt;] lod_trans_stop+0x25c/0x340 [lod]
[83063.956917]  [&amp;lt;ffffffffa0e1d7bc&amp;gt;] ? lod_xattr_set+0x11c/0xc60 [lod]
[83063.956917]  [&amp;lt;ffffffffa0ce6108&amp;gt;] mdd_trans_stop+0x28/0x16e [mdd]
[83063.956917]  [&amp;lt;ffffffffa0cde701&amp;gt;] mdd_xattr_set+0x371/0x1790 [mdd]
[83063.956917]  [&amp;lt;ffffffffa0cde390&amp;gt;] ? mdd_xattr_split+0xbb0/0xbb0 [mdd]
[83063.956917]  [&amp;lt;ffffffffa0d4f365&amp;gt;] mdt_reint_setxattr+0x445/0xfc0 [mdt]
[83063.956917]  [&amp;lt;ffffffffa0d4cc70&amp;gt;] mdt_reint_rec+0x80/0x210 [mdt]
[83063.956917]  [&amp;lt;ffffffffa0d29860&amp;gt;] mdt_reint_internal+0x770/0xb40 [mdt]
[83063.956917]  [&amp;lt;ffffffffa0d319e7&amp;gt;] ? mdt_thread_info_init+0xa7/0x1e0 [mdt]
[83063.956917]  [&amp;lt;ffffffffa0d349b7&amp;gt;] mdt_reint+0x67/0x140 [mdt]
[83063.956917]  [&amp;lt;ffffffffa070bac5&amp;gt;] tgt_request_handle+0x915/0x15c0 [ptlrpc]
[83063.956917]  [&amp;lt;ffffffffa02befa7&amp;gt;] ? libcfs_debug_msg+0x57/0x80 [libcfs]
[83063.956917]  [&amp;lt;ffffffffa06b2249&amp;gt;] ptlrpc_server_handle_request+0x259/0xad0 [ptlrpc]
[83063.956917]  [&amp;lt;ffffffff810bfbd8&amp;gt;] ? __wake_up_common+0x58/0x90
[83063.956917]  [&amp;lt;ffffffff813fb7bb&amp;gt;] ? do_raw_spin_unlock+0x4b/0x90
[83063.956917]  [&amp;lt;ffffffffa06b623c&amp;gt;] ptlrpc_main+0xb5c/0x2040 [ptlrpc]
[83063.956917]  [&amp;lt;ffffffff810c33ce&amp;gt;] ? finish_task_switch+0x13e/0x1b0
[83063.956917]  [&amp;lt;ffffffffa06b56e0&amp;gt;] ? ptlrpc_register_service+0xfe0/0xfe0 [ptlrpc]
[83063.956917]  [&amp;lt;ffffffff810b4ed4&amp;gt;] kthread+0xe4/0xf0
[83063.956917]  [&amp;lt;ffffffff810b4df0&amp;gt;] ? kthread_create_on_node+0x140/0x140
[83063.956917]  [&amp;lt;ffffffff817c4c5d&amp;gt;] ret_from_fork_nospec_begin+0x7/0x21
[83063.956917]  [&amp;lt;ffffffff810b4df0&amp;gt;] ? kthread_create_on_node+0x140/0x140
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Important note, in all occurrences we can see server just finished unmounting.&lt;/p&gt;

&lt;p&gt;In fact in one case we can see some other unhappiness:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[51785.157945] Lustre: server umount lustre-MDT0001 complete
[51786.124008] LustreError: 24709:0:(llog_cat.c:576:llog_cat_add_rec()) llog_write_rec -5: lh=ffff8801bd26ae00
[51786.134062] BUG: sleeping function called from invalid context at kernel/rwsem.c:51
[51786.134064] in_atomic(): 1, irqs_disabled(): 0, pid: 23874, name: umount
[51786.134088] CPU: 3 PID: 23874 Comm: umount Kdump: loaded Tainted: P           OE  ------------   3.10.0-7.6-debug #1
[51786.134090] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
[51786.134092] Call Trace:
[51786.134183]  [&amp;lt;ffffffff817afbf2&amp;gt;] dump_stack+0x19/0x1b
[51786.134221]  [&amp;lt;ffffffff810c3bc9&amp;gt;] __might_sleep+0xd9/0x100
[51786.134226]  [&amp;lt;ffffffff817b6460&amp;gt;] down_write+0x20/0x50
[51786.134363]  [&amp;lt;ffffffffa11b1037&amp;gt;] osp_invalidate+0x177/0x210 [osp]
[51786.134391]  [&amp;lt;ffffffffa11c68a3&amp;gt;] osp_trans_stop_cb+0x133/0x180 [osp]
[51786.134399]  [&amp;lt;ffffffffa11c9647&amp;gt;] osp_trans_callback+0xa7/0xc0 [osp]
[51786.134403]  [&amp;lt;ffffffffa11a72c8&amp;gt;] osp_update_fini+0xc8/0x280 [osp]
[51786.134414]  [&amp;lt;ffffffff810b6050&amp;gt;] ? wake_up_atomic_t+0x30/0x30
[51786.134422]  [&amp;lt;ffffffffa11a76e2&amp;gt;] osp_process_config+0x262/0x560 [osp]
[51786.134559]  [&amp;lt;ffffffffa1124248&amp;gt;] lod_sub_process_config+0xe8/0x1e0 [lod]
[51786.134591]  [&amp;lt;ffffffffa112b650&amp;gt;] lod_process_config+0x4c0/0x1420 [lod]
[51786.134624]  [&amp;lt;ffffffff8120f458&amp;gt;] ? cache_alloc_debugcheck_after.isra.45+0x68/0x2d0
[51786.134626]  [&amp;lt;ffffffff812127f4&amp;gt;] ? __kmalloc+0x634/0x660
[51786.134732]  [&amp;lt;ffffffffa0ff2bb7&amp;gt;] ? mdd_iocontrol+0x327/0x1430 [mdd]
[51786.134739]  [&amp;lt;ffffffffa0fedf68&amp;gt;] mdd_process_config+0x88/0x5d0 [mdd]
[51786.134937]  [&amp;lt;ffffffffa105831f&amp;gt;] mdt_device_fini+0x2df/0xfc0 [mdt]
[51786.135010]  [&amp;lt;ffffffffa036393c&amp;gt;] class_cleanup+0x55c/0xbb0 [obdclass]
[51786.135807]  [&amp;lt;ffffffffa0364c0c&amp;gt;] class_process_config+0x65c/0x2800 [obdclass]
[51786.136295]  [&amp;lt;ffffffff8120f458&amp;gt;] ? cache_alloc_debugcheck_after.isra.45+0x68/0x2d0
[51786.136315]  [&amp;lt;ffffffff812127f4&amp;gt;] ? __kmalloc+0x634/0x660
[51786.136434]  [&amp;lt;ffffffffa020cfa7&amp;gt;] ? libcfs_debug_msg+0x57/0x80 [libcfs]
[51786.136491]  [&amp;lt;ffffffffa0366f76&amp;gt;] class_manual_cleanup+0x1c6/0x6d0 [obdclass]
[51786.136660]  [&amp;lt;ffffffffa03966ee&amp;gt;] server_put_super+0x8ae/0xca0 [obdclass]
[51786.136673]  [&amp;lt;ffffffff81238f5a&amp;gt;] generic_shutdown_super+0x6a/0xf0
[51786.136676]  [&amp;lt;ffffffff81239342&amp;gt;] kill_anon_super+0x12/0x20
[51786.136695]  [&amp;lt;ffffffffa03699b2&amp;gt;] lustre_kill_super+0x32/0x50 [obdclass]
[51786.136697]  [&amp;lt;ffffffff81239739&amp;gt;] deactivate_locked_super+0x49/0x60
[51786.136699]  [&amp;lt;ffffffff81239e86&amp;gt;] deactivate_super+0x46/0x60
[51786.136726]  [&amp;lt;ffffffff81258f6f&amp;gt;] cleanup_mnt+0x3f/0x80
[51786.136729]  [&amp;lt;ffffffff81259002&amp;gt;] __cleanup_mnt+0x12/0x20
[51786.137097]  [&amp;lt;ffffffff810b1885&amp;gt;] task_work_run+0xb5/0xf0
[51786.137168]  [&amp;lt;ffffffff8102bc22&amp;gt;] do_notify_resume+0x92/0xb0
[51786.137185]  [&amp;lt;ffffffff817c5158&amp;gt;] int_signal+0x12/0x17
[51786.202373] BUG: unable to handle kernel paging request at ffff8801bd26ae30
[51786.203262] IP: [&amp;lt;ffffffff810ba28b&amp;gt;] up_write+0xb/0x30
[51786.203262] PGD 241b067 PUD 33f3fe067 PMD 33f214067 PTE 80000001bd26a060
[51786.203262] Oops: 0002 [#1] SMP DEBUG_PAGEALLOC
[51786.203262] Modules linked in: lustre(OE) ofd(OE) osp(OE) lod(OE) ost(OE) mdt(OE) mdd(OE) mgs(OE) osd_zfs(OE) lquota(OE) lfsck(OE) obdecho(OE) mgc(OE) lov(OE) mdc(OE) osc(OE) lmv(OE) fid(OE) fld(OE) ptlrpc_gss(OE) ptlrpc(OE) obdclass(OE) ksocklnd(OE) lnet(OE) libcfs(OE) zfs(PO) zunicode(PO) zavl(PO) icp(PO) zcommon(PO) znvpair(PO) spl(O) crc_t10dif crct10dif_generic crct10dif_common pcspkr virtio_balloon i2c_piix4 virtio_console ip_tables rpcsec_gss_krb5 ata_generic pata_acpi drm_kms_helper ttm drm drm_panel_orientation_quirks ata_piix i2c_core virtio_blk serio_raw libata floppy [last unloaded: libcfs]
[51786.203262] CPU: 9 PID: 24709 Comm: mdt04_010 Kdump: loaded Tainted: P           OE  ------------   3.10.0-7.6-debug #1
[51786.203262] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
[51786.203262] task: ffff8800b49cc3c0 ti: ffff88024e038000 task.ti: ffff88024e038000
[51786.203262] RIP: 0010:[&amp;lt;ffffffff810ba28b&amp;gt;]  [&amp;lt;ffffffff810ba28b&amp;gt;] up_write+0xb/0x30
[51786.203262] RSP: 0018:ffff88024e03b8e0  EFLAGS: 00010246
[51786.203262] RAX: 0000000000000000 RBX: ffff8801bd26ae00 RCX: 0000000000000000
[51786.203262] RDX: 00000000ffffffff RSI: 0000000000000000 RDI: ffff8801bd26ae00
[51786.203262] RBP: ffff88024e03b930 R08: 0000000000000000 R09: 0000000000001933
[51786.203262] R10: 0000000000000198 R11: 0000000000000198 R12: ffff8800ac585e00
[51786.203262] R13: 0000000000000000 R14: 00000000fffffffb R15: ffff880237459540
[51786.203262] FS:  0000000000000000(0000) GS:ffff88033dc40000(0000) knlGS:0000000000000000
[51786.203262] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[51786.203262] CR2: ffff8801bd26ae30 CR3: 0000000001c10000 CR4: 00000000000006e0
[51786.203262] Call Trace:
[51786.203262]  [&amp;lt;ffffffffa0330fba&amp;gt;] ? llog_cat_add_rec+0x35a/0x8a0 [obdclass]
[51786.203262]  [&amp;lt;ffffffffa03294aa&amp;gt;] llog_add+0x7a/0x1a0 [obdclass]
[51786.203262]  [&amp;lt;ffffffffa0357119&amp;gt;] ? lprocfs_counter_add+0xf9/0x160 [obdclass]
[51786.203262]  [&amp;lt;ffffffffa06407c3&amp;gt;] sub_updates_write+0x2b9/0xcb6 [ptlrpc]
[51786.203262]  [&amp;lt;ffffffffa06244cf&amp;gt;] top_trans_stop+0x65f/0xa10 [ptlrpc]
[51786.203262]  [&amp;lt;ffffffffa1126b3c&amp;gt;] lod_trans_stop+0x25c/0x340 [lod]
[51786.203262]  [&amp;lt;ffffffffa101d108&amp;gt;] mdd_trans_stop+0x28/0x16e [mdd]
[51786.203262]  [&amp;lt;ffffffffa1015701&amp;gt;] mdd_xattr_set+0x371/0x1790 [mdd]
[51786.203262]  [&amp;lt;ffffffffa1076bb7&amp;gt;] ? mdt_version_save+0x67/0x120 [mdt]
[51786.203262]  [&amp;lt;ffffffffa1086215&amp;gt;] mdt_reint_setxattr+0x445/0xf90 [mdt]
[51786.203262]  [&amp;lt;ffffffffa1083ba0&amp;gt;] mdt_reint_rec+0x80/0x210 [mdt]
[51786.203262]  [&amp;lt;ffffffffa10607e3&amp;gt;] mdt_reint_internal+0x6e3/0xab0 [mdt]
[51786.203262]  [&amp;lt;ffffffffa1068967&amp;gt;] ? mdt_thread_info_init+0xa7/0x1e0 [mdt]
[51786.203262]  [&amp;lt;ffffffffa106b927&amp;gt;] mdt_reint+0x67/0x140 [mdt]
[51786.203262]  [&amp;lt;ffffffffa0613525&amp;gt;] tgt_request_handle+0xaf5/0x1590 [ptlrpc]
[51786.203262]  [&amp;lt;ffffffffa020cfa7&amp;gt;] ? libcfs_debug_msg+0x57/0x80 [libcfs]
[51786.203262]  [&amp;lt;ffffffffa05b6369&amp;gt;] ptlrpc_server_handle_request+0x259/0xad0 [ptlrpc]
[51786.311938]  [&amp;lt;ffffffff810bfbd8&amp;gt;] ? __wake_up_common+0x58/0x90
[51786.311938]  [&amp;lt;ffffffff813fb7bb&amp;gt;] ? do_raw_spin_unlock+0x4b/0x90
[51786.311938]  [&amp;lt;ffffffffa05ba32c&amp;gt;] ptlrpc_main+0xb5c/0x2040 [ptlrpc]
[51786.311938]  [&amp;lt;ffffffffa05b97d0&amp;gt;] ? ptlrpc_register_service+0xfb0/0xfb0 [ptlrpc]
[51786.311938]  [&amp;lt;ffffffff810b4ed4&amp;gt;] kthread+0xe4/0xf0
[51786.311938]  [&amp;lt;ffffffff810b4df0&amp;gt;] ? kthread_create_on_node+0x140/0x140
[51786.311938]  [&amp;lt;ffffffff817c4c77&amp;gt;] ret_from_fork_nospec_begin+0x21/0x21
[51786.311938]  [&amp;lt;ffffffff810b4df0&amp;gt;] ? kthread_create_on_node+0x140/0x140
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;so it seems like the freeing is happening from another thread.&lt;/p&gt;</description>
                <environment></environment>
        <key id="54979">LU-12008</key>
            <summary>Accessing freed semaphore in llog_cat_add_rec after error</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="wc-triage">WC Triage</assignee>
                                    <reporter username="green">Oleg Drokin</reporter>
                        <labels>
                    </labels>
                <created>Mon, 25 Feb 2019 05:55:52 +0000</created>
                <updated>Mon, 25 Feb 2019 06:00:13 +0000</updated>
                                            <version>Lustre 2.13.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                    <attachments>
                    </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|i00c7z:</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>