New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when closing UNIXServer with abstract socket address #3936
Comments
|
I'd like to do that as my first contribution, somewhere this week if you don't mind |
|
I agree with all your points, but I would add |
|
oh yes, I forgot that inheritance, thanks |
#codetriage This no longer errors out, currently shows this trace: root@ubuntu-s-1vcpu-1gb-nyc3-01:~# uname -a
Linux ubuntu-s-1vcpu-1gb-nyc3-01 4.4.0-131-generic #157-Ubuntu SMP Thu Jul 12 15:51:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu-s-1vcpu-1gb-nyc3-01:~# crystal --version
Crystal 0.26.1 [391785249] (2018-08-27)
LLVM: 4.0.0
Default target: x86_64-unknown-linux-gnu
root@ubuntu-s-1vcpu-1gb-nyc3-01:~# crystal run foo.cr
Unhandled exception: connect: Connection refused (Errno)
from /usr/share/crystal/src/socket/unix_socket.cr:0:7 in 'initialize'
from /usr/share/crystal/src/socket/unix_socket.cr:18:3 in 'new'
from /usr/share/crystal/src/socket/unix_socket.cr:40:5 in '__crystal_main'
from /usr/share/crystal/src/crystal/main.cr:97:5 in 'main_user_code'
from /usr/share/crystal/src/crystal/main.cr:86:7 in 'main'
from /usr/share/crystal/src/crystal/main.cr:106:3 in 'main'
from __libc_start_main
from _start
from ??? The work in #4056 hasn't been merged in yet, so it's unclear whether this is meant to work? I've tried some ## session 1 (server)
$ socat ABSTRACT-LISTEN:foo -
## session 2 (client)
$ netstat -l | grep foo
unix 2 [ ACC ] STREAM LISTENING 27903 @foo
$ crystal build client.cr && strace ./client
...
connect(10, {sa_family=AF_LOCAL, sun_path=@"foo"}, 110) = -1 ECONNREFUSED (Connection refused) So it appears that something is being translated to the correct |
Abstract socket addresses start with a '\0', which causes a raise in UNIXSocket#close
The text was updated successfully, but these errors were encountered: