tgtadm/tgtd management issue: buffer size truncated sometimes

Artyom Pervukhin <[email protected]>
Newsgroups org.kernel.vger.stgt
Message-ID <[email protected]>
Hi,

I cannot find any information regarding practical limits on amount of iSCSI targets supported by tgtd. Trying to use tgtd with many targets (hundreds of, say 400-500), I've experienced some issues in its management interface (tgtadm <-> tgtd).

Each target has only one disk attached, the greater target count is, the higher probability of experiencing the bug. Sometimes command showing all targets returns incomplete output, as if it was randomly stripped.

# tgtadm -C 0 --op show --mode target | grep -c ^Target                                                                                                   
301
# tgtadm -C 0 --op show --mode target | grep -c ^Target                                                                                                   
300

# tgtadm -C 0 --op show --mode target | wc -c                                                                                                             
317914
# tgtadm -C 0 --op show --mode target | wc -c                                                                                                             
316690
# tgtadm -C 0 --op show --mode target | wc -c                                                                                                             
317914
# tgtadm -C 0 --op show --mode target | wc -c                                                                                                             
310695

The closest description to this bug I've managed to find is this thread: http://lists.wpkg.org/pipermail/stgt/2012-July/005324.html (op had the same symptoms).

I was able to reproduce this bug on tgt 1.0.4 (Debian Squeeze), 1.0.17 (Debian Wheezy), 1.0.43 (latest so far). Tested on linux kernels 2.6.32, 3.2.0 (both amd64).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.