Project

General

Profile

Bug #962

WebDAV upload-> mmap failed: operation not permitted

Added by Anonymous over 10 years ago. Updated over 1 year ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_webdav
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:

Description

I have done this successfully on other servers with .13 so .. ???
For small files it's fine, but for larger than about 70KB it has the following behavior.

- It transfers the file into /var/tmp as several blocks, until the whole file is uploaded from the web browser.
- It creates the target file into the correct folder, with a 0 byte size.
- The following error appears in the error.log:


(mod_webdav.c.1715) mmap failed:  Operation not permitted /var/tmp/lighttpd-upload-wuZTa0 10

My configure flags


./configure --host=i686-linux --build=i686-linux --prefix=/usr --mandir=/share/man --infodir=/share/info --sysconfdir=/etc/lighttpd --libdir=/usr/lib/lighttpd --with-webdav-locks --with-webdav-props --with-openssl --with-lua

Some configuration items of consequence


webdav.sqlite-db-name = "/etc/lighttpd/davdb/db" 
webdav.activate = "enable" 
lighttpd.zip (107 KB) lighttpd.zip Strace that was run during a reproduction of this upload failure -- anonymouse Anonymous, 2007-01-04 11:16

Associated revisions

Revision 3b6fd58f (diff)
Added by gstrauss over 1 year ago

[mod_webdav] lseek,read if fs can not mmap (#2666, fixes #962)

For uploaded files or other request body, fall back to
lseek(),read() if filesystem does not support mmap()

(mmap(), if supported, is utilized regardless of --enable-mmap
since request body is either in memory or stored in temporary
files controlled by lighttpd)

x-ref:
"WebDAV upload-> mmap failed: operation not permitted"
https://redmine.lighttpd.net/issues/962
"handle filesystems without mmap() support"
https://redmine.lighttpd.net/issues/2666

github: closes #55

History

#1 Updated by Anonymous over 10 years ago

This host is a virtuozzo virtual machine. /tmp and /var/tmp are virtualized in some unusual way where all virtual machines share one big drive but only see the files owned by them. For example if I do a 'df' it shows 141 gigabytes used on /var/tmp, but there are no files or dirs visible in there to me (a 'du' says '1').

One other interesting detail is that uploads from form POSTs work just fine. It is only webdav that encounters this issue.

When I changed my server.upload-dirs to be a path that was NOT on this weird shared tmp space, the issue goes away and webdav uploads work.

So personally, I no longer "care" about this issue.. but Darix says keep it open for now =)

#2 Updated by Anonymous over 10 years ago

I found the 'mmap' problem with lighttpd when I had to modify CIFS mount parameter, adding 'forcedirectio'. That mount parameter was necesary due to a random problem when writing into CIFS mounts. My CIFS mount is ~ 2TB and is used to store huge ISOs. Rsync / cp was used to transfer those ISOs. Some of them were corrupted.

#3 Updated by gstrauss over 1 year ago

  • Description updated (diff)
  • Status changed from New to Patch Pending
  • Assignee deleted (jan)
  • Target version set to 1.4.40

#4 Updated by gstrauss over 1 year ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Also available in: Atom