On Tue, Mar 12, 2002 at 12:30:16AM -0800, Terry Lambert wrote:
| Mike Makonnen wrote:
| > It seems to me that you are showing only the last part of the trace,
| > which shows where a second panic occurred. While that may also be an
| > issue the real reason for the panic occurred earlier. Please post the
| > complete trace.
(after a core-dump of Python due to "bus error"). I can't seem
to get the core-dump off the box or I'd try to post it.
dev=MFS2, bno =132, bsize=16384, size=16384, fs=/tmp
panic: ffs_blkfree: bad size
Debugger("panic")
db> trace
panic
fss_blkfree
fss_indirtrunc
fss_truncate
ufs_setattr
ufs_vnoperate
coredump
sigexit
postsig
syscall2
Xint0x80_syscall
I hope this is better. Basically, I'm running a python
program that reads in fdisk information, and writes it
out. Attached is the python code... it works a few times,
but then eventually crashes. However, the general crashing
problem doesn't seem to be dependent on Python.
Best,
Clark
import os, tempfile
class disk:
def __init__(self,idx,typ='ad'):
self.idx = idx; self.typ = typ
(sin,sout,serr) = os.popen3("fdisk -s /dev/%s%d " % (typ,idx))
if not(serr.readline()):
self.valid = 1
(x,cyl,y,hd,z,sec,q) = sout.readline().split()
self.siz = int(cyl)*int(hd)*int(sec)
sout.readline()
self.blank = not(sout.readline())
else:
self.valid = 0
def __repr__(self):
if self.valid:
return repr((self.typ,self.idx,self.blank,self.siz))
return ''
def partition(self):
fn = tempfile.mktemp()
f = open(fn,'w')
f.write("p 1 165 0 %s\n" % self.siz)
f.write("p 2 0 0 0\np 3 0 0 0\np 4 0 0 0\n")
f.close()
os.system("fdisk -f %s /dev/%s%d" % (fn,self.typ,self.idx))
os.remove(fn)
print disk(0)
print disk(1)
print disk(2)
print disk(3)
print disk(4)
print disk(5)
print disk(6)
print disk(7)
print disk(8)
disk(2).partition()