Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Disable cache attach and detach" #1590

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robertbaldyga
Copy link
Member

This reverts commit f34328a.

This reverts commit f34328a.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Copy link

@Kamoppl Kamoppl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have found 3 bugs

Steps to reproduce:
(1/3, 2/3)

  1. Start cache
  2. Add core
  3. Detach cache
  4. Remove core ->
    cache1: Cannot flush core - cache device is detached
    Removing core failed. Detaching cache1.core1
    --> But core is left in inactive state
    └core 1 /dev/vdb1 Inactive - -
  5. Remove inactive core ->
    [175258.094146] ------------[ cut here ]------------
    [175258.094150] kernel BUG at /root/open-cas-linux/modules/cas_cache/src/ocf/utils/utils_refcnt.c:65!
    [175258.095472] invalid opcode: 0000 [Add README and LICENSE files #1] SMP NOPTI
    [175258.096300] CPU: 7 PID: 4099689 Comm: cas_mngt_1 Tainted: G OE 5.15.0-72-generic Init SCSI request properly on newer kernels #79-Ubuntu
    [175258.097484] Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.16.0-4.module_el8+603+e0ca2c01 04/01/2014
    [175258.098707] RIP: 0010:ocf_refcnt_unfreeze+0x1e/0x20 [cas_cache]
    [175258.099794] Code: 0f 0b 0f 0b 0f 0b 66 0f 1f 44 00 00 0f 1f 44 00 00 55 b8 ff ff ff ff 48 89 e5 f0 0f c1 47 04 83 e8 01 78 06 5d c3 cc cc cc cc <0f> 0b 0f 1f 44 00 00 55 8b 47 04 85 c0 48 89 e5 0f 95 c0 5d c3 cc
    [175258.102354] RSP: 0018:ff53da78489fbde0 EFLAGS: 00010297
    [175258.103332] RAX: 00000000ffffffff RBX: ff53da7848ae1078 RCX: 0000000000000027
    [175258.104470] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ff53da7848ae10a0
    [175258.105601] RBP: ff53da78489fbde0 R08: 0000000000000003 R09: fffffffffffff2f0
    [175258.106726] R10: ffffffffffffffff R11: 0000000000000001 R12: ff53da7848ae1000
    [175258.107851] R13: ff53da7848ae1000 R14: ff53da7848ae1000 R15: ff53da7848c28080
    [175258.108977] FS: 0000000000000000(0000) GS:ff1485fb9fc40000(0000) knlGS:0000000000000000
    [175258.110182] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [175258.111211] CR2: 00007f8c706f9000 CR3: 0000000891e58006 CR4: 0000000000771ee0
    [175258.112350] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [175258.113489] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [175258.114619] PKRU: 55555554
    [175258.115408] Call Trace:
    [175258.116165]
    [175258.116901] ocf_cleaner_refcnt_unfreeze+0x25/0x60 [cas_cache]
    [175258.117928] ocf_mngt_cache_remove_core_finish+0x5d/0xc0 [cas_cache]
    [175258.118983] _ocf_pipeline_run_step+0xad/0x160 [cas_cache]
    [175258.119964] ocf_queue_run+0xf0/0x110 [cas_cache]
    [175258.120879] _cas_io_queue_thread+0x6f/0x110 [cas_cache]
    [175258.121836] ? wait_woken+0x70/0x70
    [175258.122671] ? env_sort+0x240/0x240 [cas_cache]
    [175258.123555] kthread+0x127/0x150
    [175258.124328] ? set_kthread_struct+0x50/0x50
    [175258.125168] ret_from_fork+0x1f/0x30
    [175258.125983]
    [175258.126664] Modules linked in: tls null_blk xfs drbd_transport_tcp(OE) xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo nft_counter xt_addrtype nft_compat nf_tables nfnetlink br_netfilter bridge stp llc overlay binfmt_misc nls_iso8859_1 intel_rapl_msr intel_rapl_common ppdev nfit kvm_intel cas_cache(OE) joydev kvm input_leds rapl parport_pc serio_raw parport mac_hid sch_fq_codel handshake(OE) dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua drbd(OE) lru_cache ramoops reed_solomon pstore_blk pstore_zone efi_pstore ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear hid_generic usbhid hid virtio_gpu virtio_dma_buf drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops crct10dif_pclmul crc32_pclmul ghash_clmulni_intel virtio_net cec rc_core ahci aesni_intel
    [175258.126880] crypto_simd net_failover i2c_i801 xhci_pci cryptd psmouse drm libahci lpc_ich i2c_smbus virtio_blk xhci_pci_renesas failover [last unloaded: null_blk]
    [175258.140397] ---[ end trace 0a1e7b356b4127a0 ]---
    [175258.141286] RIP: 0010:ocf_refcnt_unfreeze+0x1e/0x20 [cas_cache]
    [175258.142411] Code: 0f 0b 0f 0b 0f 0b 66 0f 1f 44 00 00 0f 1f 44 00 00 55 b8 ff ff ff ff 48 89 e5 f0 0f c1 47 04 83 e8 01 78 06 5d c3 cc cc cc cc <0f> 0b 0f 1f 44 00 00 55 8b 47 04 85 c0 48 89 e5 0f 95 c0 5d c3 cc
    [175258.144903] RSP: 0018:ff53da78489fbde0 EFLAGS: 00010297
    [175258.145927] RAX: 00000000ffffffff RBX: ff53da7848ae1078 RCX: 0000000000000027
    [175258.146998] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ff53da7848ae10a0
    [175258.148056] RBP: ff53da78489fbde0 R08: 0000000000000003 R09: fffffffffffff2f0
    [175258.149109] R10: ffffffffffffffff R11: 0000000000000001 R12: ff53da7848ae1000
    [175258.150298] R13: ff53da7848ae1000 R14: ff53da7848ae1000 R15: ff53da7848c28080
    [175258.151345] FS: 0000000000000000(0000) GS:ff1485fb9fc40000(0000) knlGS:0000000000000000
    [175258.152459] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [175258.153385] CR2: 00007f8c706f9000 CR3: 0000000891e58006 CR4: 0000000000771ee0
    [175258.154550] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [175258.155585] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

(3/3)

  1. Start 40 MB cache
  2. Detach cache
  3. Attach 100 MB cache
  4. Detach cache
  5. Attach 40MB cache
    ->
    cache1: Couldn't fit metadata structure on device. Please try bigger cache device.
    cache1: Attaching cache device failed

It looks like bug occurs while cache attach operation using smaller disk than it was detached with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants