Project

General

Profile

Bug #759

closed

mmap fails on NSLU2 with offset >= 512k

Added by Anonymous over 14 years ago. Updated over 12 years ago.

Status:
Invalid
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:

Description

I am using lighttpd 1.4.11 w/ php 5.1.4 and fcgi on a Linksys NSLU2 running Unslung 6.8. Whenever a file is downloaded from my webserver, it will fail every time at exactly 512k. There are 4-5 others posting this same issue on the forum, apparently the error also occurs posting files larger than 512k. I am certain this worked on my site before upgrading to php 5.1.4 (as well as the fcgi module) but I don't know that the error is definitely tied to that upgrade because I changed other stuff too. (But not the lighttpd ver.)

From the webserver access log:
"GET /filename HTTP/1.1" 200 132640 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"

And the error log will simultaneously post:
(network_writev.c.248) mmap failed: Invalid argument /full/path/to//filename 7
(connections.c.538) connection closed: write failed on fd 6

Let me know of any additional information I can provide to assist.

Thanks,
Phil

-- pakenagy


Files

lighttpd_strace (21.4 KB) lighttpd_strace strace file -- xummxxu Anonymous, 2006-07-20 15:26
#1

Updated by jan over 14 years ago

  • Status changed from New to Assigned

Can you attach a strace (see the wiki for how to report a bug) to this bug-report ?

Does using

server.network-backend = "write"

workaround the problem ?

#2

Updated by Anonymous over 14 years ago

Yes the:
server.network-backend = "write"
does workaround the issue, thank you!

I found the section in the wiki and installed the strace package but it errors out, I will work on that.

strace -olighttpd.trace -tt -s 4000 lighttpd -D -f ./lighttpd.conf
syscall: unknown syscall trap 0x0001a22c

-- pakenagy

#3

Updated by Anonymous over 14 years ago

I just add a strace file. Hope it's helpful.

-- xummxxu

#4

Updated by Anonymous over 14 years ago

Replying to :

I am using lighttpd 1.4.11 w/ php 5.1.4 and fcgi on a Linksys NSLU2 running Unslung 6.8. Whenever a file is downloaded from my webserver, it will fail every time at exactly 512k. There are 4-5 others posting this same issue on the forum, apparently the error also occurs posting files larger than 512k. I am certain this worked on my site before upgrading to php 5.1.4 (as well as the fcgi module) but I don't know that the error is definitely tied to that upgrade because I changed other stuff too. (But not the lighttpd ver.)

From the webserver access log:
"GET /filename HTTP/1.1" 200 132640 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"

And the error log will simultaneously post:
(network_writev.c.248) mmap failed: Invalid argument /full/path/to//filename 7
(connections.c.538) connection closed: write failed on fd 6

Let me know of any additional information I can provide to assist.

Thanks,
Phil

The same here (see my bug #805). Since I don't have php running, this surely doesn't cause the bug.

Stefan

#5

Updated by Anonymous over 14 years ago

Anonymous posting is BAD! please disable it!!!

#6

Updated by Anonymous about 14 years ago

Hi there,
Same issue with lighttpd/1.4.13. All my files are my digital pictures around 1.5MB each, I only retrieve them to 1/3 in browser (firefox, IE or whatever).
I find it a rather major issue for that nice WebDAV enabled server.

How can I help ?
Christophe

-- xtof - at - free dot fr

#7

Updated by Anonymous over 13 years ago

I'm getting this bug on version 1.4.16 on an NSLU2.

I'm surprised it's not being taken more seriously.

#8

Updated by darix over 13 years ago

and you are sure you havent used sendfile as backend instead of write, as suggested in the first answer from jan? we cant do anything about broken sendfile implementations in your libc/filesystem/kernel.

try: server.network-backend = "write"

#9

Updated by Anonymous almost 13 years ago

I have the same problem on 1.4.18

-- maurice.enciel

#10

Updated by stbuehler almost 13 years ago

An strace from 2006 with "2000-01-03 23:20:04 ..." ? wtf ;-)

I think some more information would be good:
- Is this only a problem with NSLU2? Nothing else was reported, so i assume "yes" ;-)
- The strace indicates that the mmap fails with offset=524288 (512kb) - and it fails in the libc and not in the kernel, as the syscalls didn't fail.

Perhaps someone can verify this problem with trying an mmap on NSLU2 with that offset on a normal file (it should be big enough of course).
So i think it is a broken mmap implementation, and the workaround is to use server.network-backend = "write" (or perhaps a "*-sendfile" backend if it works with unix-sockets)
Perhaps there should be a "fallback"; i.e. if mmap doesn't work just read() the data, but i won't code this for 1.4.x (but i think about it for 1.5)

So please, do not just say "same issue here" but give a little bit more information.

As I cannot reproduce this problem on my home machine and nobody reported that backend="write" didn't help i don't think this is a blocker.

#11

Updated by stbuehler almost 13 years ago

  • Status changed from Assigned to Fixed
  • Resolution set to invalid

darix: that is mostlikely some old uclibc
darix: and we got success reports on newer lighttpd versions on nslu

So either use backend="write" or update your uclibc.

#12

Updated by stbuehler over 12 years ago

  • Status changed from Fixed to Invalid

Also available in: Atom