GNU bug report logs - #18914
2.0.11 REPL server listens on 127.0.0.1 but not "localhost"

Previous Next

Package: guile;

Reported by: taylanbayirli <at> gmail.com ("Taylan Ulrich Bayırlı/Kammer")

Date: Fri, 31 Oct 2014 15:53:03 UTC

Severity: normal

Fixed in version 2.0.11

Done: Taylan Kammer <taylan.kammer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 18914 <at> debbugs.gnu.org (full text, mbox):

From: taylanbayirli <at> gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: <dsmich <at> roadrunner.com>
Cc: 18914 <at> debbugs.gnu.org
Subject: Re: bug#18914: 2.0.11 REPL server listens on 127.0.0.1 but not
 "localhost"
Date: Sun, 02 Nov 2014 14:23:41 +0100
<dsmich <at> roadrunner.com> writes:

> Seems to work fine on master

I just built from the master branch to be sure and can still reproduce.

> Maybe try strace, possibly limiting it with -e connect, to reveal what
> it's actually doing.

Not sure what I should be looking for, but there is no connect() call,
no occurrence of "localhost" in the whole output, but the following
snippet at some point:

...
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 8
fcntl(8, F_GETFL)                       = 0x2 (flags O_RDWR)
lseek(8, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
setsockopt(8, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(8, {sa_family=AF_INET, sin_port=htons(37146), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
mmap(NULL, 8720384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f35aaf81000
mprotect(0x7f35aaf81000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f35ab7d0ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f35ab7d19d0, tls=0x7f35ab7d1700, child_tidptr=0x7f35ab7d19d0) = 2099
futex(0x7fffd27a33fc, FUTEX_WAIT_PRIVATE, 1, NULL) = 0
...

which is also the sole occurrence of '127.0.0.1'.  Seems to come from
`make-tcp-server-socket' in module/system/repl/server.scm where it
passes INADDR_LOOPBACK, an integer whose value is 127.0.0.1 as a uint32,
to bind().  I don't know at what point it's normally supposed to make
the association with "localhost".

Any further help in how to debug this is appreciated.  I have little
knowledge of the POSIX networking API.

Taylan




This bug report was last modified 4 years and 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.