elixir-lang / elixir

Elixir is a dynamic, functional language for building scalable and maintainable applications
https://elixir-lang.org/
Apache License 2.0
24.34k stars 3.36k forks source link

Erlange errors (driver errors) when trying to run iex #1116

Closed hussein closed 11 years ago

hussein commented 11 years ago

Hi,

I tried to run iex and I got:

{error_logger,{{2013,5,25},{16,19,44}},"~s~n",["driver_select(0x0000000012700c20, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl (tty_sl -c -e) driver #Port<0.679> failed: fd=0 (re)selected before stop_select was called for driver tty_sl\n"]}
Erlang R16B (erts-5.10.1) [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

=ERROR REPORT==== 25-May-2013::18:19:44 ===
driver_select(0x0000000012700c20, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl   (tty_sl -c -e) driver #Port<0.679> failed: fd=0 (re)selected before stop_select was called for driver tty_sl

My environment: OS X 10.8.3

josevalim commented 11 years ago

Interesting. Which shell are you using? If not Mac OS X regular one, do you mind giving it a try?

manpages commented 11 years ago

You may or may not disregard my commentary, but I strongly advice to make an issue after excessive problem analysis, so that you have really strong evidence that it's Elixir issue. At the very least including complete details about the problem. In this case - version of Erlang virtual machine, shell that you are using, the way you compiled Elixir, version of Elixir. As a rule of thumb that kind of questions should first be addressed at Freenode IRC channel #elixir-lang, where those are always welcome and answered reasonably fast. On May 26, 2013 12:11 AM, "Hussein Baghdadi" notifications@github.com wrote:

Hi,

I tried to run iex and I got:

{error_logger,{{2013,5,25},{16,19,44}},"~s~n",["driver_select(0x0000000012700c20, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl (tty_sl -c -e) driver #Port<0.679> failed: fd=0 (re)selected before stop_select was called for driver tty_sl\n"]} Erlang R16B (erts-5.10.1) [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

=ERROR REPORT==== 25-May-2013::18:19:44 === driver_select(0x0000000012700c20, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl (tty_sl -c -e) driver #Port<0.679> failed: fd=0 (re)selected before stop_select was called for driver tty_sl

My environment: OS X 10.8.3

— Reply to this email directly or view it on GitHubhttps://github.com/elixir-lang/elixir/issues/1116 .

hussein commented 11 years ago

@josevalim I'm using iTerm2 . Strangely the error disappeared when using OSX Term ! @manpages Yes sure, sorry for any annoying that might happen. I'm really excited about Elixir and I wanted to be helpful and report my issue.

Thank you all.

josevalim commented 11 years ago

@hussein it seems to be an issue in your terminal. I am also using iTerm2 and my version is 1.0.0.20130319 and it works just fine. If you find out the original reason, please let us know! And enjoy Elixir! :D

Macu1 commented 8 years ago

when I changed my vmware to have two cpus,I got the same error_report. then I changed back to one, and the error disapeared....interesting.... note, command erl report nothing all the time.

sailorsteve commented 8 years ago

I also get the same error message running iex in a Centos 6.7 terminal when Centos is running inside of VirtualBox with 2 CPUs. The error disappears when I change VirtualBox to 1 CPU. Running erl doesn't show any errors with 1 or 2 CPUs. This is with Elixir 1.2.1 compiled from source. (Everything worked fine with Centos 7.2 running in VirtualBox).

insiderq commented 8 years ago

I've also faced with this error, it's was showed only once. Guys from there http://erlang.2086793.n4.nabble.com/rebar3-shell-showing-error-td4715452.html telling that it is an issue of rebar3, and i indirectly can confirm that since i've been seeing this error after installing a rebar3, but i've installed a lot of new on that time

pkazmier commented 8 years ago

I can reproduce this very easily on my Mac (El Capitan) in the standard Terminal that comes with OS X by simply starting and stopping iex. In the example below, the error happened the second time I started iex. Sometimes it takes 5 or 6 times to reproduce, but inevitably it will always happen if one persists long enough:

imac-2:~ kaz$ iex
Erlang/OTP 19 [erts-8.0.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Interactive Elixir (1.3.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 
User switch command
 --> q
imac-2:~ kaz$ iex
2016-07-31 12:11:14 ~s~n
    "driver_select(0x00000000812c0d40, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl (tty_sl -c -e) driver #Port<0.623> failed: fd=0 (re)selected before stop_select was called for driver tty_sl\n"
Erlang/OTP 19 [erts-8.0.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

=ERROR REPORT==== 31-Jul-2016::07:11:14 ===
driver_select(0x00000000812c0d40, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl (tty_sl -c -e) driver #Port<0.623> failed: fd=0 (re)selected before stop_select was called for driver tty_sl

Interactive Elixir (1.3.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 
User switch command
 --> q
imac-2:~ kaz$ 

I then tried to reproduce with erl to see if it was an Erlang issue, but I was unable even after starting and stopping erl repeatedly. The problem seems isolated to iex startup.

Version information:

imac-2:~ kaz$ brew info elixir
elixir: stable 1.3.2 (bottled), HEAD
Functional metaprogramming aware language built on Erlang VM
http://elixir-lang.org/
/usr/local/Cellar/elixir/1.3.2 (383 files, 5M) *
  Poured from bottle on 2016-07-31 at 10:22:27
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/elixir.rb
imac-2:~ kaz$ brew info erlang
erlang: stable 19.0.2 (bottled), HEAD
Programming language for highly scalable real-time systems
https://www.erlang.org/
/usr/local/Cellar/erlang/19.0.2 (7,292 files, 278.6M) *
  Poured from bottle on 2016-07-31 at 10:22:23
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/erlang.rb
==> Dependencies
Build: autoconf ✘, automake ✘, libtool ✘
Required: openssl ✔
Recommended: wxmac ✔
Optional: fop ✘
==> Options
--with-dirty-schedulers
    Enable experimental dirty schedulers
--with-fop
    Build with fop support
--with-java
    Build jinterface application
--with-native-libs
    Enable native library compilation
--without-docs
    Do not install documentation
--without-hipe
    Disable building hipe; fails on various OS X systems
--without-wxmac
    Build without wxmac support
--HEAD
    Install HEAD version
==> Caveats
Man pages can be found in:
  /usr/local/opt/erlang/lib/erlang/man

Access them with `erl -man`, or add this directory to MANPATH.
imac-2:~ kaz$ 
amorphid commented 7 years ago

I bumped into this problem, too, but it only happened once. Just documenting the occurrence. If it becomes reproducible, I'll open a new issue.

$ iex
2016-12-31 10:58:20 ~s~n
    "driver_select(0x000000001c540d40, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl (tty_sl -c -e) driver #Port<0.624> failed: fd=0 (re)selected before stop_select was called for driver tty_sl\n"
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

=ERROR REPORT==== 31-Dec-2016::02:58:20 ===
driver_select(0x000000001c540d40, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl (tty_sl -c -e) driver #Port<0.624> failed: fd=0 (re)selected before stop_select was called for driver tty_sl

Interactive Elixir (1.3.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 

On the next (several) subsequent tries, nothing

$ iex
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Interactive Elixir (1.3.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>

Occurred using Terminal Version 2.7.1 (388) on OS X v10.12.2

paulbombarde commented 7 years ago

I've just got this error too when launching iex under Mac OSX ElCapitain using standard terminal. launching iex again, the error disappeared. From very far, that seems to be a rare occurence when the tty is not ready the first time iex code tries to access it. I'm not sure if this makes sense at all :).

RumataEstor commented 7 years ago

Linux, xterm:

$ iex
2017-06-20 12:03:12 ~s~n
        "driver_select(0x00007f4c47140698, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl (tty_sl -c -e) driver #Port<0.628> failed: fd=0 (re)selected before stop_select was called for driver tty_sl\n"
Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

=ERROR REPORT==== 20-Jun-2017::22:03:12 ===
driver_select(0x00007f4c47140698, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl (tty_sl -c -e) driver #Port<0.628> failed: fd=0 (re)selected before stop_select was called for driver tty_s

$ uname -srvmpio
Linux 4.9.30 #1-NixOS SMP Thu May 25 13:45:05 UTC 2017 x86_64 unknown unknown GNU/Linux

$ xterm -version
XTerm(327)

$ echo $TERM
xterm-256color

It happens infrequently and seems like some sort of a race condition.

I think this issue needs to be reopened.

scmx commented 6 years ago
❯❯❯ iex

^C
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution
^C
❯❯❯ iex
2017-12-03 21:31:55 ~s~n
        "driver_select(0x000000001a380af0, 0, ERL_DRV_READ ERL_DRV_USE, 1) by tty_sl (tty_sl -c -e) driver #Port<0.624> failed:
fd=0 (re)selected before stop_select was called for driver tty_sl\n"
^C
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution
a
❯❯❯ iex
^C
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution
^C
❯❯❯ iex
^C
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution
^C
❯❯❯ elixir -v
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.6.0-dev (441e114) (compiled with OTP 19)

I can only reproduce that iex hangs every time I run it in this terminal window, I don't get the error again. In another window iex behaves just like normal.