On Thu, Mar 01, 2018 at 04:43:33PM +0000, Patrick Welche wrote:
> On Fri, Feb 16, 2018 at 10:29:59AM +0000, Patrick Welche wrote:
> > When running the attached script on NetBSD-current/amd64, I observe
> > 
> > ...
> > fetch_url: `http://127.0.0.1/webserver.html' proxyenv `<null>'
> > ...
> > fetch_url: savefile `out'
> > ...
> > getresponseline: received `Content-Type: text/html'
> > getresponseline: received `Content-Length: 92'
> > negotiate_connection: parsed len as: 92
> > getresponseline: received `Connection: close'
> >   0% |                                   |     0        0.00 KiB/s    --:-- 
> > ETA
> > ...
> > 
> > and I'm left with a zero byte "out" file.
> 
> export 
> RUMPHIJACK=path=/rump,blanket=/dk:/mnt/rump,socket=all:nolocal,sysctl=yes
> export LD_PRELOAD=/usr/lib/librumphijack.so
> /usr/libexec/httpd -P httpd.pid -i ${ip} -b -s /mnt/rump &
> 
> src/libexec/httpd/bozohttpd.c
>    837          addr = mmap(0, mappedsz, PROT_READ, MAP_SHARED, fd, 
> mappedoffset);
>    838          if (addr == (char *)-1) {
>    839                  bozowarn(httpd, "mmap failed: %s", strerror(errno));
>    840                  return -1;
>    841          }
> 
> seems to be the issue - the file is in /mnt/rump which appears in blanket=...

Right - and rump copes with mmap's MAP_ANON but not MAP_SHARED.

Part 2 of the mystery: why don't the atf tests fail? Answer: the
file served by the http server is just stored on the host filesystem,
not inside a filesystem mounted inside rump.

Cheers,

Patrick

Reply via email to