Memory leak in pSCSI backend?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've been trying to get a DVD-ROM drive working over iSCSI. I'm using
targetcli on the target and iscsiadm/iscsi_discovery on the initiator.

Target is running 4.18.16 unpatched from kernel.org, with AMD64
Devuan/Debian stable userland. 10 year old Core 2 Duo CPU.

Initiator is running 4.18.15 unpatched from kernel.org with AMD64
Devuan/Debian unstable userland. Ryzen 7 CPU.

Using pSCSI backend on /dev/sr0 triggers a memory leak (or infinite
loop?) that consumes all 5GB of system RAM on the target in a matter
of seconds after attempting a read (I've been testing with "file -s")
on the initiator side. It doesn't go into swap memory.

I tested pSCSI and IBLOCK backends on a WD Green SSD, and found IBLOCK
works fine (I was able to run mkfs.ext4 from the initiator without any
memory leak on the target), but pSCSI still seems to trigger a memory
leak, albeit a lot slower than with the DVD-ROM. I suspect udev might
have something to do with this, as tries to read the volume label off
optical discs on insertion.

I have attached my targetcli output, and have configured my
target-side kernel for coredumping and debugging. If someone can talk
me through what to look for, I can poke around in the 5GB vmcore that
gets produced by kdump.

Please let me know if there's any other information I can provide.

Thanks,
Ben Klein

PS. I have now successfully set up tgtd in passthrough/sg mode, but
I'd still like to get to the bottom of why the in-kernel target is not
functioning for me. I'm also hoping the in-kernel target may be able
to handle encrypted DVD playback, as tgtd can't cope with them.
o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................. [Storage Objects: 0]
  | o- fileio ................................................................................................. [Storage Objects: 0]
  | o- pscsi .................................................................................................. [Storage Objects: 1]
  | | o- sr0 .................................................................................................. [/dev/sr0 activated]
  | o- ramdisk ................................................................................................ [Storage Objects: 0]
  o- iscsi ............................................................................................................ [Targets: 1]
  | o- iqn.2003-01.org.linux-iscsi.frankie.x8664:sn.7ff065e33228 ......................................................... [TPGs: 1]
  |   o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  |     o- acls .......................................................................................................... [ACLs: 1]
  |     | o- iqn.1993-08.org.debian:kubrik ........................................................................ [Mapped LUNs: 1]
  |     |   o- mapped_lun1 ................................................................................... [lun1 pscsi/sr0 (rw)]
  |     o- luns .......................................................................................................... [LUNs: 1]
  |     | o- lun1 ........................................................................................... [pscsi/sr0 (/dev/sr0)]
  |     o- portals .................................................................................................... [Portals: 1]
  |       o- 192.168.9.1:3260 ................................................................................................. [OK]
  o- loopback ......................................................................................................... [Targets: 0]
  o- vhost ............................................................................................................ [Targets: 0]

[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux