{"action":"closed","issue":{"url":"https://api.github.com/repos/spdk/spdk/issues/448","repository_url":"https://api.github.com/repos/spdk/spdk","labels_url":"https://api.github.com/repos/spdk/spdk/issues/448/labels{/name}","comments_url":"https://api.github.com/repos/spdk/spdk/issues/448/comments","events_url":"https://api.github.com/repos/spdk/spdk/issues/448/events","html_url":"https://github.com/spdk/spdk/issues/448","id":365087500,"node_id":"MDU6SXNzdWUzNjUwODc1MDA=","number":448,"title":"Nvmf target core dumped when using same device to construct crypto bdev again in nvmf.conf","user":{"login":"xuhuagen","id":33302826,"node_id":"MDQ6VXNlcjMzMzAyODI2","avatar_url":"https://avatars3.githubusercontent.com/u/33302826?v=4","gravatar_id":"","url":"https://api.github.com/users/xuhuagen","html_url":"https://github.com/xuhuagen","followers_url":"https://api.github.com/users/xuhuagen/followers","following_url":"https://api.github.com/users/xuhuagen/following{/other_user}","gists_url":"https://api.github.com/users/xuhuagen/gists{/gist_id}","starred_url":"https://api.github.com/users/xuhuagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuhuagen/subscriptions","organizations_url":"https://api.github.com/users/xuhuagen/orgs","repos_url":"https://api.github.com/users/xuhuagen/repos","events_url":"https://api.github.com/users/xuhuagen/events{/privacy}","received_events_url":"https://api.github.com/users/xuhuagen/received_events","type":"User","site_admin":false},"labels":[{"id":235898962,"node_id":"MDU6TGFiZWwyMzU4OTg5NjI=","url":"https://api.github.com/repos/spdk/spdk/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"peluse","id":4650360,"node_id":"MDQ6VXNlcjQ2NTAzNjA=","avatar_url":"https://avatars1.githubusercontent.com/u/4650360?v=4","gravatar_id":"","url":"https://api.github.com/users/peluse","html_url":"https://github.com/peluse","followers_url":"https://api.github.com/users/peluse/followers","following_url":"https://api.github.com/users/peluse/following{/other_user}","gists_url":"https://api.github.com/users/peluse/gists{/gist_id}","starred_url":"https://api.github.com/users/peluse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peluse/subscriptions","organizations_url":"https://api.github.com/users/peluse/orgs","repos_url":"https://api.github.com/users/peluse/repos","events_url":"https://api.github.com/users/peluse/events{/privacy}","received_events_url":"https://api.github.com/users/peluse/received_events","type":"User","site_admin":false},"assignees":[{"login":"peluse","id":4650360,"node_id":"MDQ6VXNlcjQ2NTAzNjA=","avatar_url":"https://avatars1.githubusercontent.com/u/4650360?v=4","gravatar_id":"","url":"https://api.github.com/users/peluse","html_url":"https://github.com/peluse","followers_url":"https://api.github.com/users/peluse/followers","following_url":"https://api.github.com/users/peluse/following{/other_user}","gists_url":"https://api.github.com/users/peluse/gists{/gist_id}","starred_url":"https://api.github.com/users/peluse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peluse/subscriptions","organizations_url":"https://api.github.com/users/peluse/orgs","repos_url":"https://api.github.com/users/peluse/repos","events_url":"https://api.github.com/users/peluse/events{/privacy}","received_events_url":"https://api.github.com/users/peluse/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-09-29T02:22:45Z","updated_at":"2018-09-30T01:10:57Z","closed_at":"2018-09-30T01:10:57Z","author_association":"CONTRIBUTOR","body":"Now, I  try to add crypto option into nvmf.conf and start nvmf_tgt, nvmf config file like as below:\r\n```\r\n[Nvme]\r\nTransportId \"trtype:PCIe traddr:0000:06:00.0\" Nvme0\r\n\r\n[crypto]\r\n  CRY Nvme0n1 Crypto_Nvme0n1 0123456789123456 crypto_aesni_mb\r\n  CRY Nvme0n1 Crypto_Nvme1n1 0123456789123456 crypto_aesni_mb\r\n\r\n[Subsystem1]\r\n  NQN nqn.2016-06.io.spdk:cnode1\r\n  Listen RDMA 192.168.11.11:4420\r\n  AllowAnyHost Yes\r\n  Host nqn.2016-06.io.spdk:init\r\n  SN SPDK00000000000001\r\n  MaxNamespaces 20\r\n  Namespace Crypto_Nvme0n1 1\r\n  Namespace Crypto_Nvme1n1 2\r\n```\r\n\r\nstart nvmf_tgt then  ctrl+c to kill it, core dumped occur. \r\n```\r\n[root@waikikibeach35 spdk]# ./app/nvmf_tgt/nvmf_tgt -c ../nvmf.conf\r\nStarting SPDK v18.10-pre / DPDK 18.05.0 initialization...\r\n[ DPDK EAL parameters: nvmf --no-shconf -c 0x1 --legacy-mem --file-prefix=spdk_pid15245 ]\r\nEAL: Detected 44 lcore(s)\r\nEAL: Detected 2 NUMA nodes\r\nEAL: Multi-process socket /var/run/dpdk/spdk_pid15245/mp_socket\r\nEAL: No free hugepages reported in hugepages-1048576kB\r\nEAL: Probing VFIO support...\r\napp.c: 600:spdk_app_start: *NOTICE*: Total cores available: 1\r\nreactor.c: 703:spdk_reactors_init: *NOTICE*: Occupied cpu socket mask is 0x1\r\nreactor.c: 490:_spdk_reactor_run: *NOTICE*: Reactor started on core 0 on socket 0\r\nvbdev_crypto.c:1204:vbdev_crypto_init: *NOTICE*: WARNING: You are storing your key in a plain text file!!\r\nvbdev_crypto.c:1204:vbdev_crypto_init: *NOTICE*: WARNING: You are storing your key in a plain text file!!\r\nCRYPTODEV: [crypto_aesni_mb] - Creating cryptodev crypto_aesni_mb\r\n\r\nCRYPTODEV: [crypto_aesni_mb] - Initialisation parameters - name: crypto_aesni_mb,socket id: 0, max queue pairs: 8, max sessions: 2048\r\nvbdev_crypto.c: 219:vbdev_crypto_init_crypto_drivers: *NOTICE*: created virtual PMD crypto_aesni_mb\r\nEAL: PCI device 0000:05:00.0 on NUMA socket 0\r\nEAL:   probe driver: 8086:953 spdk_nvme\r\nEAL: PCI device 0000:06:00.0 on NUMA socket 0\r\nEAL:   probe driver: 8086:953 spdk_nvme\r\nEAL: PCI device 0000:07:00.0 on NUMA socket 0\r\nEAL:   probe driver: 8086:953 spdk_nvme\r\nEAL: PCI device 0000:08:00.0 on NUMA socket 0\r\nEAL:   probe driver: 8086:953 spdk_nvme\r\nEAL: PCI device 0000:09:00.0 on NUMA socket 0\r\nEAL:   probe driver: 8086:2701 spdk_nvme\r\nEAL: PCI device 0000:0b:00.0 on NUMA socket 0\r\nEAL:   probe driver: 8086:953 spdk_nvme\r\nEAL: PCI device 0000:0c:00.0 on NUMA socket 0\r\nEAL:   probe driver: 8086:953 spdk_nvme\r\nEAL: PCI device 0000:0f:00.0 on NUMA socket 0\r\nEAL:   probe driver: 8086:953 spdk_nvme\r\nEAL: PCI device 0000:10:00.0 on NUMA socket 0\r\nEAL:   probe driver: 8086:953 spdk_nvme\r\nvbdev_crypto.c:1341:vbdev_crypto_claim: *NOTICE*: Match on Nvme0n1\r\nvbdev_crypto.c:1412:vbdev_crypto_claim: *NOTICE*: registered crypto_bdev for: Crypto_Nvme0n1\r\nvbdev_crypto.c:1341:vbdev_crypto_claim: *NOTICE*: Match on Nvme0n1\r\nbdev.c:3274:spdk_bdev_open: *ERROR*: Could not open Nvme0n1 - crypto module already claimed it\r\nvbdev_crypto.c:1402:vbdev_crypto_claim: *ERROR*: could not open bdev Nvme0n1\r\nvbdev_crypto.c:1480:vbdev_crypto_examine: *ERROR*: could not claim bdev\r\nconf.c: 293:spdk_nvmf_parse_subsystem: *ERROR*: Could not find namespace bdev 'Crypto_Nvme0n1'\r\n^CSegmentation fault (core dumped)\r\n```\r\n\r\nthe core dumped log as below:\r\n```\r\n[root@waikikibeach35 spdk]# gdb -c /tmp/core-reactor_0-11-0-0-15245-1538183853 ./app/nvmf_tgt/nvmf_tgt\r\nGNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-110.el7\r\nCopyright (C) 2013 Free Software Foundation, Inc.\r\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\nThis is free software: you are free to change and redistribute it.\r\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\r\nand \"show warranty\" for details.\r\nThis GDB was configured as \"x86_64-redhat-linux-gnu\".\r\nFor bug reporting instructions, please see:\r\n<http://www.gnu.org/software/gdb/bugs/>...\r\nReading symbols from /home/xuhuagen/spdk/app/nvmf_tgt/nvmf_tgt...done.\r\n\r\nwarning: core file may not match specified executable file.\r\n[New LWP 15245]\r\n[New LWP 15247]\r\n[New LWP 15246]\r\n[New LWP 15248]\r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/lib64/libthread_db.so.1\".\r\nCore was generated by `./app/nvmf_tgt/nvmf_tgt -c ../nvmf.conf'.\r\nProgram terminated with signal 11, Segmentation fault.\r\n#0  0x000000000045ef6a in spdk_bdev_unregister (bdev=0x28bb320, cb_fn=<optimized out>, cb_arg=<optimized out>) at bdev.c:3242\r\n3242            TAILQ_REMOVE(&g_bdev_mgr.bdevs, bdev, internal.link);\r\nMissing separate debuginfos, use: debuginfo-install glibc-2.17-222.el7.x86_64 libaio-0.3.109-13.el7.x86_64 libgcc-4.8.5-28.el7_5.1.x86_64 libibverbs-15-7.el7_5.x86_64 libnl3-3.2.28-4.el7.x86_64 librdmacm-15-7.el7_5.x86_64 libuuid-2.23.2-52.el7_5.1.x86_64 numactl-libs-2.0.9-7.el7.x86_64 openssl-libs-1.0.2k-12.el7.x86_64 zlib-1.2.7-17.el7.x86_64\r\n(gdb) bt\r\n#0  0x000000000045ef6a in spdk_bdev_unregister (bdev=0x28bb320, cb_fn=<optimized out>, cb_arg=<optimized out>) at bdev.c:3242\r\n#1  0x000000000043356d in vbdev_crypto_examine_hotremove_cb (ctx=0x28bb020) at vbdev_crypto.c:1293\r\n#2  0x0000000000455d52 in _spdk_event_queue_run_batch (reactor=0x277b340, reactor=0x277b340) at reactor.c:205\r\n#3  _spdk_reactor_run (arg=0x277b340) at reactor.c:502\r\n#4  0x000000000045635d in spdk_reactors_start () at reactor.c:677\r\n#5  0x0000000000454f71 in spdk_app_start (opts=opts@entry=0x7ffc8d037fb0, start_fn=start_fn@entry=0x407ba0 <nvmf_tgt_started>,\r\n    arg1=arg1@entry=0x0, arg2=arg2@entry=0x0) at app.c:648\r\n#6  0x0000000000406745 in main (argc=3, argv=0x7ffc8d038128) at nvmf_main.c:75\r\n```\r\n\r\n## Expected Behavior\r\nnvmf target can exit normally.\r\n\r\n## Current Behavior\r\nnvmf core dumped occur when start with incorrect config in nvmf.conf\r\n\r\n## Possible Solution\r\n\r\n## Steps to Reproduce\r\n1. add crypto option into nvmf target config file nvmf.conf\r\n2.  starting nvmf_tgt with nvmf.conf\r\n\r\n\r\n## Context (Environment including OS version, SPDK version, etc.)\r\nOS version: CentOS Linux release 7.5.1804 (Core)\r\nSPDK version: commit id ff852667f84e368c3bf51fb3579c0a1f87d141db\r\n"}}
{"actor":{"display_login":"xuhuagen"}}