[erlang-questions] Yaws's "sendfile" linked-in driver : "stealing control of fd" error
Mon Apr 18 12:09:01 CEST 2011
Thanks a lot for these explanations.
Hope that Steve (and Tuncer with his "sendfile" version) can fix that very soon.
Le 18 avr. 2011 à 12:02, Sverker Eriksson a écrit :
> On Sun, Apr 17, 2011 at 5:23 PM, zabrane Mikael <zabrane3@REDACTED> wrote:
>>> Hi OTP team & Steve,
>>> I'm using the "sendfile" (thanks to Steve Vinoski) linked-in driver
>>> borrowed from "Yaws"
>>> in one of my pet project.
>>> Today, I noticed this strange error:
>>> =ERROR REPORT==== 17-Apr-2011::20:49:18 ===
>>> driver_select(0x0000000000000c31, 24, ERL_DRV_WRITE, 1) by
>>> sendfile_drv driver #Port<0.3121> stealing control of fd=24 from
>>> output driver tcp_inet #Port<0.10029>
> The error message kind of says it all:
> The driver "sendfile_drv" is calling driver_select() to subscribe for output events on file descriptor 24. BUT, driver "tcp_inet" is already subscribing to output events on that very same file descriptor 24. Driver "sendfile_drv" thus steals the file descriptor from "tcp_inet" as only one port at a time can subscribe to a particular file descriptor event.
> I think you should consider this as an error. Drivers are not supposed to act like this. The normal cause of this is a driver that forgets to deselect a file descriptor before closing it. Despite that I would regard sendfile_drv as the primary suspect here as the new kid on the block.
> /Sverker, Erlang/OTP
More information about the erlang-questions