9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Nick Owens <mischief@9.offblast.org>
To: 9front@9front.org
Subject: prep divide by zero and kernel panic in devfs
Date: Thu, 20 Mar 2014 23:50:58 -0700	[thread overview]
Message-ID: <20140321065058.GB3145@iota.offblast.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2705 bytes --]

at the recommendation of folks in #cat-v, i started trying to install
9front into a sparse disk image.

this is how far i got, until i encountered a divide by zero in disk/prep
and subsequently a kernel panic in devfs. the following is on 386.
similar behavior appears on amd64.

; ramfs
; cd /tmp
; disk=`{pwd}^/9front.img
; 
; # 5gb sparse disk
; dd -if /dev/zero -of $disk -bs 1048576 -oseek 5120 -count 1
1+0 records in
1+0 records out
; 
; # mbr
; disk/mbr -m /386/mbr $disk
; 
; # partdisk
; disk/fdisk -baw $disk
adding part failed: plan9: fd out of range or not open
?warning: partitions could not be updated in devsd
; 
; # prepdisk
; bind -b '#k' /dev
; {
	echo disk 9front 512 $disk
	disk/fdisk -p $disk
	echo disk 9front 512 /dev/9front/plan9
	disk/prep -bw -a^(9fat nvram fs) /dev/9front/plan9
	} > /dev/fs/ctl
prep 622: suicide: sys: trap: divide error pc=0x000053db
; ls -l /dev/9front/plan9
--rw-rw-r-- k 0 mischief mischief 5362850304 Mar 20 23:18 /dev/9front/plan9
; sprunge /dev/text

now, if you repeat the commands in { } above:

; ktrace /386/9pccpuf f0108643 f4febb48 <<EOF
  estackx f4febe70
  f4febae8=f01083d8 f4febb08=f0100600 f4febb30=f0108643 f4febb38=f016621b
  f4febb44=f0108643 f4febb48=f01083dc f4febb50=f01667a8 f4febb6c=f0225d0a
  f4febb8c=f0189b37 f4febb98=f01886e1 f4febbb8=f0174d8d f4febbd4=f02357c5
  f4febc40=f02256fa f4febc44=f0225710 f4febc4c=f0225854 f4febc60=f0225d0a
  f4febc68=f02191c3 f4febc78=f020ec88 f4febc80=f017544b f4febc88=f017505d
  f4febc90=f017544b f4febc94=f017544b f4febcac=f0108825 f4febccc=f021a9f1
  f4febcd8=f0189aed f4febce0=f0189b37 f4febd1c=f0177350 f4febd28=f0225710
  f4febd30=f0225854 f4febd38=f020de1e f4febd44=f0225d0a f4febd4c=f021fe3b
  f4febd5c=f0221420 f4febd64=f02214a7 f4febd7c=f02140c6 f4febd98=f02215a4
  f4febdb0=f0107b32 f4febdcc=f0108ae7 f4febddc=f0225d0a f4febde0=f0216f02
  f4febde4=f0218701 f4febdec=f0218721 f4febdf4=f0217142 f4febe1c=f0100600
  f4febe54=00000040 f4febe58=f01007b0 f4febe5c=0000e19e f4febe60=00000023
  f4febe64=00000282 f4febe68=dfffeca0 f4febe6c=0000001b
  EOF
src(0xf0108643); // dumpstack+0x10
src(0xf01667a8); // panic+0xd2
src(0xf020ec88); // cclose+0x3f
src(0xf017544b); // mconfig+0x6a3
src(0xf0177350); // mwrite+0x74
src(0xf02214a7); // write+0x18c
src(0xf02215a4); // syspwrite+0x52
src(0xf0108ae7); // syscall+0x1dc
src(0xf0100600); // forkret
//passing interrupt frame; last pc found at sp=0xf4febe1c
; 

obviously prep and the kernel should not do this, but am i using the
commands right to create a sparse disk image? i didnt test it, but maybe
the fact that the disk image is sparse is what breaks prep and devfs.


[-- Attachment #2: Type: application/pgp-signature, Size: 834 bytes --]

             reply	other threads:[~2014-03-21  6:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21  6:50 Nick Owens [this message]
2014-03-21 17:37 ` [9front] " cinap_lenrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140321065058.GB3145@iota.offblast.org \
    --to=mischief@9.offblast.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).