All of lore.kernel.org
 help / color / mirror / Atom feed
* Memory leak in pSCSI backend?
@ 2018-10-29 22:03 Ben Klein
  2018-10-30 17:58 ` David Disseldorp
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Klein @ 2018-10-29 22:03 UTC (permalink / raw)
  To: target-devel

[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]

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.

[-- Attachment #2: targetcli.txt --]
[-- Type: text/plain, Size: 2527 bytes --]

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]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Memory leak in pSCSI backend?
  2018-10-29 22:03 Memory leak in pSCSI backend? Ben Klein
@ 2018-10-30 17:58 ` David Disseldorp
  0 siblings, 0 replies; 2+ messages in thread
From: David Disseldorp @ 2018-10-30 17:58 UTC (permalink / raw)
  To: target-devel

Hi Ben,

Thanks for the report.

On Tue, 30 Oct 2018 09:03:38 +1100, Ben Klein wrote:

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

Any chance you'd be able to rerun your reproducer with kmemleak logging
enabled? Details can be found at:
https://www.kernel.org/doc/Documentation/dev-tools/kmemleak.rst

Cheers, David

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-30 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-29 22:03 Memory leak in pSCSI backend? Ben Klein
2018-10-30 17:58 ` David Disseldorp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.