Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Nov 2002 01:44:05 +0100
From:      Ronald Paul <bulk@rcpaul.xs4all.nl>
To:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   mount_smbfs, sendfile(2) and Apache
Message-ID:  <109311194874.20021110014405@xs4all.nl>

next in thread | raw e-mail | index | archive | help
Hello,

I've got a problem with either one of these three. I've mounted some
Windows shares with mount_smbfs. Everyting seems ok, I can read and
write from and to the remote files, also the big ones. I've aliased
some of those remote directory's in Apache, and I also can browse the
files via HTTP.

But, and here's the problem, when I try to get a bigger file (100-200
kB or something like that, but sometimes also when the size exceeds
255 bytes), the connection closes after the HTTP-resonse-headers are
send. I'm not sure this is a Apache or FreeBSD issue, but for me it
seems FreeBSD, so I'm asking here first.

I've lowered Apache's LogLevel to info and noticed entry's of this
sort in the error-log:

> [Sat Nov 09 16:44:56 2002] [info] (45)Operation not supported: core_output_filter: writing data to the network

Along some broken pipe's, but those occur all the time and not seem to
be related to this.

An fragment from truss(1) on a Apache child handeling one of these
'bigger files':

> read(0xe,0x8218028,0x1f40)                     = 252 (0xfc)
> gettimeofday(0xbfbff828,0x0)                   = 0 (0x0)
> gettimeofday(0xbfbff848,0x0)                   = 0 (0x0)
> stat("/remote/pws.data/some/file",0xbfbff6b0) = 0 (0x0)
> open("/remote/pws.data/some/file",0x0,00) = 15 (0xf)
> sendfile(0xf,0xe,0x0,0x0,0x585c8,0xbfbff3a0,0xbfbff398,0x0) ERR#45 'Operation not supported'
> gettimeofday(0xbfbfd304,0x0)                   = 0 (0x0)
> write(10,0xbfbfd3b0,111)                       = 111 (0x6f)
> read(0xe,0x8218028,0x1f40)                     ERR#35 'Resource temporarily unavailable'
> getrusage(0x0,0xbfbff828)                      = 0 (0x0)
> getrusage(0xffffffff,0xbfbff828)               = 0 (0x0)

So I tried to disable sendfile for those files with Apache's
EnableSendfile set to off, but Apache was complaining this directive
did not exists. Upgrading to Apache 2.0.43 did not make any
difference.

I also tried to disable EnableMMAP, substitute the alias with a
mount_null, reconnect the shares an play with my MTU-settings on
Windows, but none had an positive effect on this problem.

I also noticed this:

> Nov  9 13:45:51 rcpaul /kernel: smb_maperror: Unmapped error 1:158
> Nov  9 13:46:19 rcpaul last message repeated 16 times

in /var/log/messages, but I can't reproduce these errors.

I'm running 4.7-RELEASE, but I had the same problems with 4.6. The
shares are from Windows 98 and Windows 2000. Does anyone knows how I
can let Apache serve those big files or what the status is of
EnableSendfile?

Thanks!

-- 
Greetings,
Ronald


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?109311194874.20021110014405>