Processes dying?
T�rnqvist
Hello
I just started using the latest auto-snapshot.
I noticed weird behavior, that is, processes crash, so bad even C-c doesn't kill them. For some reason running strace behind them gives me C-c support.
Also pressing tab in bash seems to kill me.
lstat64("/var/cache/apt/srcpkgcache.bin", {st_mode=S_IFREG|0644, st_size=5193537, ...}) = 0open("/var/cache/apt/srcpkgcache.bin", O_RDWR|O_CREAT|O_TRUNC, 0666) = 6fcntl64(6, F_SETFD, FD_CLOEXEC) = 0fchmod(6, 0644) = 0
write(6, "\334v\376\230\4\0\0\0\1\0X!(\0008\0000\0\34\0\24\0\20\0"..., 5193537 <unfinished ...>
shrike:~# apt-get install bonnie++ E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? shrike:~# fuser /va
and it died
Then on another terminal:
shrike:/var/lib/dpkg# rm lock
and it stuck
mjt@shrike:~$ ls ls /var ls: ls: No such file or directory /var: backups cache games lib local lock log mail opt run spool tmp www mjt@shrike:~$ ls ls /var
The other one with tab, and it jammed.
mjt@shrike:~$ ps awx | grep D+ 3939 pts/11 D+ 0:00 -su 3953 pts/4 D+ 0:00 -su 3956 pts/7 D+ 0:00 -su 3973 pts/6 D+ 0:00 rm lock 4003 pts/0 R+ 0:00 grep D+
I'll try to improvise something, or maybe quit back to -love4.
Any ideas? How can this be debugged?
Thanks!
Signature · 1 line
mjt
T�rnqvist
Quoted 1 line · Markus Törnqvist
Hello
Here's another strace, for what it's worth...
mjt@shrike:~$ sudo strace apt-get install bonnie++ > foo 2>&1
execve("/usr/bin/apt-get", ["apt-get", "install", "bonnie++"], [/* 25 vars */]) = 0 uname({sys="Linux", node="shrike", ...}) = 0
brk(0) = 0x8066000old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=46307, ...}) = 0old_mmap(NULL, 46307, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3) = 0access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)open("/usr/lib/libapt-pkg-libc6.3-5.so.3.3", O_RDONLY) = 3read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \220\1"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=561600, ...}) = 0old_mmap(NULL, 565148, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40024000 old_mmap(0x400a2000, 49152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x7d000) = 0x400a2000
close(3) = 0access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)open("/usr/lib/libstdc++.so.5", O_RDONLY) = 3read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\262\3"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=734712, ...}) = 0old_mmap(NULL, 754336, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400ae000
old_mmap(0x4014c000, 90112, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9e000) = 0x4014c000
old_mmap(0x40162000, 17056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40162000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/libm.so.6", O_RDONLY) = 3read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0006\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=141312, ...}) = 0old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40167000 old_mmap(NULL, 139712, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40168000 old_mmap(0x4018a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x22000) = 0x4018a000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY) = 3read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\25\0\000"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=31548, ...}) = 0old_mmap(NULL, 30464, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4018b000 old_mmap(0x40192000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x7000) = 0x40192000
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) = 3read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340X\1"..., 512) = 512fstat64(3, {st_mode=S_IFREG|0644, st_size=1279044, ...}) = 0old_mmap(NULL, 1289356, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40193000old_mmap(0x402c3000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12f000) = 0x402c3000old_mmap(0x402cc000, 7308, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x402cc000
close(3) = 0old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x402ce000
set_thread_area({entry_number:-1 -> 6, base_addr:0x402ce080, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0x40018000, 46307) = 0 brk(0) = 0x8066000 brk(0x8087000) = 0x8087000
open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 stat64("/var/lib/apt/.", {st_mode=S_IFDIR|0755, st_size=3, ...}) = 0 stat64("/etc/apt/apt.conf.d/", {st_mode=S_IFDIR|0755, st_size=3, ...}) = 0 open("/etc/apt/apt.conf.d/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4 fstat64(4, {st_mode=S_IFDIR|0755, st_size=3, ...}) = 0fcntl64(4, F_SETFD, FD_CLOEXEC) = 0getdents64(4, /* 3 entries */, 65536) = 80stat64("/etc/apt/apt.conf.d/70debconf", {st_mode=S_IFREG|0644, st_size=182, ...}) = 0getdents64(4, /* 0 entries */, 65536) = 0
close(4) = 0open("/etc/apt/apt.conf.d/70debconf", O_RDONLY) = 4fstat64(4, {st_mode=S_IFREG|0644, st_size=182, ...}) = 0mmap2(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x402cf000 read(4, "// Pre-configure all packages wi"..., 65536) = 182
read(4, "", 65536) = 0 read(4, "", 65536) = 0 close(4) = 0 munmap(0x402cf000, 65536) = 0
stat64("/etc/apt/apt.conf", 0xbffff47c) = -1 ENOENT (No such file or directory) stat64("/var/lib/dpkg/status", {st_mode=S_IFREG|0644, st_size=763684, ...}) = 0 stat64("/usr/bin/dpkg", {st_mode=S_IFREG|0755, st_size=174040, ...}) = 0 stat64("/etc/debian_version", {st_mode=S_IFREG|0644, st_size=17, ...}) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbffff620) = -1 ENOSYS (Function not implemented) rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0rt_sigaction(SIGWINCH, {0x805d2d0, [WINCH], SA_RESTART}, {SIG_DFL}, 8) = 0ioctl(1, TIOCGWINSZ, 0xbffff6a0) = -1 ENOSYS (Function not implemented)
open("/var/lib/dpkg/lock", O_RDWR|O_CREAT|O_TRUNC, 0640 <unfinished ...>
Signature · 1 line
mjt
Quoted 6 lines · On Fri, 04 Jun 2004 23:39:25 +0300, [email protected] (Markus…
Hello
I just started using the latest auto-snapshot.
I noticed weird behavior, that is, processes crash, so bad even C-c doesn't kill them. For some reason running strace behind them gives me C-c support.
My guess is that some *other* process got wedged in the kernel while holding a kernel lock, causing other processes to block when they needed that lock.
Probably will need a SysRq-T output to figure out who's hung where...
T�rnqvist
Quoted 2 lines · On Fri, Jun 04, 2004 at 04:50:13PM -0400, [email protected] wrote:
My guess is that some *other* process got wedged in the kernel while holding a kernel lock, causing other processes to block when they needed that lock.
Hmm, mmmmaybe. I'll have to take your word for it, since you're the more experienced one :)
But here's the thing, it appears to be related to directories, mostly, maybe. When I press tab to expand names.
Quoted 1 line
Probably will need a SysRq-T output to figure out who's hung where...
Any ideas on how to ship the output somewhere for analysis? Some means of accessing the trace without sysrq?
This will be the first time I didn't go into X with this kernel, let's see if she boots without the reset button this time around ;)
Signature · 1 line
mjt
Quoted 14 lines · Markus Törnqvist
Quoted 2 lines · On Fri, Jun 04, 2004 at 04:50:13PM -0400, [email protected] wrote:
My guess is that some *other* process got wedged in the kernel while holding a kernel lock, causing other processes to block when they needed that lock.
Hmm, mmmmaybe. I'll have to take your word for it, since you're the more experienced one :)
But here's the thing, it appears to be related to directories, mostly, maybe. When I press tab to expand names.
Quoted 8 lines
Quoted 1 line
Probably will need a SysRq-T output to figure out who's hung where...
Any ideas on how to ship the output somewhere for analysis? Some means of accessing the trace without sysrq?
This will be the first time I didn't go into X with this kernel, let's see if she boots without the reset button this time around ;)
echo t >/proc/sysrq-trigger
Or did you mean something different?
HTH,
Carl-Daniel
Signature · 1 line
http://www.hailfinger.org/
Quoted 45 lines · Markus TXrnqvist
Hello
I just started using the latest auto-snapshot.
I noticed weird behavior, that is, processes crash, so bad even C-c doesn't kill them. For some reason running strace behind them gives me C-c support.
Also pressing tab in bash seems to kill me.
lstat64("/var/cache/apt/srcpkgcache.bin", {st_mode=S_IFREG|0644, st_size=5193537, ...})= 0open("/var/cache/apt/srcpkgcache.bin", O_RDWR|O_CREAT|O_TRUNC, 0666)= 6fcntl64(6, F_SETFD, FD_CLOEXEC)= 0fchmod(6, 0644)= 0
write(6, "\334v\376\230\4\0\0\0\1\0X!(\0008\0000\0\34\0\24\0\20\0"..., 5193537 <unfinished ...>shrike:~# apt-get install bonnie++ E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? shrike:~# fuser /vaand it died
Then on another terminal:
shrike:/var/lib/dpkg# rm lockand it stuck
mjt@shrike:~$ ls ls /var ls: ls: No such file or directory /var: backups cache games lib local lock log mail opt run spool tmp www mjt@shrike:~$ ls ls /varThe other one with tab, and it jammed.
mjt@shrike:~$ ps awx | grep D+ 3939 pts/11 D+ 0:00 -su 3953 pts/4 D+ 0:00 -su 3956 pts/7 D+ 0:00 -su 3973 pts/6 D+ 0:00 rm lock 4003 pts/0 R+ 0:00 grep D+
Quoted 3 lines
I'll try to improvise something, or maybe quit back to -love4.
Any ideas? How can this be debugged?
Almost any time you've got procs in the D state, a sysrq-t is needed to figure out where they are stuck in the kernel.
-chris
T�rnqvist
Quoted 3 lines · Carl-Daniel Hailfinger
echo t >/proc/sysrq-trigger
Or did you mean something different?
Thanks!
However, it never commited to the disk. I must come up with some way.
The syslog is corrupted as is always the case with reset-button boots, but I took a copy of the syslog file which vanished into thin air.
So I must really come up with a way to save it. Sure as hell ain't gonna write it by hand :)
Any way of forcing a journal commit?
Signature · 1 line
mjt
Quoted 2 lines · On Sat, 05 Jun 2004 00:23:12 +0300, Markus =?UNKNOWN?Q?T=F6rnqvist?= said:
The syslog is corrupted as is always the case with reset-button boots, but I took a copy of the syslog file which vanished into thin air.
echo t > /proc/sysrq-trigger (to produce a traceback)
echo s > /prog/sysrq-trigger (to sync the disks)
Of course, if your syslogd is one of the processes wedged up, you won't get much....
T�rnqvist
(*sigh* maybe this time the mail will come through, without a file-k attachment ;)
Quoted 2 lines · On Fri, Jun 04, 2004 at 05:33:18PM -0400, [email protected] wrote:
Of course, if your syslogd is one of the processes wedged up, you won't get much....
I did not.
However, I got something.
It is at the url
http://mjt.nysv.org/reiser/2004-06-04_trace.bz2
The mystical data is at 01:10:58 and 01:15:31.
Anyway, I recognize just about tty_read, sys_read, vfs_read and make_space_tail from there. If there is some document which I could read to learn these things without having to learn the ancient art of kernel-coding, I would appreciate a url :)
Hope this helps, and thanks!
Signature · 1 line
mjt
Quoted 1 line · Markus Törnqvist
I just started using the latest auto-snapshot.
For what it's worth, my machine was running all weekend long and when I logged in this morning I found several Dead processes too.
I had to reboot to get rid of them. As far as I remember, most of them were mount or umount processes (used by my backup script).
My machine runs 2.6.6-mm2 with the reiser4-2004.05.31-19.36-linux-2.6.6-mm2 and 'forward.h' patches.
Any ideas?
Ray