Re: Segfaults with 1.6.1 (was: Re: Version 1.6.1)

2016-09-27 Thread Ondrej Zajicek
On Tue, Sep 27, 2016 at 10:44:31AM +0100, Justin Cattle wrote:
> >
> > I'm facing the same problem here:
> >
>
> Me too!

Hi

Here is a quick and dirty workaround.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 120eb90..486319f 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -1854,20 +1854,6 @@ sk_write(sock *s)
 }
 
 void
-sk_err(sock *s, int revents)
-{
-  int se = 0, sse = sizeof(se);
-  if (revents & POLLERR)
-if (getsockopt(s->fd, SOL_SOCKET, SO_ERROR, &se, &sse) < 0)
-{
-  log(L_ERR "IO: Socket error: SO_ERROR: %m");
-  se = 0;
-}
-
-  s->err_hook(s, se);
-}
-
-void
 sk_dump_all(void)
 {
   node *n;
@@ -2177,7 +2163,7 @@ io_loop(void)
 	  int steps;
 
 	  steps = MAX_STEPS;
-	  if (s->fast_rx && (pfd[s->index].revents & POLLIN) && s->rx_hook)
+	  if (s->fast_rx && (pfd[s->index].revents & (POLLIN | POLLHUP | POLLERR)) && s->rx_hook)
 		do
 		  {
 		steps--;
@@ -2199,7 +2185,6 @@ io_loop(void)
 		  goto next;
 		  }
 		while (e && steps);
-
 	  current_sock = sk_next(s);
 	next: ;
 	}
@@ -2223,26 +2208,18 @@ io_loop(void)
 		  goto next2;
 		}
 
-	  if (!s->fast_rx && (pfd[s->index].revents & POLLIN) && s->rx_hook)
+	  if (!s->fast_rx && (pfd[s->index].revents & (POLLIN | POLLHUP | POLLERR)) && s->rx_hook)
 		{
 		  count++;
 		  io_log_event(s->rx_hook, s->data);
 		  sk_read(s, pfd[s->index].revents);
 		  if (s != current_sock)
-		goto next2;
+		  goto next2;
 		}
-
-	  if (pfd[s->index].revents & (POLLHUP | POLLERR))
-		{
-		  sk_err(s, pfd[s->index].revents);
-		  goto next2;
-		}
-
 	  current_sock = sk_next(s);
 	next2: ;
 	}
 
-
 	  stored_sock = current_sock;
 	}
 }


signature.asc
Description: Digital signature


Re: Segfaults with 1.6.1 (was: Re: Version 1.6.1)

2016-09-27 Thread Justin Cattle
Me too!

Config:

#
# BIRD configuration
#
# Generated by Puppet, DO NOT EDIT!
#

log syslog { info, remote, warning, error, auth, fatal, bug };

router id 10.2.3.0;

# Filter that
filter bgp_import {
accept;
}

# Accept locally-generated host routes only
filter bgp_export {
if source ~ [RTS_STATIC, RTS_DEVICE, RTS_INHERIT] && net.len = 32 then
accept;
else reject;
}

# Set source and only accept BGP routes
filter kernel_export {
krt_prefsrc = 10.2.3.0;

if source = RTS_BGP then accept;
else reject;
}

protocol kernel {
persist; # Don't remove routes on bird shutdown
scan time 2; # Scan kernel routing table every 2 seconds
device routes;
import all;
export filter kernel_export;
learn on;
merge paths on; # Multipath
preference 230; # Prefer kernel routes to BGP/OSPF
}

protocol device {
scan time 2; # Scan interfaces every 2 seconds
}

protocol static {
}

protocol direct {
}

template bgp tor {
local as 4288283392;
bfd on;
import filter bgp_import;
export filter bgp_export;
}

protocol bgp tor1 from tor {
neighbor 10.2.4.0 as 65432;
}

protocol bgp tor2 from tor {
neighbor 10.2.4.128 as 65432;
}


protocol bfd {
interface "eth0" {
interval 1000 ms;
multiplier 4;
};
interface "eth1" {
interval 1000 ms;
multiplier 4;
};
}




Cheers,
Just

On 27 September 2016 at 09:50, Maximilian Wilhelm  wrote:

> Anno domini 2016 Tim Weippert scripsit:
>
> Hi,
>
> > On Thu, Sep 22, 2016 at 01:52:20PM +0200, Ondrej Filip wrote:
> > > Dear users,
> > > a new version of the 1.6.x branch is out:
> >
> > Nice job.
>
> Indeed.
>
> > But on one of my environment Bird 1.6.1 immediately segfaults. I tried
> > both the provided Debian package from cz.nic and also an recompile on my
> > own.
>
> > Both seems to have the same segfault. It tried something and think i can
> > narrow it down on an PIPE with ~ 500 routes for ipv4 and ~ 300 routes
> > for ipv6.
> >
> > If i disable this pipe, bird runs without problems, all BGP Peerings and
> > OSPF works ok. In another Environment, where muss less routes, i hadn't
> > an segfault since update.
> >
> > It seems only segfaults, when pipe to master/kernel and with "more"
> > routes. I tried some testing with:
> >
> > BGP Peering <-> T_BGP_PEER
> >
> > with 422 routes, but if i enable an Pipe from T_BPG_PEER <-> master,
> > bird segfaults.
> >
> > [103.489725] bird[17404]: segfault at 0 ip   (null) sp
> 7ffe5d057a68 error 14 in bird[5604b045a000+7]
> > [103.870901] bird[17735]: segfault at 0 ip   (null) sp
> 7ffcf41235f8 error 14 in bird[55b35dbdc000+7]
> >
> > Attached is an strace file. If you need my config, please give me a
> > short notice, i can provide it.
>
> I'm facing the same problem here:
>
> gw05.pad.ffho.net:~# dmesg -T | grep bird
> [Tue Sep 27 06:53:06 2016] bird[14102]: segfault at 0 ip (null) sp
> 7ffd855c52d8 error 14 in libnss_files-2.13.so[ 7f0ac813e000+b000]
> [Tue Sep 27 06:53:12 2016] bird6[14133]: segfault at 0 ip (null) sp
> 7fffe5a85f98 error 14 in libnss_files-2.13.so [7f50f6dce000+b000]
>
> We are using a PIPE protocol as well, handling 560 routes.
>
> I can provide you with the config as well, if needed.
>
> Best
> Max
>

-- 


Notice:  This email is confidential and may contain copyright material of 
members of the Ocado Group. Opinions and views expressed in this message 
may not necessarily reflect the opinions and views of the members of the 
Ocado Group. 

 

If you are not the intended recipient, please notify us immediately and 
delete all copies of this message. Please note that it is your 
responsibility to scan this message for viruses. 

 

Fetch and Sizzle are trading names of Speciality Stores Limited and Fabled 
is a trading name of Marie Claire Beauty Limited, both members of the Ocado 
Group.

 

References to the “Ocado Group” are to Ocado Group plc (registered in 
England and Wales with number 7098618) and its subsidiary undertakings (as 
that expression is defined in the Companies Act 2006) from time to time. 
 The registered office of Ocado Group plc is Titan Court, 3 Bishops Square, 
Hatfield Business Park, Hatfield, Herts. AL10 9NE.


Segfaults with 1.6.1 (was: Re: Version 1.6.1)

2016-09-27 Thread Maximilian Wilhelm
Anno domini 2016 Tim Weippert scripsit:

Hi,

> On Thu, Sep 22, 2016 at 01:52:20PM +0200, Ondrej Filip wrote:
> > Dear users,
> > a new version of the 1.6.x branch is out:
> 
> Nice job.

Indeed.

> But on one of my environment Bird 1.6.1 immediately segfaults. I tried
> both the provided Debian package from cz.nic and also an recompile on my
> own.

> Both seems to have the same segfault. It tried something and think i can
> narrow it down on an PIPE with ~ 500 routes for ipv4 and ~ 300 routes
> for ipv6.
> 
> If i disable this pipe, bird runs without problems, all BGP Peerings and
> OSPF works ok. In another Environment, where muss less routes, i hadn't
> an segfault since update.
> 
> It seems only segfaults, when pipe to master/kernel and with "more"
> routes. I tried some testing with:
> 
> BGP Peering <-> T_BGP_PEER 
> 
> with 422 routes, but if i enable an Pipe from T_BPG_PEER <-> master, 
> bird segfaults.
> 
> [103.489725] bird[17404]: segfault at 0 ip   (null) sp 
> 7ffe5d057a68 error 14 in bird[5604b045a000+7]
> [103.870901] bird[17735]: segfault at 0 ip   (null) sp 
> 7ffcf41235f8 error 14 in bird[55b35dbdc000+7]
> 
> Attached is an strace file. If you need my config, please give me a
> short notice, i can provide it.

I'm facing the same problem here:

gw05.pad.ffho.net:~# dmesg -T | grep bird
[Tue Sep 27 06:53:06 2016] bird[14102]: segfault at 0 ip (null) sp 
7ffd855c52d8 error 14 in libnss_files-2.13.so[ 7f0ac813e000+b000]
[Tue Sep 27 06:53:12 2016] bird6[14133]: segfault at 0 ip (null) sp 
7fffe5a85f98 error 14 in libnss_files-2.13.so [7f50f6dce000+b000]

We are using a PIPE protocol as well, handling 560 routes.

I can provide you with the config as well, if needed.

Best
Max


Re: Version 1.6.1

2016-09-26 Thread Tim Weippert
Hi Ondrej, 

On Mon, Sep 26, 2016 at 08:53:31PM +0200, Ondrej Zajicek wrote:
> On Mon, Sep 26, 2016 at 08:07:43PM +0200, Tim Weippert wrote:
> > But on one of my environment Bird 1.6.1 immediately segfaults. I tried
> > both the provided Debian package from cz.nic and also an recompile on my
> > own.
> 
> Hi
> 
> Could you send me your config file, bird binary and core dump?

Send it directly to you, maybe it isn't interesting for the list :)

regards, 
tim

-- 
Tim Weippert
http://weiti.org - we...@weiti.org
GPG Fingerprint - E704 7303 6FF0 8393 ADB1  398E 67F2 94AE 5995 7DD8


Re: Version 1.6.1

2016-09-26 Thread Ondrej Zajicek
On Mon, Sep 26, 2016 at 08:07:43PM +0200, Tim Weippert wrote:
> But on one of my environment Bird 1.6.1 immediately segfaults. I tried
> both the provided Debian package from cz.nic and also an recompile on my
> own.

Hi

Could you send me your config file, bird binary and core dump?

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."


signature.asc
Description: Digital signature


Re: Version 1.6.1

2016-09-26 Thread Christian Tacke
Hi Toke,


On Thu, Sep 22, 2016 at 18:34:18 +0200, Toke Høiland-Jørgensen wrote:
[...]
> > The docs claim babel in bird to be "alpha". Is that still true?
> 
> Would say so. There are no known bugs, but it lacks some features; the
> most obvious one being that it only speaks IPv6 (because Bird lacks
> dual-stack support).
[...]

So for non production, that sounds as good as ospf3,
really.


> Nope. The IETF working group has only just been formed a couple of
> months ago, and so there's not a consensus on what form any security
> features of Babel would take. Once we get around to discussing the
> security features I'll start thinking about implementing it, but until
> then, no auth...

Thanks for the info!

I hope, some auth is somewhere on the list. Because,
really, ipsec isn't fun, as we all know.

> -Toke

Christian


-- 
www.cosmokey.com


Re: Version 1.6.1

2016-09-22 Thread Toke Høiland-Jørgensen
Christian Tacke  writes:

> Hi,
>
> On Thu, Sep 22, 2016 at 13:52:20 +0200, Ondrej Filip wrote:
>> Dear users,
>> a new version of the 1.6.x branch is out:
>> 
>> Version 1.6.1 (2016-09-22)
>
> Cool!
>
> [...]
>>   o Several updates and fixes in Babel protocol
> [...]
>
> The docs claim babel in bird to be "alpha". Is that still true?

Would say so. There are no known bugs, but it lacks some features; the
most obvious one being that it only speaks IPv6 (because Bird lacks
dual-stack support).

Feel free to take it for a spin and report any bugs you find, though! :)

> BTW: Does babel have some authentication?

Nope. The IETF working group has only just been formed a couple of
months ago, and so there's not a consensus on what form any security
features of Babel would take. Once we get around to discussing the
security features I'll start thinking about implementing it, but until
then, no auth...

-Toke


Re: Version 1.6.1

2016-09-22 Thread Justin Cattle
Great :)
Any idea when the ubuntu packages will hit the PPA?



Cheers,
Just

On 22 September 2016 at 12:52, Ondrej Filip  wrote:

> Dear users,
> a new version of the 1.6.x branch is out:
>
> Version 1.6.1 (2016-09-22)
>   o Support for IPv6 ECMP
>   o Better handling of IPv6 tentative addresses
>   o Several updates and fixes in Babel protocol
>   o Filter: New !~ operator
>   o Filter: ASN ranges in bgpmask
>   o KRT: New kernel protocol option 'metric'
>   o KRT: New route attribute 'krt_scope'
>   o Improved BIRD help messages
>   o Fixes memory leak in BGP multipath
>   o Fixes handling of empty path segments in BGP AS_PATH
>   o Several bug fixes
>
> Enjoy it!
>
> Ondrej
>

-- 


Notice:  This email is confidential and may contain copyright material of 
members of the Ocado Group. Opinions and views expressed in this message 
may not necessarily reflect the opinions and views of the members of the 
Ocado Group. 

 

If you are not the intended recipient, please notify us immediately and 
delete all copies of this message. Please note that it is your 
responsibility to scan this message for viruses. 

 

Fetch and Sizzle are trading names of Speciality Stores Limited and Fabled 
is a trading name of Marie Claire Beauty Limited, both members of the Ocado 
Group.

 

References to the “Ocado Group” are to Ocado Group plc (registered in 
England and Wales with number 7098618) and its subsidiary undertakings (as 
that expression is defined in the Companies Act 2006) from time to time. 
 The registered office of Ocado Group plc is Titan Court, 3 Bishops Square, 
Hatfield Business Park, Hatfield, Herts. AL10 9NE.


Re: Version 1.6.1

2016-09-22 Thread Christian Tacke
Hi,

On Thu, Sep 22, 2016 at 13:52:20 +0200, Ondrej Filip wrote:
> Dear users,
> a new version of the 1.6.x branch is out:
> 
> Version 1.6.1 (2016-09-22)

Cool!


[...]
>   o Several updates and fixes in Babel protocol
[...]

The docs claim babel in bird to be "alpha".
Is that still true?

BTW: Does babel have some authentication?


Cheers

Christian

-- 
www.cosmokey.com


Re: Version 1.6.1

2016-09-22 Thread Ondrej Zajicek
On Thu, Sep 22, 2016 at 03:13:11PM +0300, Vasiliy Tolstov wrote:
> 2016-09-22 14:52 GMT+03:00 Ondrej Filip :
> > Dear users,
> > a new version of the 1.6.x branch is out:
> >
> > Version 1.6.1 (2016-09-22)
> >   o Support for IPv6 ECMP
> 
> 
> Thanks! Does this mean that ecmp for ipv6 work for ospf recieved routes?

Yes, that should work, as well as BGP multipath routes.

The only think that does not work is learning alien IPv6 ECMP routes from
the kernel routing table.

Thanks to Mikhail Sennikovskii for the original work on the IPv6 ECMP in BIRD.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."


signature.asc
Description: Digital signature


Re: Version 1.6.1

2016-09-22 Thread Vasiliy Tolstov
2016-09-22 14:52 GMT+03:00 Ondrej Filip :
> Dear users,
> a new version of the 1.6.x branch is out:
>
> Version 1.6.1 (2016-09-22)
>   o Support for IPv6 ECMP


Thanks! Does this mean that ecmp for ipv6 work for ospf recieved routes?

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru


Version 1.6.1

2016-09-22 Thread Ondrej Filip
Dear users,
a new version of the 1.6.x branch is out:

Version 1.6.1 (2016-09-22)
  o Support for IPv6 ECMP
  o Better handling of IPv6 tentative addresses
  o Several updates and fixes in Babel protocol
  o Filter: New !~ operator
  o Filter: ASN ranges in bgpmask
  o KRT: New kernel protocol option 'metric'
  o KRT: New route attribute 'krt_scope'
  o Improved BIRD help messages
  o Fixes memory leak in BGP multipath
  o Fixes handling of empty path segments in BGP AS_PATH
  o Several bug fixes

Enjoy it!

Ondrej