[erlang-questions] R13B stop_select error
Tue May 5 12:15:22 CEST 2009
Eugene Letuchy wrote:
> Hey folks,
> I just discovered the following error in the logs of a production
> system (running -smp +K true):
> [May 4 12:42:30 2009] [error] driver_select(0x0000000000099dd0, 158,
> ERL_DRV_READ ERL_DRV_WRITE ERL_DRV_USE, 0) by tcp_inet driver
> #Port<0.119119312> failed: fd=158 (re)selected before stop_select was
> called for driver udp_inet
> The process that generated this error is a tcp thrift server
> and the same code R12B-5 code did not generate these errors. After
> this error, the thrift server process is no longer responsive (doesn't
> do accept()s) ... can anyone on the core erl team give me a clue as to
> what could cause this behavior, or what other info might be helpful?
Interesting, never seen this before.
This error has to do with the safe closing of file descriptors for
drivers that was introduced in R13A. It can not happen in earlier
The emulator is complaining about misbehaving driver(s). In
this case tcp_inet and udp_inet both implemented in
erts/emulator/drivers/common/inet_drv.c. That is the layer between the
Erlang port interface and the C socket interface for TCP, UDP and SCTP
This error log says that the udp_inet driver has told the emulator that a
socket should be closed.
But the asynchronous driver callback (stop_select, new in R13A) to
actually close the socket has not been called yet. THEN, the tcp_inet
driver wants to close the same socket descriptor (158)???
Looks like a R13-bug in inet_drv.c or maybe in the code that prints
this error (erts/emulator/sys/common/erl_check_io.c).
The most helpfull would be an easy way to reproduce this...
/Sverker, Erlang/OTP Ericsson
More information about the erlang-questions