Project

General

Profile

Actions

Bug #1249

closed

writev failed: Invalid argument

Added by Anonymous almost 17 years ago. Updated almost 8 years ago.

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

Description

I'm using lighttpd-1.4.r1734, and I have been seeing the following error periodically:


Jun 26 11:45:46 lighttpd[453]: (network_writev.c.111) writev failed: Invalid argument 7 
Jun 26 11:45:46 lighttpd[453]: (connections.c.592) connection closed: write failed on fd 7 
Jun 26 11:45:47 lighttpd[453]: (mod_cgi.c.1310) cgi died ? 
...
Jun 26 12:00:34 lighttpd[453]: (network_writev.c.111) writev failed: Invalid argument 7 
Jun 26 12:00:34 lighttpd[453]: (connections.c.592) connection closed: write failed on fd 7 
Jun 26 12:00:35 lighttpd[453]: (mod_cgi.c.1310) cgi died ? 

The writev() man page says the EINVAL:
The sum of the iov_len values overflows an ssize_t value. Or,
the vector count is less than zero or greater than the
permitted maximum.

So this looks like a bug. The CGI in question is a data pump that was producing a ~7mbps stream and it runs for long periods of time. I think the problem is triggered when lighttpd is handling another connection, but I haven't been able to prove that. The annoying part is that I haven't been able to catch this happening with gdb attached (it only seems to happen when I'm not looking :).

Actions #1

Updated by gstrauss almost 8 years ago

  • Description updated (diff)
  • Status changed from New to Fixed
  • Assignee deleted (jan)
  • Target version changed from 1.5.0 to 1.4.40

(not sure why this was marked for lighttpd 1.5.0)

Fixed in lighttpd git master. Excessive output is buffered to temp files on disk.

Actions

Also available in: Atom