[exim-dev] [Bug 1775] test 0564 fails to bind to socket and dies, leaving spool/test/log around

2016-11-04 Thread admin
https://bugs.exim.org/show_bug.cgi?id=1775

Heiko Schlittermann  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #6 from Heiko Schlittermann  ---
Fixed with df613eb4a1b

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1775] test 0564 fails to bind to socket and dies, leaving spool/test/log around

2016-10-19 Thread admin
https://bugs.exim.org/show_bug.cgi?id=1775

Git Commit  changed:

   What|Removed |Added

 CC||g...@exim.org

--- Comment #5 from Git Commit  ---
Git commit:
http://git.exim.org/exim.git/commitdiff/df613eb4a1b386c3b57baf09a25511894460b9b1

commit df613eb4a1b386c3b57baf09a25511894460b9b1
Author: Heiko Schlittermann (HS12-RIPE) 
AuthorDate: Wed Oct 19 16:56:37 2016 +0200
Commit: Heiko Schlittermann (HS12-RIPE) 
CommitDate: Thu Oct 20 00:48:28 2016 +0200

testsuite: add port_dynamic (bug 1775)

this avoids problems on openbsd with so_reuseaddr.

on openbsd so_reuseaddr only works if the ip address and the euid
of the bind(2) calls match. in 0562 exim binds to 1225 as euid=0,
in 0564 runtest tries to bind to 01225 as the user running the tests.

thanks to kirill miazine for working this out.

 test/runtest | 40 ++--
 test/scripts/-Basic/0564 |  4 ++--
 test/stdout/0564 |  2 +-
 3 files changed, 29 insertions(+), 17 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1775] test 0564 fails to bind to socket and dies, leaving spool/test/log around

2016-10-18 Thread admin
https://bugs.exim.org/show_bug.cgi?id=1775

Heiko Schlittermann  changed:

   What|Removed |Added

   Assignee|jgh146...@wizmail.org   |h...@schlittermann.de

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1775] test 0564 fails to bind to socket and dies, leaving spool/test/log around

2016-10-18 Thread admin
https://bugs.exim.org/show_bug.cgi?id=1775

--- Comment #4 from Kirill Miazine  ---
Missing / in the URL in previous comment:

http://bxr.su/OpenBSD/sys/netinet/in_pcb.c#434

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1775] test 0564 fails to bind to socket and dies, leaving spool/test/log around

2016-10-18 Thread admin
https://bugs.exim.org/show_bug.cgi?id=1775

Kirill Miazine  changed:

   What|Removed |Added

Version|4.86+ HEAD  |4.87
   Target Milestone|Exim 4.87   |Exim 4.88
 CC||h...@schlittermann.de

--- Comment #3 from Kirill Miazine  ---
I've been looking at this a bit more and had to dig down to the kernel. It
seems that EADDRINUSE will be returned if existing socket and new socket are
set up by different users:  

http://bxr.su/OpenBSD/sys/netinetin_pcb.c#434

This looks indeed to be the case, change was introduced here:

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/netinet/in_pcb.c.diff?r1=1.8&r2=1.9&f=h

After adding some debugging to the kernel and re-running the test, I got a
confirmation that the different socket owners are indeed the reason for
EADDRINUSE:

EADDRINUSE! so->so_euid (1000) != t->inp_socket->so_euid (0)

In test 0562 the socket is set up as user root, while runtest in 0564 uses my
own user id to set up the socket.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1775] test 0564 fails to bind to socket and dies, leaving spool/test/log around

2016-01-27 Thread admin
https://bugs.exim.org/show_bug.cgi?id=1775

--- Comment #2 from Kirill Miazine  ---
I understand there may be doubts about adding a retry mechanism to attempt to
bind() several times. Exim itself has this commeint in daemon.c:

/* Now bind the socket to the required port; if Exim is being restarted
it may not always be possible to bind immediately, even with SO_REUSEADDR
set, so try 10 times, waiting between each try. After 10 failures, we give
up. In an IPv6 environment, if bind () fails with the error EADDRINUSE and
we are doing wildcard IPv4 listening and there was a previous IPv6 wildcard
address for the same port, ignore the error on the grounds that we must be
in a system where the IPv6 socket accepts both kinds of call. This is
necessary for (some release of) USAGI Linux; other IP stacks fail at the
listen() stage instead. */

Why not have the same in the tests?

In any case, the mkdirs could anyway be moved till after bind() has been
successful.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1775] test 0564 fails to bind to socket and dies, leaving spool/test/log around

2016-01-13 Thread admin
https://bugs.exim.org/show_bug.cgi?id=1775

--- Comment #1 from Kirill Miazine  ---
test/src/server.c should have a similar retry mechanism, as some tests using
this server fail with

IPv4 socket bind() failed: Address already in use

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1775] test 0564 fails to bind to socket and dies, leaving spool/test/log around

2016-01-12 Thread admin
https://bugs.exim.org/show_bug.cgi?id=1775

Kirill Miazine  changed:

   What|Removed |Added

   Hardware|x86 |x86-64

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1775] test 0564 fails to bind to socket and dies, leaving spool/test/log around

2016-01-12 Thread admin
https://bugs.exim.org/show_bug.cgi?id=1775

Kirill Miazine  changed:

   What|Removed |Added

   Assignee|ni...@exim.org  |jgh146...@wizmail.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##