Open pallix opened 6 years ago
Thanks for the detailed bug report.
Do you know whether this is related to the 50 millisecond timeout? Also, could you turn on debug prints in the C code to see if there's a clue there?
You are welcome.
I don't get much in the log. The content after the crash:
λ cat nerves_uart-19920.log
Starting...
I tried, 30, 60, and 600 for the timeout value and still get the crash.
I'm trying to reproduce, but can't. I'm typing tab
, tab
as quickly as I can after running NervesUartBug.bug
:
$ iex -S mix
Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]
Interactive Elixir (1.6.0) - press Ctrl+C to exit (type h() ENTER for help)
Loaded ~/.iex.exs
iex(1)> NervesUartBug.bug()
%Task{
owner: #PID<0.154.0>,
pid: #PID<0.157.0>,
ref: #Reference<0.4196568369.3516137479.205605>
}
iex(2)>
!/1 !=/2
!==/2 %/2
...
Here's some info about my system:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
$ head /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz
stepping : 9
microcode : 0x1c
cpu MHz : 1200.023
cache size : 6144 KB
physical id : 0
Also, I'm running Erlang 20.2.
Could you let me know what you're running? Also do you have any more clues? This is really weird.
Are you using https://github.com/freemed/tty0tty.git ?
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ head /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 142
model name : Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
stepping : 9
microcode : 0x62
cpu MHz : 2712.022
cache size : 3072 KB
physical id : 0
I am using Erlang 20.1.1.
It is not really necessary to type quickly tabs.
When reading a port in a read loop with nerves uart and testing the program from iex, nerves uart crashes when typing twice
<tab>
:I have a demo code showing the problem: https://github.com/pallix/nerves_uart_bug