Bug #759
closedmmap fails on NSLU2 with offset >= 512k
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
Updated by jan over 18 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 ?
Updated by Anonymous over 18 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
Updated by Anonymous over 18 years ago
I just add a strace file. Hope it's helpful.
-- xummxxu
Updated by Anonymous over 18 years ago
Replying to pakenagy@hotmail.com:
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 6Let 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
Updated by Anonymous over 18 years ago
Anonymous posting is BAD! please disable it!!!
Updated by Anonymous over 18 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
Updated by Anonymous over 17 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.
Updated by darix over 17 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"
Updated by Anonymous about 17 years ago
I have the same problem on 1.4.18
-- maurice.enciel
Updated by stbuehler about 17 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.
Updated by stbuehler about 17 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.
Also available in: Atom