LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 11-01-2006, 07:52 AM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
Tar -tvf command causes system hang


Hi there --

I have Fedora Core 5 installed on a system, and whenever I run the tar -tvf command on a locally attached tape drive, the system hangs. I am then forced to reboot the server. The problem does not occur when I run tar -cvf or tar -xvf.

The operating system was upgraded from Fedora Core 4 to 5 and is also hardened by Bastille Linux. The version of tar is 1.15.1. Has anyone seen this problem before? Thanks.
 
Old 11-01-2006, 11:24 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Hmm - shooting in the dark here, but doensn't tar tvf require some readable local diskspace somewhere to place temporary files...??

I once ran into something similar on and old SCO/Unix system and it turned out the partition where its /var folder was located was full.

Couldn't it also be that -tvf maybe tried to send too many write requests, interspersed with read requests to the drive? Maybe some IO queue gets choked up with unproccessed commands - how this halts the entire system though is beyond me. Sure you don't have flaky drive or hardware that is starting to go bad?
 
Old 11-01-2006, 01:24 PM   #3
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Original Poster
Rep: Reputation: 39
Hi there --

I did a check of the / filesystem and there is almost six gigabytes of diskspace available. If I were to specify a different location for the temporary files, how would I go about doing that?

As far as the tape drive is concerned, it is a known good one that came from a system that is no longer being used. The drive itself is connected to an Adaptec 2930 SCSI card. The card itself came from an unopened box, and when the system was powered up after the installation of the card, the tape drive was found and written to without difficulty.
 
Old 11-04-2006, 12:27 AM   #4
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Unhappy

Quote:
Originally Posted by kaplan71
Hi there --

I did a check of the / filesystem and there is almost six gigabytes of diskspace available. If I were to specify a different location for the temporary files, how would I go about doing that?
I'm not sure - as far as I'm aware you can only move folders across partitions when installing... I usually (instead of following classic Linux / Unix conventions) place all the system folders (var,tmp,boot,etc,usr) on the same partition. If you're not going to reinstall just to fix this problem, disregard the above.

Quote:
As far as the tape drive is concerned, it is a known good one that came from a system that is no longer being used. The drive itself is connected to an Adaptec 2930 SCSI card. The card itself came from an unopened box, and when the system was powered up after the installation of the card, the tape drive was found and written to without difficulty.
Hmm - ok. Do you know if it uses DMA on your board? Something else that I encountered once that was similar was when I was trying to write CD's on my 2.6.9 kernelled FC3 system, and the stock FC3 2.6.9 kernel did not have support for my GA8-TRS350MT motherboard. So the stuff K3B uses to write was so incredibly slow that and my whole system got so slow that it sometimes felt as if it had hanged. Try typing

/sbin/hdparm -i /dev/hdc

which will give you a display like

model=HL-DT-STDVD-ROM GDR8164B, FwRev=0L06, SerialNo=
Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=0kB, MaxMultSect=0
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 *udma2
AdvancedPM=no
Drive conforms to: ATA/ATAPI-6 T13 1410D revision 3a:

* signifies the current active mode

which is for my DVD ROM drive. See that it is set to UDMA2? You'll of course just need to set /hdc to whatever /dev nodename your SCSI tapedrive uses.

Of course, the above still doesn't explain why only -tvf fails. If you do have DMA problems, xvf and cvf would also "hang". Guess you need someone more knowledgable about tar to troubleshoot this further...
 
Old 11-10-2006, 07:46 AM   #5
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Original Poster
Rep: Reputation: 39
I ran an strace tar tvf /dev/rst0 command and the results were the following:

execve("/usr/local/bin/tar", ["tar", "tvf", "/dev/rst0"], [/* 24 vars */]) = 0
brk(0) = 0x94e4000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f9e000
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=84146, ...}) = 0
mmap2(NULL, 84146, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f89000
close(3) = 0
open("/lib/librt.so.1", 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\260\214"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=39748, ...}) = 0
mmap2(0x747000, 29260, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x747000
mmap2(0x74d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5) = 0x74d000
close(3) = 0
open("/lib/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\ni\21\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1528292, ...}) = 0
mmap2(0x101000, 1254780, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x101000
mmap2(0x22d000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12b) = 0x22d000
mmap2(0x231000, 9596, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x231000
close(3) = 0
open("/lib/libpthread.so.0", 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\0p\32\336"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=112236, ...}) = 0
mmap2(0xddd000, 78268, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xddd000
mmap2(0xded000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf) = 0xded000
mmap2(0xdef000, 4540, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xdef000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f88000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7f88aa0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xded000, 4096, PROT_READ) = 0
mprotect(0x22d000, 12288, PROT_READ) = 0
mprotect(0x74d000, 4096, PROT_READ) = 0
mprotect(0x474000, 4096, PROT_READ) = 0
munmap(0xb7f89000, 84146) = 0
set_tid_address(0xb7f88ae8) = 2959
rt_sigaction(SIGRTMIN, {0xde1686, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xde15c0, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbfb9c410, 31, (nil), 0}) = 0
clock_gettime(CLOCK_REALTIME, {1163165495, 880127000}) = 0
brk(0) = 0x94e4000
brk(0x9505000) = 0x9505000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=54088144, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7d88000
close(3) = 0
fcntl64(0, F_GETFD) = 0
fcntl64(1, F_GETFD) = 0
fcntl64(2, F_GETFD) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
close(1023) = -1 EBADF (Bad file descriptor)
close(1022) = -1 EBADF (Bad file descriptor)
close(1021) = -1 EBADF (Bad file descriptor)
close(1020) = -1 EBADF (Bad file descriptor)
close(1019) = -1 EBADF (Bad file descriptor)
close(1018) = -1 EBADF (Bad file descriptor)
.....
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
open("/dev/rst0", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2528, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f9d000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2528
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7f9d000, 4096) = 0
open("/usr/local/share/locale/en_US.UTF-8/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/share/locale/en_US.utf8/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/share/locale/en_US/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/share/locale/en.UTF-8/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/share/locale/en.utf8/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/share/locale/en/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "tar: ", 5) = 5
write(2, "/dev/rst0: Cannot open", 22) = 22
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ": No such file or directory", 27) = 27
write(2, "\n", 1) = 1
write(2, "tar: ", 5) = 5
write(2, "Error is not recoverable: exitin"..., 37) = 37
write(2, "\n", 1) = 1
exit_group(2)

Anyone has thoughts on this?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
system hang up a_red Linux - Laptop and Netbook 1 10-29-2006 02:40 AM
My System gets hang... khattaking Linux - General 9 05-24-2006 09:21 AM
system hang ust Linux - General 2 03-05-2004 09:15 AM
Hang up the System! hampel Linux - General 2 07-24-2003 05:57 AM
System Hang BxBoy Linux - General 3 05-09-2003 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration