bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Fran Litterio

Using Emacs built from the latest sources (obtained by cloning the Git
repo at git://git.savannah.gnu.org/emacs.git), make-network-connection
fails when connecting to an IPv6 address from a Windows machine that has
an IPv6 address assigned via DHCP.  To reproduce:

1. On Windows 7 SP1 (with all updates installed), launch Emacs using:
   emacs.exe -Q

2. Evaluate the following form in the *scratch* buffer:

   (progn
     (defun my-sentinel (proc event)
       (with-current-buffer "*scratch*"
         (save-excursion
           (goto-char (point-max))
           (insert (format "\n>> proc = '%s', status = '%s', event = '%s'"
                           proc (process-status proc) event)))))

     (defun my-filter (proc str)
       (with-current-buffer "*scratch*"
         (save-excursion
           (goto-char (point-max))
           (insert (format "\n>> proc = '%s', status = '%s', str = '%s'"
                           proc (process-status proc) str)))))

     ;; These IP addresses are both for host rajaniemi.freenode.net.
     (let* ((ipv6-host "2001:708:40:2001:a822:baff:fec4:2428")
            (ipv4-host "195.148.124.79")
            (process (make-network-process :name "zzz"
                                           :buffer nil
                                           :host ipv6-host
                                           ;; :host ipv4-host
                                           :service 6667
                                           :nowait t)))
       (set-process-sentinel process 'my-sentinel)
       (set-process-filter process 'my-filter)))

3. The following text will appear at the end of the *scratch* buffer
   (inserted by function my-sentinel, above):

    >> proc = 'zzz', status = 'failed', event = 'failed with code 14
    '

4. If you change "ipv6-host" to "ipv4-host" in the call to
   make-network-process, the connection is established successfully, and
   you see the data sent by the IRC server accumulate at the end of the
   *scratch* buffer (inserted by function my-filter, above).

My local system has an IPv6 address, but I'm not sure if that is
required for this problem to happen.
--
Fran Litterio



In GNU Emacs 25.1.50.1 (i686-pc-mingw32)
 of 2016-05-28 built on PUPPY
Repository revision: 549470fdf234acb4da7941e3bb9b28ed63a51876
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Recent messages:
Quit
Mark set
File 'my-erc.el' has changed!  Reload ~/.emacs! [2 times]
Type "q" to delete help window.
C-M-d runs the command my-kill-to-bottom
File 'my-erc.el' has changed!  Reload ~/.emacs!
Making completion list...
report-emacs-bug is on <menu-bar> <help-menu> <send-emacs-bug-report>
funcall-interactively: Beginning of buffer
Making completion list...

Configured using:
 'configure --prefix=/c/apps/emacs --without-x --without-xpm
 --without-png --without-jpeg --without-tiff --without-gif'

Configured features:
SOUND NOTIFY ACL TOOLKIT_SCROLL_BARS

Important settings:
  value of $LANG: C.ISO-8859-1
  locale-coding-system: cp1252

Major mode: Buffer Menu

Minor modes in effect:
  erc-list-mode: t
  erc-menu-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-netsplit-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  diff-auto-refine-mode: t
  show-paren-mode: t
  save-place-mode: t
  icomplete-mode: t
  savehist-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(shadow mail-extr emacsbug tabify imenu hippie-exp crm erc-sasl debug
pulse hi-lock eieio-opt speedbar sb-image ezimage dframe find-func
edmacro kmacro jka-compr misearch multi-isearch vc-git filecache
help-fns server sort gnus-draft gnus-agent gnus-srvr nnvirtual nndraft
nnmh gnus-msg gnus-cite canlock gnus-async gnus-score score-mode
gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-cache
gnus-sum fpl-moo fpl-react cl erc-notify erc-truncate erc-log erc-dcc
erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete erc-track
erc-match erc-button erc-fill erc-stamp erc-netsplit erc-goodies erc
erc-backend erc-compat thingatpt source-safe ediff-merg ediff-wind
ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff grep
sh-script smie executable python tramp-sh json map ielm pp sgml-mode
csharp-mode cc-langs smtpmail sendmail nntp gnus-group gnus-undo
gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc parse-time
gnus-spec gnus-int gnus-range message rfc822 mml mml-sec epa derived epg
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader gnus-win nnoo gnus nnheader subr-x gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr
wid-edit etags vc vc-dispatcher dired-aux hexl smerge-mode diff-mode
easy-mmode paren man info compile apropos tramp tramp-compat
tramp-loaddefs trampver ucs-normalize format-spec advice saveplace
icomplete xref project savehist browse-url shell pcomplete warnings
arc-mode archive-mode ange-ftp socks network-stream puny nsm starttls
tls gnutls dired dired-loaddefs cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs comint ansi-color
ring calc-ext calc calc-loaddefs calc-macs time-stamp finder-inf package
epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote w32notify w32 multi-tty
make-network-process emacs)

Memory information:
((conses 8 662208 66845)
 (symbols 32 46115 1)
 (miscs 32 489 2218)
 (strings 16 116431 18641)
 (string-bytes 1 3446166)
 (vectors 8 83211)
 (vector-slots 4 2033917 82112)
 (floats 8 1062 869)
 (intervals 28 30189 2675)
 (buffers 528 63))



Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Ken Brown-6
On 5/30/2016 7:44 PM, Francis Litterio wrote:

>
> Using Emacs built from the latest sources (obtained by cloning the Git
> repo at git://git.savannah.gnu.org/emacs.git), make-network-connection
> fails when connecting to an IPv6 address from a Windows machine that has
> an IPv6 address assigned via DHCP.  To reproduce:
>
> 1. On Windows 7 SP1 (with all updates installed), launch Emacs using:
>    emacs.exe -Q
>
> 2. Evaluate the following form in the *scratch* buffer:
>
>    (progn
>      (defun my-sentinel (proc event)
>        (with-current-buffer "*scratch*"
> (save-excursion
>   (goto-char (point-max))
>   (insert (format "\n>> proc = '%s', status = '%s', event = '%s'"
>   proc (process-status proc) event)))))
>
>      (defun my-filter (proc str)
>        (with-current-buffer "*scratch*"
> (save-excursion
>   (goto-char (point-max))
>   (insert (format "\n>> proc = '%s', status = '%s', str = '%s'"
>   proc (process-status proc) str)))))
>
>      ;; These IP addresses are both for host rajaniemi.freenode.net.
>      (let* ((ipv6-host "2001:708:40:2001:a822:baff:fec4:2428")
>    (ipv4-host "195.148.124.79")
>    (process (make-network-process :name "zzz"
>   :buffer nil
>   :host ipv6-host
>   ;; :host ipv4-host
>   :service 6667
>   :nowait t)))

What happens if you add
                                            :family 'ipv6

Ken




Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Fran Litterio
I see the exact same failure with ":family 'ipv6" added to the
arguments to make-network-connection (when it's also passed ":host
ipv6-host", of course).
--
Fran Litterio

On Wed, Jun 1, 2016 at 10:54 AM, Ken Brown <[hidden email]> wrote:

> On 5/30/2016 7:44 PM, Francis Litterio wrote:
>>
>>
>> Using Emacs built from the latest sources (obtained by cloning the Git
>> repo at git://git.savannah.gnu.org/emacs.git), make-network-connection
>> fails when connecting to an IPv6 address from a Windows machine that has
>> an IPv6 address assigned via DHCP.  To reproduce:
>>
>> 1. On Windows 7 SP1 (with all updates installed), launch Emacs using:
>>    emacs.exe -Q
>>
>> 2. Evaluate the following form in the *scratch* buffer:
>>
>>    (progn
>>      (defun my-sentinel (proc event)
>>        (with-current-buffer "*scratch*"
>>          (save-excursion
>>            (goto-char (point-max))
>>            (insert (format "\n>> proc = '%s', status = '%s', event = '%s'"
>>                            proc (process-status proc) event)))))
>>
>>      (defun my-filter (proc str)
>>        (with-current-buffer "*scratch*"
>>          (save-excursion
>>            (goto-char (point-max))
>>            (insert (format "\n>> proc = '%s', status = '%s', str = '%s'"
>>                            proc (process-status proc) str)))))
>>
>>      ;; These IP addresses are both for host rajaniemi.freenode.net.
>>      (let* ((ipv6-host "2001:708:40:2001:a822:baff:fec4:2428")
>>             (ipv4-host "195.148.124.79")
>>             (process (make-network-process :name "zzz"
>>                                            :buffer nil
>>                                            :host ipv6-host
>>                                            ;; :host ipv4-host
>>                                            :service 6667
>>                                            :nowait t)))
>
>
> What happens if you add
>                                            :family 'ipv6
>
> Ken
>



Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Ken Brown-6
On 6/1/2016 11:30 AM, Fran wrote:
> I see the exact same failure with ":family 'ipv6" added to the
> arguments to make-network-connection (when it's also passed ":host
> ipv6-host", of course).

And what if you remove the ":nowait t"?

Ken




Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Fran Litterio
Removing the ":nowait t" makes it connect successfully to the IPv6
address. In that case, it works regardless of whether ":family 'ipv6"
is present. If this were my personal code that would be a sufficient
workaround, but I found this bug in ERC (the Emacs IRC client), and I
think it is designed so that make-network-process has to connect
asynchronously.
--
Fran Litterio


On Wed, Jun 1, 2016 at 12:29 PM, Ken Brown <[hidden email]> wrote:

> On 6/1/2016 11:30 AM, Fran wrote:
>>
>> I see the exact same failure with ":family 'ipv6" added to the
>> arguments to make-network-connection (when it's also passed ":host
>> ipv6-host", of course).
>
>
> And what if you remove the ":nowait t"?
>
> Ken
>



Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Ken Brown-6
On 6/1/2016 3:57 PM, Fran wrote:
> Removing the ":nowait t" makes it connect successfully to the IPv6
> address. In that case, it works regardless of whether ":family 'ipv6"
> is present. If this were my personal code that would be a sufficient
> workaround, but I found this bug in ERC (the Emacs IRC client), and I
> think it is designed so that make-network-process has to connect
> asynchronously.

This sounds similar to the situation I faced in bug#23606.  (But in that
case specifying :family solved the problem).  Here's what I suspect is
happening:

In src/process.c there's a loop starting at line 3138 in which the code
runs through a list of possible addrinfo structures in the hopes of
finding one it can connect to.  In the asynchronous case, it doesn't
wait to see if the connection is successful; this is only discovered
later (around line 5495).  At this point it's too late to try another
addrinfo structure, and a "failed" message is generated (line 5523) if
the connection didn't succeed.

I think it would be better if the loop would delay making the connection
asynchronous (line 3160 or 3171) until it's known that the connection
has succeeded.

Lars, is there any reason not to do it that way?

Ken



Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Live System User
In reply to this post by Fran Litterio

Hi,

        I get an Emacs crash (see bug#23669).

Thanks.



Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Ken Brown-6
In reply to this post by Ken Brown-6
On 6/1/2016 5:55 PM, Ken Brown wrote:

> On 6/1/2016 3:57 PM, Fran wrote:
>> Removing the ":nowait t" makes it connect successfully to the IPv6
>> address. In that case, it works regardless of whether ":family 'ipv6"
>> is present. If this were my personal code that would be a sufficient
>> workaround, but I found this bug in ERC (the Emacs IRC client), and I
>> think it is designed so that make-network-process has to connect
>> asynchronously.
>
> This sounds similar to the situation I faced in bug#23606.  (But in that
> case specifying :family solved the problem).  Here's what I suspect is
> happening:
>
> In src/process.c there's a loop starting at line 3138 in which the code
> runs through a list of possible addrinfo structures in the hopes of
> finding one it can connect to.  In the asynchronous case, it doesn't
> wait to see if the connection is successful; this is only discovered
> later (around line 5495).  At this point it's too late to try another
> addrinfo structure, and a "failed" message is generated (line 5523) if
> the connection didn't succeed.

While we're waiting for an expert to respond to this, it's easy to test if my guess is correct.  Please apply the following patch, rebuild, and retry your tests.

diff --git a/src/process.c b/src/process.c
index 9ca3e594..30a200f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3135,6 +3135,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
   count1 = SPECPDL_INDEX ();
   s = -1;
 
+  int addrinfo_count = 0;
   while (!NILP (addrinfos))
     {
       Lisp_Object addrinfo = XCAR (addrinfos);
@@ -3142,6 +3143,8 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
       int protocol = XINT (XCAR (addrinfo));
       Lisp_Object ip_address = XCDR (addrinfo);
 
+      message ("Trying addrinfo structure %d", ++addrinfo_count);
+
 #ifdef WINDOWSNT
     retry_connect:
 #endif

This will print a message in the echo area (and the *Messages* buffer) on each iteration of the loop.  If my guess is correct, you should see more than one iteration in the IPv6 case if ":nowait t" is removed.  It would also be interesting to see if ":family 'ipv6" has any effect, again without ":nowait t".

Ken



Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Ken Brown-6
In reply to this post by Live System User
On 6/2/2016 4:16 AM, Live System User wrote:
>         I get an Emacs crash (see bug#23669).

Sorry, but I can't reproduce this on my system (Cygwin), and I'm not
skilled enough to walk you through debugging it.

Maybe someone else can help.

Ken




Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Fran Litterio
In reply to this post by Fran Litterio
Ken Brown <kbrown <at> cornell.edu> writes:

> While we're waiting for an expert to respond to this, it's easy
> to test if my guess is correct.  Please apply
> the following patch, rebuild, and retry your tests.

[snip]

> This will print a message in the echo area (and the *Messages*
> buffer) on each iteration of the loop.  If my guess is correct,
> you should see more than one iteration in the IPv6 case if
> ":nowait t" is removed.  It would also be interesting to see
> if ":family 'ipv6" has any effect, again without ":nowait t".
>
> Ken

Thanks, Ken.  Sorry to delay on this (work intrudes, as it does).
I'll try this experiment this weekend and report back.
--
Fran Litterio





Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Fran Litterio
In reply to this post by Fran Litterio
Ken Brown <kbrown <at> cornell.edu> writes:

> While we're waiting for an expert to respond to this, it's
> easy to test if my guess is correct.  Please apply
> the following patch, rebuild, and retry your tests.

Hi Ken,

Unfortunately, your patch doesn't apply cleanly.  My source near
those lines no longer looks like the context in your patch.
In particular, I no longer have a call to connect_network_socket
at line 3142.  I see this commit by Paul Eggert in my source:

commit 918ef71538fd43049496e4370eba63e3096a4933
Author: Paul Eggert <[hidden email]>
Date:   Mon May 23 08:56:42 2016 -0700

  Don't use only last protocol from getaddrinfo
   
  Problem reported by Ken Brown in:
  http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00483.html
  * src/process.c (conv_addrinfo_to_lisp): New function.
  (connect_network_socket): Arg is now a list of addrinfos, not
  merely IP addresses.  All uses changed.  Use protocol from
  each addrinfo.
  (Fmake_network_process): Accumulate protocols into addrinfos
  rather than just using the last one found.
  (check_for_dns): Accumulate protocols here, too.
  * src/process.h (struct Lisp_Process): Remove ai_protocol;
  no longer needed.

I built Emacs from source containing that commit, but it didn't fix
the problem.  Let me know if there's any more I can do to help.  I
will leave my local repo in the state where the above commit is
the most recent commit to src/process.c, in case you need me to
try another patch.
--
Fran Litterio




Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Ken Brown-6
On 6/5/2016 11:04 AM, Fran Litterio wrote:
> Ken Brown <kbrown <at> cornell.edu> writes:
>
>> While we're waiting for an expert to respond to this, it's
>> easy to test if my guess is correct.  Please apply
>> the following patch, rebuild, and retry your tests.
>
> Hi Ken,
>
> Unfortunately, your patch doesn't apply cleanly.

Hi Fran,

It applies cleanly for me to the current git HEAD.  Could you do a 'git
pull' and try again?  I'm resending the patch as an attachment in case
my mailer (or yours) messed something up, e.g., by wrapping a long line.

Ken


process.c.patch (675 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Fran Litterio
On Sun, Jun 5, 2016 at 11:31 AM, Ken Brown <[hidden email]> wrote:

> On 6/5/2016 11:04 AM, Fran Litterio wrote:
>
>> Unfortunately, your patch doesn't apply cleanly.
>
>
> Hi Fran,
>
> It applies cleanly for me to the current git HEAD.  Could you do a 'git
> pull' and try again?  I'm resending the patch as an attachment in case my
> mailer (or yours) messed something up, e.g., by wrapping a long line.

This time it applied cleanly. Rebuilding now. Will update.
--
Fran



Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Fran Litterio
In reply to this post by Ken Brown-6
On Thu, Jun 2, 2016 at 10:50 AM, Ken Brown <[hidden email]> wrote:
> On 6/1/2016 5:55 PM, Ken Brown wrote:

> While we're waiting for an expert to respond to this, it's easy to
> test if my guess is correct.  Please apply the following patch,
> rebuild, and retry your tests.

[...]

> This will print a message in the echo area (and the *Messages* buffer)
> on each iteration of the loop.  If my guess is correct, you should see
> more than one iteration in the IPv6 case if ":nowait t" is removed.
> It would also be interesting to see if ":family 'ipv6" has any effect,
> again without ":nowait t".

I did a "git pull", applied that patch, and rebuilt.  I see the
following in *Messages* no matter if ":nowait t" or ":family 'ipv6" is
present or absent (I tried all four combinations):

    Trying addrinfo structure 1

I never see that message with the value 2 in it.
--
Fran



Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Ken Brown-6
On 6/5/2016 12:56 PM, Fran wrote:

> On Thu, Jun 2, 2016 at 10:50 AM, Ken Brown <[hidden email]> wrote:
>> On 6/1/2016 5:55 PM, Ken Brown wrote:
>
>> While we're waiting for an expert to respond to this, it's easy to
>> test if my guess is correct.  Please apply the following patch,
>> rebuild, and retry your tests.
>
> [...]
>
>> This will print a message in the echo area (and the *Messages* buffer)
>> on each iteration of the loop.  If my guess is correct, you should see
>> more than one iteration in the IPv6 case if ":nowait t" is removed.
>> It would also be interesting to see if ":family 'ipv6" has any effect,
>> again without ":nowait t".
>
> I did a "git pull", applied that patch, and rebuilt.  I see the
> following in *Messages* no matter if ":nowait t" or ":family 'ipv6" is
> present or absent (I tried all four combinations):
>
>     Trying addrinfo structure 1
>
> I never see that message with the value 2 in it.

OK, my guess was wrong.  I'm out of ideas.  I hope one of the experts
can help you.

Ken




Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Ken Brown-6
On 6/5/2016 1:20 PM, Ken Brown wrote:
> OK, my guess was wrong.  I'm out of ideas.  I hope one of the experts
> can help you.

One last thought: Your original report mentioned an error code of 14.  That may be bogus, for the reasons explained in bug#23615.  The following patch might get a more reliable error code, which you could then look up.  (On my system you would look in /usr/include/sys/errno.h.)

diff --git a/src/process.c b/src/process.c
index 9ca3e594..d71c50c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5492,7 +5492,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
 
              p = XPROCESS (proc);
 
-#ifdef GNU_LINUX
+#if 1
              /* getsockopt(,,SO_ERROR,,) is said to hang on some systems.
                 So only use it on systems where it is known to work.  */
              {


Ken



Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Ken Brown-6
On 6/5/2016 2:00 PM, Ken Brown wrote:

> On 6/5/2016 1:20 PM, Ken Brown wrote:
>> OK, my guess was wrong.  I'm out of ideas.  I hope one of the experts
>> can help you.
>
> One last thought: Your original report mentioned an error code of 14.  That may be bogus, for the reasons explained in bug#23615.  The following patch might get a more reliable error code, which you could then look up.  (On my system you would look in /usr/include/sys/errno.h.)
>
> diff --git a/src/process.c b/src/process.c
> index 9ca3e594..d71c50c 100644
> --- a/src/process.c
> +++ b/src/process.c
> @@ -5492,7 +5492,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
>
>               p = XPROCESS (proc);
>
> -#ifdef GNU_LINUX
> +#if 1
>               /* getsockopt(,,SO_ERROR,,) is said to hang on some systems.
>                  So only use it on systems where it is known to work.  */
>               {

Fran, you may want to try the patch that Paul recently posted to
bug#17976.  This may help with your problem.

Ken




Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Ken Brown-6
On 6/12/2016 4:04 PM, Ken Brown wrote:

> On 6/5/2016 2:00 PM, Ken Brown wrote:
>> On 6/5/2016 1:20 PM, Ken Brown wrote:
>>> OK, my guess was wrong.  I'm out of ideas.  I hope one of the experts
>>> can help you.
>>
>> One last thought: Your original report mentioned an error code of 14.
>> That may be bogus, for the reasons explained in bug#23615.  The
>> following patch might get a more reliable error code, which you could
>> then look up.  (On my system you would look in /usr/include/sys/errno.h.)
>>
>> diff --git a/src/process.c b/src/process.c
>> index 9ca3e594..d71c50c 100644
>> --- a/src/process.c
>> +++ b/src/process.c
>> @@ -5492,7 +5492,7 @@ wait_reading_process_output (intmax_t
>> time_limit, int nsecs, int read_kbd,
>>
>>               p = XPROCESS (proc);
>>
>> -#ifdef GNU_LINUX
>> +#if 1
>>               /* getsockopt(,,SO_ERROR,,) is said to hang on some
>> systems.
>>                  So only use it on systems where it is known to work.  */
>>               {
>
> Fran, you may want to try the patch that Paul recently posted to
> bug#17976.  This may help with your problem.

On second thought, the part of Paul's patch that I thought might help
doesn't seem to apply to MS-Windows.  I'm not sure how hard it would be
to extend it to Windows.

Ken




Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Lars Ingebrigtsen
In reply to this post by Fran Litterio
[hidden email] (Francis Litterio) writes:

> Using Emacs built from the latest sources (obtained by cloning the Git
> repo at git://git.savannah.gnu.org/emacs.git), make-network-connection
> fails when connecting to an IPv6 address from a Windows machine that has
> an IPv6 address assigned via DHCP.  To reproduce:

(I have only skimmed this thread.)

The last update to this bug report was four years ago.  Some work on
this problem was done in this bug report, but it's unclear whether any
problems remain, and I can't recall seeing any bug reports about ipv6 on
Windows lately.

So has this problem been resolved by now?

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



Reply | Threaded
Open this post in threaded view
|

bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows

Lars Ingebrigtsen
Lars Ingebrigtsen <[hidden email]> writes:

> The last update to this bug report was four years ago.  Some work on
> this problem was done in this bug report, but it's unclear whether any
> problems remain, and I can't recall seeing any bug reports about ipv6 on
> Windows lately.
>
> So has this problem been resolved by now?

This was five weeks ago, and there was no response, so I'm closing this
bug report.  If this is still a problem, please respond to the debbugs
mail address, and we'll reopen the bug report.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no