9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Martin Wyser <martin.wyser@inf.ethz.ch>
To: 9fans@cse.psu.edu
Subject: [9fans] ramfs, lib9p
Date: Tue, 27 Apr 2004 16:07:19 +0000	[thread overview]
Message-ID: <408e8452$1@pfaff2.ethz.ch> (raw)

Boys, and of course Girls too:

I noticed that there are two ramfs implementations:
/sys/src/cmd/ramfs.c    seems old, because does not use lib9p
/sys/src/lib9p/ramfs.c  seems newer, because does use lib9p

Unfortunately, both have bad bugs.  I would suggest dumping the old one, 
  and in that spirit started looking at the problems with the newer.

I did
cd /tmp
mkdir ramfs
8c /sys/src/lib9p/ramfs.c
8l -o ramfs ramfs.8
./ramfs -s ramfs
mount -c /srv/ramfs /tmp/ramfs
unmount /tmp/ramfs
mount -c /srv/ramfs /tmp/ramfs   #again
ls /tmp/ramfs   #crashes nicely

So I started looking through it, and it looks like the problems are in 
lib9p.  Where to send my findings?  Discuss them here?
(I checked with sources and found that I am up-to-date).

kind regards, Martin

With some -D and acid, I got the following information:
-----
<-5- Tversion tag 65535 msize 8216 version '9P2000'
-5-> Rversion tag 65535 msize 8216 version '9P2000'
<-5- Tauth tag 3 afid 211 uname mwyser aname
-5-> Rerror tag 3 ename ./ramfs: authentication not required
<-5- Tattach tag 3 fid 211 afid -1 uname mwyser aname
-5-> Rattach tag 3 qid (0000000000000000 0 d)
<-5- Tclunk tag 3 fid 211
-5-> Rclunk tag 3
<-5- Tauth tag 3 afid 208 uname mwyser aname
-5-> Rerror tag 3 ename ./ramfs: authentication not required
<-5- Tattach tag 3 fid 208 afid -1 uname mwyser aname
-5-> Rattach tag 3 qid (0000000000000000 0 d)
<-5- Twalk tag 3 fid 208 newfid 212 nwname 0
-5-> Rwalk tag 3 nwqid 0
<-5- Tstat tag 3 fid 212
-5-> Rstat tag 3  stat 'mwyser' '\x03' 'mwyser' 'mwyser' q 
(0000000000000000 0 d) m 020000000777 at 1083085032 mt 1083085032 l 0 t 
0 d 0
<-5- Tclunk tag 3 fid 212
-5-> Rclunk tag 3
panic: D2B called on non-block 18394 (double-free?) (magic 00000000)
ramfs 122: suicide: sys: trap: fault read addr=0x0 pc=0x00004b63

acid: stk()
abort()+0x0 /sys/src/libc/9sys/abort.c:6
ppanic(p=0x17d5c,fmt=0x17914)+0x152 /sys/src/libc/port/malloc.c:158
D2B(v=0x18394,p=0x17d5c)+0x38 /sys/src/libc/port/pool.c:944
poolfreel(v=0x18394,p=0x17d5c)+0x20 /sys/src/libc/port/pool.c:1065
poolfree(p=0x17d5c,v=0x18394)+0x41 /sys/src/libc/port/pool.c:1175
free(v=0x1839c)+0x23 /sys/src/libc/port/malloc.c:228
fsdestroyfile(f=0x18330)+0x29 /usr/mwyser/ramfs/ramfs.c:111
closefile(f=0x18330)+0x23 /sys/src/lib9p/file.c:75
closefid(f=0x1d808)+0x5f /sys/src/lib9p/fid.c:71
closereq(r=0x1d428)+0x77 /sys/src/lib9p/req.c:79
respond(error=0x0,r=0x1d428)+0x31f /sys/src/lib9p/srv.c:803
sclunk(srv=0x1306c,r=0x1d428)+0x51 /sys/src/lib9p/srv.c:548
srv(srv=0x1306c)+0x1be /sys/src/lib9p/srv.c:702
_post2(v=0x1306c)+0x4f /sys/src/lib9p/_post.c:41
postmountsrv(s=0x1306c,name=0x7fffeff6,mtpt=0x0,flag=0x4)+0x5e 
/sys/src/lib9p/post.c:19
main(argv=0x7fffefe0,argc=0x0)+0x105 /usr/mwyser/ramfs/ramfs.c:162
_main+0x31 /sys/src/libc/386/main9.s:16
acid:
------


             reply	other threads:[~2004-04-27 16:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-27 16:07 Martin Wyser [this message]
2004-04-27 16:18 ` Fco.J.Ballesteros
2004-04-27 16:32 ` rog
2004-04-27 18:18   ` Russ Cox
2004-04-28  9:33   ` Martin Wyser

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='408e8452$1@pfaff2.ethz.ch' \
    --to=martin.wyser@inf.ethz.ch \
    --cc=9fans@cse.psu.edu \
    /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).