GNU bug report logs - #34134
27.0.50; process-contact for accepted sockets broken

Previous Next

Package: emacs;

Reported by: Mathew Handugan <mathew <at> handugan.com>

Date: Sat, 19 Jan 2019 10:36:02 UTC

Severity: normal

Found in version 27.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34134 in the body.
You can then email your comments to 34134 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34134; Package emacs. (Sat, 19 Jan 2019 10:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mathew Handugan <mathew <at> handugan.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 19 Jan 2019 10:36:02 GMT) Full text and rfc822 format available.

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

From: Mathew Handugan <mathew <at> handugan.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; process-contact for accepted sockets broken
Date: Fri, 18 Jan 2019 22:52:41 -0800
[Message part 1 (text/plain, inline)]
Git commit be9e60fc3c43cc49cc5d749924c3e96737ae297c  causes accepted
sockets to store 't as :host instead of the string-formatted peer IP
address.

This manifests as
 (process-contact proc)
returning something like
 (t 55269)

instead of the expected:
 ("192.168.2.13" 55269)

my clumsy attempt at a simple example:

(defun echo-server-filter (proc string) (print (format "%s %s"
(process-contact proc) string)))
(progn
  (setq echo-server-port 10000)
  (make-network-process :name "echo-server" :family 'ipv4 :service
echo-server-port :filter 'echo-server-filter :sentinel 'echo-server-filter
:server 't)
  (let ((client-process (open-network-stream "echo-client"
                             "*echo-client*" "localhost" echo-server-port)))
    (process-send-string client-process "hello world\n")
    (sleep-for 1)
    (delete-process client-process))
  (delete-process "echo-server")
  )
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34134; Package emacs. (Fri, 25 Jan 2019 08:08:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mathew Handugan <mathew <at> handugan.com>, Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 34134 <at> debbugs.gnu.org
Subject: Re: bug#34134: 27.0.50; process-contact for accepted sockets broken
Date: Fri, 25 Jan 2019 10:07:32 +0200
> From: Mathew Handugan <mathew <at> handugan.com>
> Date: Fri, 18 Jan 2019 22:52:41 -0800
> 
> Git commit be9e60fc3c43cc49cc5d749924c3e96737ae297c  causes accepted sockets to store 't as :host
> instead of the string-formatted peer IP address.
> 
> This manifests as 
>  (process-contact proc)
> returning something like
>  (t 55269)
> 
> instead of the expected:
>  ("192.168.2.13" 55269)

Thanks.  Paul, could you please take a look at this?




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Wed, 30 Jan 2019 23:14:02 GMT) Full text and rfc822 format available.

Notification sent to Mathew Handugan <mathew <at> handugan.com>:
bug acknowledged by developer. (Wed, 30 Jan 2019 23:14:03 GMT) Full text and rfc822 format available.

Message #13 received at 34134-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>, Mathew Handugan <mathew <at> handugan.com>
Cc: 34134-done <at> debbugs.gnu.org
Subject: Re: bug#34134: 27.0.50; process-contact for accepted sockets broken
Date: Wed, 30 Jan 2019 15:13:51 -0800
[Message part 1 (text/plain, inline)]
On 1/25/19 12:07 AM, Eli Zaretskii wrote:
>> From: Mathew Handugan <mathew <at> handugan.com>
>> Date: Fri, 18 Jan 2019 22:52:41 -0800
>>
>> Git commit be9e60fc3c43cc49cc5d749924c3e96737ae297c  causes accepted sockets to store 't as :host
>> instead of the string-formatted peer IP address.
>>
>> This manifests as
>>   (process-contact proc)
>> returning something like
>>   (t 55269)
>>
>> instead of the expected:
>>   ("192.168.2.13" 55269)
> Thanks.  Paul, could you please take a look at this?

Thanks for reporting the bug, especially the test case. I reproduce the 
problem and fixed it by installing the attached patch into the emacs-26 
branch on Savannah.

[0001-Fix-process-contact-bug-with-TCP-connections.patch (text/x-patch, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 28 Feb 2019 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 58 days ago.

Previous Next


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