Content-Type: multipart/mixed; boundary="===============6316382829656393141==" MIME-Version: 1.0 From: toan.d.le3 at gmail.com Subject: [SPDK] Could not write synchronously to blobfs Date: Thu, 07 Jan 2021 22:06:54 +0000 Message-ID: <20210107220654.2833.35071@ml01.vlan13.01.org> List-ID: To: spdk@lists.01.org --===============6316382829656393141== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable I am new to SPDK and I try to use synchronous write (spdk_file_write). Afte= r creating a file successfully (spdk_fs_open_file) on NVMe drive, writing t= o the file causes the crash. I attached the call stack below Asynchronous functions on blobfs seem to work fine with the system. Any suggestions would be appreciated very much. //Toan Le Configuration: OS: CentOS Linux release 7.9.2009 Kernel: 5.1.6-1.el7.elrepo.x86_64 SPDK: 20.07, DPDK 19.11.3 Call stack #0 rte_mempool_default_cache (mp=3D, mp=3D, lcore_id=3D) at /opt/dpdk/dpdk-19.11.3/build/include/rte= _mempool.h:1260 No locals. #1 rte_mempool_get_bulk (n=3D1, obj_table=3D0x7fa6728910b8, mp=3D0x0) at /opt/dpdk/dpdk-19.11.3/build/include/rte_mempool.h:1538 No locals. #2 rte_mempool_get (obj_p=3D0x7fa6728910b8, mp=3D0x0) at /opt/dpdk/dpdk-19.11.3/build/include/rte_mempool.h:1565 No locals. #3 spdk_mempool_get (mp=3D0x0) at env.c:264 ele =3D #4 0x0000000000425a37 in cache_insert_buffer (file=3Dfile(a)entry=3D0x7fa6= 6cd40870, offset=3D0) at blobfs.c:2174 buf =3D 0x7fa66cd3f470 count =3D 0 need_update =3D false __func__ =3D #6 spdk_file_write (file=3D0x7fa66cd40870, ctx=3D0x7fa66cd404b0, payload=3Dpayload(a)entry=3D0x1262229, offset=3Doffset(a)entry=3D0, len= gth=3D11) at blobfs.c:2490 channel =3D rem_length =3D copy =3D cluster_sz =3D cache_buffers_filled =3D 0 cur_payload =3D last =3D #7 0x000000000040a76b in write_file (cli_context=3D0x1262100) at blobfs_sy= nc.c:314 name =3D 0x1262338 "/test1.txt" file =3D 0x7fa66cd40870 rc =3D #8 load_blobfs_cb (cb_arg=3D0x1262100, fs=3D, fserrno=3D) at blobfs_sync.c:421 fserrno =3D 0 fs =3D cb_arg =3D 0x1262100 cli_context =3D 0x1262100 #9 0x0000000000425290 in fs_load_done (ctx=3D0x1263740, bserrno=3D) at blobfs.c:724 req =3D 0x1263740 args =3D 0x1263740 fs =3D #10 0x000000000043378e in bs_request_set_complete (set=3D) a= t request.c:90 cpl =3D {type =3D SPDK_BS_CPL_TYPE_BS_HANDLE, u =3D {bs_basic =3D { cb_fn =3D 0x427750 , cb_arg =3D 0x1263740}, bs_handl= e =3D { cb_fn =3D 0x427750 , cb_arg =3D 0x1263740, bs =3D 0x= 128dac0}, blob_basic =3D { cb_fn =3D 0x427750 , cb_arg =3D 0x1263740}, blobid = =3D { cb_fn =3D 0x427750 , cb_arg =3D 0x1263740, blobid = =3D 19454656}, blob_handle =3D {cb_fn =3D 0x427750 , cb_arg =3D 0x126= 3740, blob =3D 0x128dac0}, nested_seq =3D {cb_fn =3D 0x427750 , cb_arg =3D 0x1263740, parent =3D 0x128dac0}}} bserrno =3D #11 0x0000000000433a8c in bs_sequence_finish (seq=3D, bserrn= o=3Dbserrno(a)entry=3D0) at request.c:256 No locals. #12 0x0000000000431660 in bs_load_iter (arg=3D0x12a0200, blob=3D, bserrno=3D0) at blobstore.c:3519 ctx =3D 0x12a0200 #13 0x000000000042f496 in bs_iter_cpl (cb_arg=3D0x7fa66cd3e8f0, _blob=3D, bserrno=3D) at blobstore.c:7076 ctx =3D 0x7fa66cd3e8f0 bs =3D 0x128dac0 #14 0x000000000042852a in bdev_blob_io_complete (bdev_io=3D0x2000072b7a80, success=3D, arg=3D) at blob_bdev.c:86 cb_args =3D bserrno =3D #15 0x000000000044dd47 in nvme_complete_request (qpair=3D0x200006c10ad8, cp= l=3D0x200006c0d030, req=3D0x200015cab280, cb_arg=3D, cb_fn=3D) at nvme_internal.h:1048 err_cpl =3D {cdw0 =3D 1921586144, rsvd1 =3D 32678, sqhd =3D 4896, s= qid =3D 29321, cid =3D 32678, {status_raw =3D 0, status =3D {p =3D 0, sc =3D 0, sct =3D 0, rsvd= 2 =3D 0, m =3D 0, dnr =3D 0}}} cmd =3D 0x8020c #16 nvme_pcie_qpair_complete_tracker (qpair=3Dqpair(a)entry=3D0x200006c10ad= 8, tr=3D0x2000004fd000, cpl=3Dcpl(a)entry=3D0x200006c0d030, print_on_error=3Dprint_on_error(a)e= ntry=3Dtrue) at nvme_pcie.c:1402 req =3D 0x200015cab280 retry =3D error =3D req_from_current_proc =3D true #17 0x000000000044dfe8 in nvme_pcie_qpair_process_completions (qpair=3D0x20= 0006c10ad8, max_completions=3D64) at nvme_pcie.c:2434 tr =3D cpl =3D 0x200006c0d030 next_cpl =3D num_completions =3D 0 ctrlr =3D 0x200006c17840 next_cq_head =3D next_phase =3D next_is_valid =3D false __func__ =3D req =3D tmp =3D __func__ =3D ) at = nvme_pcie.c:2526 qpair =3D 0x200006c10ad8 tmp_qpair =3D 0x0 local_completions =3D total_completions =3D 0 #20 0x00000000004583f5 in nvme_transport_poll_group_process_completions ( tgroup=3Dtgroup(a)entry=3D0x12a00b0, completions_per_qpair=3Dcompletion= s_per_qpair(a)entry=3D0, disconnected_qpair_cb=3Ddisconnected_qpair_cb(a)entry=3D0x40d240 ) at nvme_transport.c:499 qpair =3D 0x40d240 rc =3D #21 0x0000000000462972 in spdk_nvme_poll_group_process_completions (group= =3D, completions_per_qpair=3Dcompletions_per_qpair(a)entry=3D0, disconnected_qpair_cb=3Ddisconnected_qpair_cb(a)entry=3D0x40d240 ) at nvme_poll_group.c:127 tgroup =3D 0x12a00b0 local_completions =3D error_reason =3D 0 num_completions =3D 0 #22 0x000000000040d1d7 in bdev_nvme_poll (arg=3D0x129ff10) at bdev_nvme.c:2= 48 group =3D 0x129ff10 num_completions =3D #23 0x000000000048ceed in thread_poll (now=3D404406211862183, max_msgs=3D0,= thread=3D0x1263350) at thread.c:602 poller_rc =3D poller =3D 0x129ff50 tmp =3D 0x0 critical_msg =3D rc =3D 0 #24 spdk_thread_poll (thread=3Dthread(a)entry=3D0x1263350, max_msgs=3Dmax_m= sgs(a)entry=3D0, now=3D404406211862183) at thread.c:689 No locals. #25 0x000000000048ac18 in _reactor_run (reactor=3D0x7fa66cd3e7c0) at reacto= r.c:326 thread =3D 0x1263350 tmp =3D 0x0 lw_thread =3D 0x1263678 now =3D rc =3D #26 reactor_run (arg=3D0x7fa66cd3e7c0) at reactor.c:382 thread =3D lw_thread =3D tmp =3D thread_name =3D "reactor_0\000\030\004\000\000\000\000\300\356(\004= \000\000\000\000\330\016\071\004\000\000\000" __func__ =3D #27 0x000000000048b0d1 in spdk_reactors_start () at reactor.c:477 reactor =3D tmp_cpumask =3D {str =3D '\000' , cpus =3D '\000= ' } i =3D 4294967295 current_core =3D 0 rc =3D thread_name =3D "\340o\352\004\000\000\000\000\370\217\372\004\000\= 000\000\000\020\260\005\000\000\000\000(\320\032\005\000\000\000" __func__ =3D #28 0x00000000004894d0 in spdk_app_start (opts=3D0x7ffd8307fe70, start_fn=3Dstart_fn(a)entry=3D0x40a2e0 , arg1=3D= arg1(a)entry=3D0x1262100) at app.c:710 config =3D rc =3D tty =3D tmp_cpumask =3D {str =3D '\000' , cpus =3D "\001", '\000' } g_env_was_setup =3D false __func__ =3D #29 0x000000000040a2b6 in initialize_spdk (arg=3D0x1262100) at blobfs_sync.= c:708 cli_context =3D 0x1262100 opts =3D rc =3D #30 0x00007fa6713d0ea5 in start_thread () from /lib64/libpthread.so.0 No symbol table info available. #31 0x00007fa6710f996d in clone () from /lib64/libc.so.6 --===============6316382829656393141==--