Re: segfault when stopping the target

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

 



FUJITA Tomonori schrieb:
On Tue, 21 Oct 2008 14:15:57 +0200
Tomasz Chmielewski <mangoo@xxxxxxxx> wrote:

FUJITA Tomonori schrieb:

# tgtadm --op delete --mode conn --tid 2 --sid 2 --cid 0
Segmentation fault

If a segfault does not happen immediately, start all these commands again (or, generally, "tgtadm --op delete --mode conn --tid 2 --sid 1 --cid 0" is enough).

For me, on x86, segfault happens in 90% of cases. Sometimes, the connection is eventually deleted.
I tried the above commands three times on x86 but I can't reproduce
this problem.
It is easier when there is some traffic to the target.


Can you use gdb to find where tgtadm crashes?
Sure.
Here is strace output, but it doesn't say much, does it? I'll try to get more data with gdb.

execve("/usr/sbin/tgtadm", ["tgtadm", "--op", "delete", "--mode", "conn", "--tid", "1", "--sid", "1", "--cid", "0"], [/* 20 vars */]) = 0
uname({sys="Linux", node="megathecus", ...}) = 0
brk(0)                                  = 0x804d000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x6feee000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=16095, ...}) = 0
mmap2(NULL, 16095, PROT_READ, MAP_PRIVATE, 3, 0) = 0x6feea000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240O\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1245488, ...}) = 0
mmap2(NULL, 1251484, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x6fdb8000
mmap2(0x6fee0000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x128) = 0x6fee0000
mmap2(0x6fee7000, 10396, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x6fee7000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x6fdb7000
mprotect(0x6fee0000, 20480, PROT_READ)  = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0x6fdb78e0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0,useable:1}) = 0
munmap(0x6feea000, 16095)               = 0
brk(0)                                  = 0x804d000
brk(0x8070000)                          = 0x8070000
socket(PF_FILE, SOCK_STREAM, 0)         = 3
connect(3, {sa_family=AF_FILE, path=@TGT_IPC_ABSTRACT_NAMESPACE}, 110) = 0
write(3, "\4\0\0\0\1\0\0\0iscsi\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 116) = 116
read(3, "", 8)                          = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 5131 detached

This helps?

At least it does not crash any more ;)
But it loops endlessly.


execve("/usr/sbin/tgtadm", ["tgtadm", "--op", "delete", "--mode", "conn", "--tid", "1", "--sid", "1", "--cid", "0"], [/* 20 vars */]) = 0
uname({sys="Linux", node="megathecus", ...}) = 0
brk(0)                                  = 0x804d000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x6ffb7000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=16095, ...}) = 0
mmap2(NULL, 16095, PROT_READ, MAP_PRIVATE, 3, 0) = 0x6ffb3000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240O\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1245488, ...}) = 0
mmap2(NULL, 1251484, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x6fe81000
mmap2(0x6ffa9000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x128) = 0x6ffa9000
mmap2(0x6ffb0000, 10396, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x6ffb0000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x6fe80000
mprotect(0x6ffa9000, 20480, PROT_READ)  = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0x6fe808e0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0,
useable:1}) = 0
munmap(0x6ffb3000, 16095)               = 0
brk(0)                                  = 0x804d000
brk(0x8070000)                          = 0x8070000
socket(PF_FILE, SOCK_STREAM, 0)         = 3
connect(3, {sa_family=AF_FILE, path=@TGT_IPC_ABSTRACT_NAMESPACE}, 110) = 0
write(3, "\4\0\0\0\1\0\0\0iscsi\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 116) = 116
recv(3, "", 8, MSG_WAITALL)             = 0
recv(3, "", 8, MSG_WAITALL)             = 0
recv(3, "", 8, MSG_WAITALL)             = 0
recv(3, "", 8, MSG_WAITALL)             = 0
recv(3, "", 8, MSG_WAITALL)             = 0
recv(3, "", 8, MSG_WAITALL)             = 0
recv(3, "", 8, MSG_WAITALL)             = 0
recv(3, "", 8, MSG_WAITALL)             = 0
recv(3, "", 8, MSG_WAITALL)             = 0
recv(3, "", 8, MSG_WAITALL)             = 0
recv(3, "", 8, MSG_WAITALL)             = 0
recv(3, "", 8, MSG_WAITALL)             = 0
(...)


And it repeats "recv(3, "", 8, MSG_WAITALL)             = 0" all the time.


--
Tomasz Chmielewski
http://wpkg.org
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux