Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frr 4.x fails to start with an active tun interface on FreeBSD #2338

Closed
mdtancsa opened this issue May 31, 2018 · 9 comments
Closed

frr 4.x fails to start with an active tun interface on FreeBSD #2338

mdtancsa opened this issue May 31, 2018 · 9 comments
Assignees
Labels

Comments

@mdtancsa
Copy link
Contributor

mdtancsa commented May 31, 2018

I noticed that if a tunnel interface created by OpenVPN on FreeBSD 11 (AMD64) is active at the time zebra tries to start up, it fails.

 ./zebra
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 12:26:46 warnings: ZEBRA: ifam_read() doesn't read all socket data
core_handler: showing active allocations in memory group libfrr
core_handler: memstats:  Work queue name string        :      1 *         22
core_handler: memstats:  Work queue item               :      1 *         24
core_handler: memstats:  Work queue                    :      2 * (variably sized)
core_handler: memstats:  VRF                           :      1 *        160
core_handler: memstats:  Vector index                  :   2637 * (variably sized)
core_handler: memstats:  Vector                        :   2637 *         16
core_handler: memstats:  Thread stats                  :      3 *         64
core_handler: memstats:  Thread master                 :      3 * (variably sized)
core_handler: memstats:  Thread                        :     17 * (variably sized)
core_handler: memstats:  Route node                    :    126 * (variably sized)
core_handler: memstats:  Route table                   :     28 *         48
core_handler: memstats:  Prefix                        :     38 *         40
core_handler: memstats:  Priority queue data           :      1 *        256
core_handler: memstats:  Priority queue                :      1 *         32
core_handler: memstats:  Logical-Router Name           :      1 *         23
core_handler: memstats:  Logical-Router                :      1 *         72
core_handler: memstats:  Nexthop                       :     38 *        112
core_handler: memstats:  Temporary memory              :     15 * (variably sized)
core_handler: memstats:  Logging                       :      1 *         72
core_handler: memstats:  Link Node                     :    145 *         24
core_handler: memstats:  Link List                     :     67 *         40
core_handler: memstats:  Connected                     :     20 *         40
core_handler: memstats:  Interface                     :     13 *        400
core_handler: memstats:  Hook entry                    :      2 *         48
core_handler: memstats:  Hash Index                    :     45 * (variably sized)
core_handler: memstats:  Hash Bucket                   :    389 *         32
core_handler: memstats:  Hash                          :     90 * (variably sized)
core_handler: memstats:  Graph Node                    :   1306 *         32
core_handler: memstats:  Graph                         :     11 *          8
core_handler: memstats:  Command Argument Name         :    101 * (variably sized)
core_handler: memstats:  Command Token Help            :    855 * (variably sized)
core_handler: memstats:  Command Token Text            :    855 * (variably sized)
core_handler: memstats:  Command Tokens                :   1060 *         72
core_handler: memstats:  Host config                   :      1 *         23
core_handler: showing active allocations in memory group zebra
core_handler: memstats:  Zebra Name Space              :      1 *         88
core_handler: memstats:  RIB table info                :      4 *         16
core_handler: memstats:  RIB destination               :     38 *         48
core_handler: memstats:  Route Entry                   :     38 *         88
core_handler: memstats:  ZEBRA VRF                     :      1 *       8888
core_handler: showing active allocations in memory group Label Manager
Abort

Starting with truss shows

...

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             ERR#22 'Invalid argument'
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
errors: write(2,"errors: ",8)                            = 8 (0x8)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
if_ioctl(SIOCGIFMEDIA) failed: Invalid argumentwrite(2,"if_ioctl(SIOCGIFMEDIA) failed: I"...,47) = 47 (0x2f)

write(2,"\n",1)                                  = 1 (0x1)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             ERR#22 'Invalid argument'
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
errors: write(2,"errors: ",8)                            = 8 (0x8)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
if_ioctl(SIOCGIFMEDIA) failed: Invalid argumentwrite(2,"if_ioctl(SIOCGIFMEDIA) failed: I"...,47) = 47 (0x2f)

write(2,"\n",1)                                  = 1 (0x1)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             ERR#22 'Invalid argument'
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
errors: write(2,"errors: ",8)                            = 8 (0x8)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
if_ioctl(SIOCGIFMEDIA) failed: Invalid argumentwrite(2,"if_ioctl(SIOCGIFMEDIA) failed: I"...,47) = 47 (0x2f)

write(2,"\n",1)                                  = 1 (0x1)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             ERR#22 'Invalid argument'
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
errors: write(2,"errors: ",8)                            = 8 (0x8)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
if_ioctl(SIOCGIFMEDIA) failed: Invalid argumentwrite(2,"if_ioctl(SIOCGIFMEDIA) failed: I"...,47) = 47 (0x2f)

write(2,"\n",1)                                  = 1 (0x1)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             ERR#22 'Invalid argument'
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
errors: write(2,"errors: ",8)                            = 8 (0x8)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
if_ioctl(SIOCGIFMEDIA) failed: Invalid argumentwrite(2,"if_ioctl(SIOCGIFMEDIA) failed: I"...,47) = 47 (0x2f)

write(2,"\n",1)                                  = 1 (0x1)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             ERR#22 'Invalid argument'
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
errors: write(2,"errors: ",8)                            = 8 (0x8)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
if_ioctl(SIOCGIFMEDIA) failed: Invalid argumentwrite(2,"if_ioctl(SIOCGIFMEDIA) failed: I"...,47) = 47 (0x2f)

write(2,"\n",1)                                  = 1 (0x1)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             ERR#22 'Invalid argument'
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
errors: write(2,"errors: ",8)                            = 8 (0x8)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
if_ioctl(SIOCGIFMEDIA) failed: Invalid argumentwrite(2,"if_ioctl(SIOCGIFMEDIA) failed: I"...,47) = 47 (0x2f)

write(2,"\n",1)                                  = 1 (0x1)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             ERR#22 'Invalid argument'
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
errors: write(2,"errors: ",8)                            = 8 (0x8)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
if_ioctl(SIOCGIFMEDIA) failed: Invalid argumentwrite(2,"if_ioctl(SIOCGIFMEDIA) failed: I"...,47) = 47 (0x2f)

write(2,"\n",1)                                  = 1 (0x1)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             ERR#22 'Invalid argument'
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
errors: write(2,"errors: ",8)                            = 8 (0x8)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
if_ioctl(SIOCGIFMEDIA) failed: Invalid argumentwrite(2,"if_ioctl(SIOCGIFMEDIA) failed: I"...,47) = 47 (0x2f)

write(2,"\n",1)                                  = 1 (0x1)
write(5,"\^A",1)                                 = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMTU,0x7fffffffe7e8)               = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMETRIC,0x7fffffffe7e8)            = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
write(5,"\^A",1)                                 = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMTU,0x7fffffffe7e8)               = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMETRIC,0x7fffffffe7e8)            = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
write(5,"\^A",1)                                 = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMTU,0x7fffffffe7e8)               = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMETRIC,0x7fffffffe7e8)            = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
write(5,"\^A",1)                                 = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMTU,0x7fffffffe7e8)               = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMETRIC,0x7fffffffe7e8)            = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
write(5,"\^A",1)                                 = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMTU,0x7fffffffe7e8)               = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMETRIC,0x7fffffffe7e8)            = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
write(5,"\^A",1)                                 = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMTU,0x7fffffffe7e8)               = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMETRIC,0x7fffffffe7e8)            = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
write(5,"\^A",1)                                 = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMTU,0x7fffffffe7e8)               = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMETRIC,0x7fffffffe7e8)            = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFFLAGS,0x7fffffffe628)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMEDIA,0x7fffffffe5f0)             = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
write(5,"\^A",1)                                 = 1 (0x1)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMTU,0x7fffffffe7e8)               = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
seteuid(0x0)                                     = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,0)                     = 8 (0x8)
ioctl(8,SIOCGIFMETRIC,0x7fffffffe7e8)            = 0 (0x0)
seteuid(0xa8)                                    = 0 (0x0)
close(8)                                         = 0 (0x0)
2018/05/31 13:05:47 write(2,"2018/05/31 13:05:47 ",20)           = 20 (0x14)
warnings: write(2,"warnings: ",10)                       = 10 (0xa)
ZEBRA: write(2,"ZEBRA: ",7)                              = 7 (0x7)
ifam_read() doesn't read all socket datawrite(2,"ifam_read() doesn't read all soc"...,40) = 40 (0x28)

write(2,"\n",1)                                  = 1 (0x1)
SIGNAL 11 (SIGSEGV) code=SEGV_MAPERR trapno=12 addr=0x20
sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 }) = 0 (0x0)
sigaction(SIGALRM,{ SIG_DFL 0x0 ss_t },{ 0x801594d70 SA_SIGINFO ss_t }) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },0x0) = 0 (0x0)
sigprocmask(SIG_UNBLOCK,{ SIGALRM },0x0)         = 0 (0x0)
setitimer(0,{ 0.000000, 1.000000 },{ 0.000000, 0.000000 }) = 0 (0x0)
openat(AT_FDCWD,"/var/tmp/quagga.zebra.crashlog",O_WRONLY|O_CREAT|O_EXCL,0600) ERR#17 'File exists'
openat(AT_FDCWD,"/var/tmp/quagga.zebra.crashlog",O_WRONLY|O_CREAT|O_EXCL,0600) ERR#17 'File exists'
__sysctl(0x800b24e50,0x4,0x7fffffffd280,0x7fffffffd278,0x0,0x0) = 0 (0x0)
openat(AT_FDCWD,"/usr/ports/net/frr/work/frr-frr-4.0/zebra/.libs/zebra",O_RDONLY,00) ERR#13 'Permission denied'
core_handler: showing active allocations in memory group libfrr
write(2,"core_handler: showing active all"...,64) = 64 (0x40)
core_handler: memstats:  Work queue name string        :      1 *         22
write(2,"core_handler: memstats:  Work qu"...,77) = 77 (0x4d)
core_handler: memstats:  Work queue item               :      1 *         24
write(2,"core_handler: memstats:  Work qu"...,77) = 77 (0x4d)
core_handler: memstats:  Work queue                    :      2 * (variably sized)
write(2,"core_handler: memstats:  Work qu"...,83) = 83 (0x53)
core_handler: memstats:  VRF                           :      1 *        160
write(2,"core_handler: memstats:  VRF    "...,77) = 77 (0x4d)
core_handler: memstats:  Vector index                  :   2637 * (variably sized)
write(2,"core_handler: memstats:  Vector "...,83) = 83 (0x53)
core_handler: memstats:  Vector                        :   2637 *         16
write(2,"core_handler: memstats:  Vector "...,77) = 77 (0x4d)
core_handler: memstats:  Thread stats                  :      3 *         64
write(2,"core_handler: memstats:  Thread "...,77) = 77 (0x4d)
core_handler: memstats:  Thread master                 :      3 * (variably sized)
write(2,"core_handler: memstats:  Thread "...,83) = 83 (0x53)
core_handler: memstats:  Thread                        :     17 * (variably sized)
write(2,"core_handler: memstats:  Thread "...,83) = 83 (0x53)
core_handler: memstats:  Route node                    :    126 * (variably sized)
write(2,"core_handler: memstats:  Route n"...,83) = 83 (0x53)
core_handler: memstats:  Route table                   :     28 *         48
write(2,"core_handler: memstats:  Route t"...,77) = 77 (0x4d)
core_handler: memstats:  Prefix                        :     38 *         40
write(2,"core_handler: memstats:  Prefix "...,77) = 77 (0x4d)
core_handler: memstats:  Priority queue data           :      1 *        256
write(2,"core_handler: memstats:  Priorit"...,77) = 77 (0x4d)
core_handler: memstats:  Priority queue                :      1 *         32
write(2,"core_handler: memstats:  Priorit"...,77) = 77 (0x4d)
core_handler: memstats:  Logical-Router Name           :      1 *         23
write(2,"core_handler: memstats:  Logical"...,77) = 77 (0x4d)
core_handler: memstats:  Logical-Router                :      1 *         72
write(2,"core_handler: memstats:  Logical"...,77) = 77 (0x4d)
core_handler: memstats:  Nexthop                       :     38 *        112
write(2,"core_handler: memstats:  Nexthop"...,77) = 77 (0x4d)
core_handler: memstats:  Temporary memory              :     15 * (variably sized)
write(2,"core_handler: memstats:  Tempora"...,83) = 83 (0x53)
core_handler: memstats:  Logging                       :      1 *         72
write(2,"core_handler: memstats:  Logging"...,77) = 77 (0x4d)
core_handler: memstats:  Link Node                     :    145 *         24
write(2,"core_handler: memstats:  Link No"...,77) = 77 (0x4d)
core_handler: memstats:  Link List                     :     67 *         40
write(2,"core_handler: memstats:  Link Li"...,77) = 77 (0x4d)
core_handler: memstats:  Connected                     :     20 *         40
write(2,"core_handler: memstats:  Connect"...,77) = 77 (0x4d)
core_handler: memstats:  Interface                     :     13 *        400
write(2,"core_handler: memstats:  Interfa"...,77) = 77 (0x4d)
core_handler: memstats:  Hook entry                    :      2 *         48
write(2,"core_handler: memstats:  Hook en"...,77) = 77 (0x4d)
core_handler: memstats:  Hash Index                    :     45 * (variably sized)
write(2,"core_handler: memstats:  Hash In"...,83) = 83 (0x53)
core_handler: memstats:  Hash Bucket                   :    389 *         32
write(2,"core_handler: memstats:  Hash Bu"...,77) = 77 (0x4d)
core_handler: memstats:  Hash                          :     90 * (variably sized)
write(2,"core_handler: memstats:  Hash   "...,83) = 83 (0x53)
core_handler: memstats:  Graph Node                    :   1306 *         32
write(2,"core_handler: memstats:  Graph N"...,77) = 77 (0x4d)
core_handler: memstats:  Graph                         :     11 *          8
write(2,"core_handler: memstats:  Graph  "...,77) = 77 (0x4d)
core_handler: memstats:  Command Argument Name         :    101 * (variably sized)
write(2,"core_handler: memstats:  Command"...,83) = 83 (0x53)
core_handler: memstats:  Command Token Help            :    855 * (variably sized)
write(2,"core_handler: memstats:  Command"...,83) = 83 (0x53)
core_handler: memstats:  Command Token Text            :    855 * (variably sized)
write(2,"core_handler: memstats:  Command"...,83) = 83 (0x53)
core_handler: memstats:  Command Tokens                :   1060 *         72
write(2,"core_handler: memstats:  Command"...,77) = 77 (0x4d)
core_handler: memstats:  Host config                   :      1 *         23
write(2,"core_handler: memstats:  Host co"...,77) = 77 (0x4d)
core_handler: showing active allocations in memory group zebra
write(2,"core_handler: showing active all"...,63) = 63 (0x3f)
core_handler: memstats:  Zebra Name Space              :      1 *         88
write(2,"core_handler: memstats:  Zebra N"...,77) = 77 (0x4d)
core_handler: memstats:  RIB table info                :      4 *         16
write(2,"core_handler: memstats:  RIB tab"...,77) = 77 (0x4d)
core_handler: memstats:  RIB destination               :     38 *         48
write(2,"core_handler: memstats:  RIB des"...,77) = 77 (0x4d)
core_handler: memstats:  Route Entry                   :     38 *         88
write(2,"core_handler: memstats:  Route E"...,77) = 77 (0x4d)
core_handler: memstats:  ZEBRA VRF                     :      1 *       8888
write(2,"core_handler: memstats:  ZEBRA V"...,77) = 77 (0x4d)
core_handler: showing active allocations in memory group Label Manager
write(2,"core_handler: showing active all"...,71) = 71 (0x47)
sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },0x0) = 0 (0x0)
thr_self(0x7fffffffda70)                         = 0 (0x0)
thr_kill(100569,SIGABRT)                         = 0 (0x0)
SIGNAL 6 (SIGABRT) code=SI_LWP pid=51023 uid=0
process killed, signal = 6

 11.2-BETA2 #3 r334152

If openvpn is not running, it starts up, but still with many warnings that 3.x did not generate:

 ./zebra
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/05/31 13:06:54 warnings: ZEBRA: Disabling MPLS support (no kernel support)

This is from the port
config.log shows

$ ./configure --enable-user=frr --enable-group=frr --enable-vty-group=frrvty --sysconfdir=/usr/local/etc/frr --localstatedir=/var/run/frr --disable-nhrpd --disable-pimd --disable-fpm --disable-ldpd --without-libpam --disable-rpki --disable-shell-access --disable-tcmalloc --disable-tcp-zebra --enable-vtysh --prefix=/usr/local --mandir=/usr/local/man --disable-silent-rules --infodir=/usr/local/info/ --build=amd64-portbld-freebsd11.2

## --------- ##
## Platform. ##
## --------- ##
@mdtancsa
Copy link
Contributor Author

mdtancsa commented May 31, 2018

compiling with debug flags,

Program received signal SIGSEGV, Segmentation fault.
0x000000000040ec84 in connected_up (ifp=0x8022e4a00, ifc=0x8022bcc80) at zebra/connected.c:212
212             PREFIX_COPY(&p, CONNECTED_PREFIX(ifc));
Current language:  auto; currently minimal
(gdb) where
#0  0x000000000040ec84 in connected_up (ifp=0x8022e4a00, ifc=0x8022bcc80) at zebra/connected.c:212
#1  0x000000000041035c in connected_announce (ifp=0x8022e4a00, ifc=0x8022bcc80) at zebra/connected.c:92
#2  0x000000000040f51a in connected_update (ifp=0x8022e4a00, ifc=0x8022bcc80) at zebra/connected.c:197
#3  0x000000000040fd69 in connected_add_ipv6 (ifp=0x8022e4a00, flags=2, addr=0x7fffffffe830, prefixlen=64 '@', label=0x0) at zebra/connected.c:526
#4  0x000000000041c660 in ifam_read (ifam=0x8022d4190) at zebra/kernel_socket.c:773
#5  0x000000000041189f in interface_list (zns=0x8022552a0) at zebra/if_sysctl.c:126
#6  0x00000000004340cb in zebra_ns_enable (ns_id=0, info=0x69d228) at zebra/zebra_ns.c:55
#7  0x0000000000434174 in zebra_ns_init () at zebra/zebra_ns.c:84
#8  0x00000000004205e1 in main (argc=1, argv=0x7fffffffeaa0) at zebra/main.c:307
(gdb) list
307             zebra_ns_init();
308
309             zebra_vty_init();
310             access_list_init();
311             prefix_list_init();
312     #if defined(HAVE_RTADV)
313             rtadv_cmd_init();
314     #endif
315     /* PTM socket */
316     #ifdef ZEBRA_PTM_SUPPORT
(gdb) up 0
#0  0x000000000040ec84 in connected_up (ifp=0x8022e4a00, ifc=0x8022bcc80) at zebra/connected.c:212
212             PREFIX_COPY(&p, CONNECTED_PREFIX(ifc));
(gdb) list
207             };
208
209             if (!CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))
210                     return;
211
212             PREFIX_COPY(&p, CONNECTED_PREFIX(ifc));
213
214             /* Apply mask to the network. */
215             apply_mask(&p);
216
(gdb) bt full
#0  0x000000000040ec84 in connected_up (ifp=0x8022e4a00, ifc=0x8022bcc80) at zebra/connected.c:212
        afi = 0
        p = {family = 40 '(', prefixlen = 0 '\0', u = {prefix = 0 '\0', prefix4 = {s_addr = 0}, prefix6 = {__u6_addr = {__u6_addr8 = 0x7fffffffe618 "", __u6_addr16 = 0x7fffffffe618, 
        __u6_addr32 = 0x7fffffffe618}}, lp = {id = {s_addr = 0}, adv_router = {s_addr = 0}}, prefix_eth = {octet = 0x7fffffffe618 ""}, val = 0x7fffffffe618 "", ptr = 0, prefix_evpn = {
      route_type = 0 '\0', ip_prefix_length = 0 '\0', mac = {octet = 0x7fffffffe61a ""}, eth_tag = 36424832, ip = {ipa_type = 8, ip = {addr = 0 '\0', _v4_addr = {s_addr = 36588032}, 
          _v6_addr = {__u6_addr = {__u6_addr8 = 0x7fffffffe628 "", __u6_addr16 = 0x7fffffffe628, __u6_addr32 = 0x7fffffffe628}}}}}}}
        nh = {next = 0x0, prev = 0x0, ifindex = 13, type = NEXTHOP_TYPE_IFINDEX, flags = 0 '\0', {gate = {ipv4 = {s_addr = 0}, ipv6 = {__u6_addr = {__u6_addr8 = 0x7fffffffe524 "", 
          __u6_addr16 = 0x7fffffffe524, __u6_addr32 = 0x7fffffffe524}}}, bh_type = BLACKHOLE_UNSPEC}, src = {ipv4 = {s_addr = 0}, ipv6 = {__u6_addr = {__u6_addr8 = 0x7fffffffe534 "", 
        __u6_addr16 = 0x7fffffffe534, __u6_addr32 = 0x7fffffffe534}}}, rmap_src = {ipv4 = {s_addr = 0}, ipv6 = {__u6_addr = {__u6_addr8 = 0x7fffffffe544 "", 
        __u6_addr16 = 0x7fffffffe544, __u6_addr32 = 0x7fffffffe544}}}, resolved = 0x0, rparent = 0x0, nh_label_type = ZEBRA_LSP_NONE, nh_label = 0x0}
#1  0x000000000041035c in connected_announce (ifp=0x8022e4a00, ifc=0x8022bcc80) at zebra/connected.c:92
No locals.
#2  0x000000000040f51a in connected_update (ifp=0x8022e4a00, ifc=0x8022bcc80) at zebra/connected.c:197
        current = (struct connected *) 0x0
#3  0x000000000040fd69 in connected_add_ipv6 (ifp=0x8022e4a00, flags=2, addr=0x7fffffffe830, prefixlen=64 '@', label=0x0) at zebra/connected.c:526
        p = (struct prefix_ipv6 *) 0x8022bccb0
        ifc = (struct connected *) 0x8022bcc80
#4  0x000000000041c660 in ifam_read (ifam=0x8022d4190) at zebra/kernel_socket.c:773
        ifp = (struct interface *) 0x8022e4a00
        addr = {sa = {sa_len = 28 '\034', sa_family = 28 '\034', sa_data = 0x7fffffffe82a ""}, sin = {sin_len = 28 '\034', sin_family = 28 '\034', sin_port = 0, sin_addr = {s_addr = 0}, 
    sin_zero = 0x7fffffffe830 "þ\200"}, sin6 = {sin6_len = 28 '\034', sin6_family = 28 '\034', sin6_port = 0, sin6_flowinfo = 0, sin6_addr = {__u6_addr = {
        __u6_addr8 = 0x7fffffffe830 "þ\200", __u6_addr16 = 0x7fffffffe830, __u6_addr32 = 0x7fffffffe830}}, sin6_scope_id = 13}}
        mask = {sa = {sa_len = 28 '\034', sa_family = 28 '\034', sa_data = 0x7fffffffe80a ""}, sin = {sin_len = 28 '\034', sin_family = 28 '\034', sin_port = 0, sin_addr = {s_addr = 0}, 
    sin_zero = 0x7fffffffe810 "ÿÿÿÿÿÿÿÿ"}, sin6 = {sin6_len = 28 '\034', sin6_family = 28 '\034', sin6_port = 0, sin6_flowinfo = 0, sin6_addr = {__u6_addr = {
        __u6_addr8 = 0x7fffffffe810 "ÿÿÿÿÿÿÿÿ", __u6_addr16 = 0x7fffffffe810, __u6_addr32 = 0x7fffffffe810}}, sin6_scope_id = 0}}
        brd = {sa = {sa_len = 0 '\0', sa_family = 0 '\0', sa_data = 0x7fffffffe7ea ""}, sin = {sin_len = 0 '\0', sin_family = 0 '\0', sin_port = 0, sin_addr = {s_addr = 0}, 
    sin_zero = 0x7fffffffe7f0 ""}, sin6 = {sin6_len = 0 '\0', sin6_family = 0 '\0', sin6_port = 0, sin6_flowinfo = 0, sin6_addr = {__u6_addr = {__u6_addr8 = 0x7fffffffe7f0 "", 
        __u6_addr16 = 0x7fffffffe7f0, __u6_addr32 = 0x7fffffffe7f0}}, sin6_scope_id = 0}}
        ifname = 0x7fffffffe860 ""
        ifnlen = 0
        isalias = 0 '\0'
        flags = 2
#5  0x000000000041189f in interface_list (zns=0x8022552a0) at zebra/if_sysctl.c:126
        ref = 0x8022d3000 "à"
        buf = 0x8022d4190 "`"
        end = 0x8022d4238 ""
        bufsiz = 4664
        ifm = (struct if_msghdr *) 0x8022d4190
---Type <return> to continue, or q <return> to quit---
        mib = 0x7fffffffe8c0
#6  0x00000000004340cb in zebra_ns_enable (ns_id=0, info=0x69d228) at zebra/zebra_ns.c:55
        zns = (struct zebra_ns *) 0x8022552a0
#7  0x0000000000434174 in zebra_ns_init () at zebra/zebra_ns.c:84
No locals.
#8  0x00000000004205e1 in main (argc=1, argv=0x7fffffffeaa0) at zebra/main.c:307
        zserv_path = 0x0
        lblmgr_path = 0x0
        dummy = {ss_len = 0 '\0', ss_family = 0 '\0', __ss_pad1 = 0x7fffffffe9ca "", __ss_align = 1, __ss_pad2 = 0x7fffffffe9d8 "°êÿÿÿ\177"}
        dummylen = 32767

@mdtancsa
Copy link
Contributor Author

mdtancsa commented May 31, 2018

cat /var/tmp/quagga.zebra.crashlog

ZEBRA: Received signal 11 at 1527787680 (si_addr 0x20); aborting...
Backtrace for 5 stack frames:
0x8009075d4 <zlog_backtrace_sigsafe+0x44> at /usr/local/lib/libfrr.so.0
0x800906af6 <zlog_signal+0x496> at /usr/local/lib/libfrr.so.0
0x800927ed1 <signal_init+0x3b1> at /usr/local/lib/libfrr.so.0
0x8015f2954 <pthread_sigmask+0x544> at /lib/libthr.so.3
0x8015f1eb2 <pthread_getspecific+0xe12> at /lib/libthr.so.3
no thread information available

@ocochard
Copy link
Contributor

@mdtancsa Are you able to reproduce it with FRR 5.0 ? I didn't see this problem with my work-in-progress FRR 5.0 port, and because I didn't see any mention of this bug in the release notes and didn't understand why it didn't crash anymore.
My tests:

[root@router]~# uname -a
FreeBSD router.bsdrp.net 11.2-RELEASE FreeBSD 11.2-RELEASE  r335510M  amd64
[root@router]~# pkg info | grep frr
frr5-5.0                       IP routing protocol suite including BGP, IS-IS, OSPF and RIP
[root@router]~# ifconfig tun create
tun0
[root@router]~# ifconfig tun0 up
[root@router]~# service frr onestart
Starting zebra.
2018/06/29 11:48:02 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/06/29 11:48:02 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/06/29 11:48:02 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/06/29 11:48:02 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/06/29 11:48:02 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/06/29 11:48:02 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/06/29 11:48:02 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/06/29 11:48:02 warnings: ZEBRA: warning: connected_add_ipv6 called for interface tun0 with peer flag set, but no peer address supplied
2018/06/29 11:48:02 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/06/29 11:48:02 warnings: ZEBRA: Disabling MPLS support (no kernel support)
Starting ripd.
Starting ripngd.
Starting ospfd.
Starting ospf6d.
Starting bgpd.
Starting isisd.
Starting eigrpd.
Starting babeld.
[root@router]~# cli

Hello, this is FRRouting (version 5.0).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

router.bsdrp.net# sh int tun0
Interface tun0 is up, line protocol is up
  Link ups:       1    last: 2018/06/29 11:48:02.02
  Link downs:     0    last: (never)
  PTM status: disabled
  vrf: Default-IP-Routing-Table
  index 4 metric 1 mtu 1500 speed 0
  flags: <UP,POINTOPOINT,RUNNING,MULTICAST>
  Type: PPP
  inet6 fe80::5a9c:fcff:fe01:1/64
  Interface Type Other
    input packets 0, bytes 0, dropped 0, multicast packets 0
    input errors 0
    output packets 0, bytes 0, multicast packets 0
    output errors 0
    collisions 0

@mdtancsa
Copy link
Contributor Author

It starts up for me as well. I still get the all those warnings. Not sure if thats an issue or not, or there are other silent problems :( I built and tested using the default config instructions. I did notice a boat load of
../lib/frratomic.h:65:1: warning: "_Atomic" redefined
warnings

)# zebra -d -A127.0.0.1
2018/06/29 12:26:07 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/06/29 12:26:07 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/06/29 12:26:07 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/06/29 12:26:07 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/06/29 12:26:07 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/06/29 12:26:07 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/06/29 12:26:07 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/06/29 12:26:07 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/06/29 12:26:07 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/06/29 12:26:07 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/06/29 12:26:07 warnings: ZEBRA: ifam_read() doesn't read all socket data
2018/06/29 12:26:07 errors: ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
2018/06/29 12:26:07 warnings: ZEBRA: Disabling MPLS support (no kernel support)
0(cage)# bgpd -d -A127.0.0.1
2018/06/29 12:26:11 BGP: bgpd 5.0-MyOwnFRRVersion starting: vty@2605, bgp@:179
0(cage)# telnet localhost 2601
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Hello, this is FRRouting (version 5.0-MyOwnFRRVersion).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

User Access Verification

Password:

@rwestphal
Copy link
Member

I confirm this bug on 4.0:

   │200     /* Called from if_up(). */                                                                                                                                                                                                       │
   │201     void connected_up(struct interface *ifp, struct connected *ifc)                                                                                                                                                                  │
   │202     {                                                                                                                                                                                                                                │
   │203             afi_t afi;                                                                                                                                                                                                               │
   │204             struct prefix p;                                                                                                                                                                                                         │
   │205             struct nexthop nh = {                                                                                                                                                                                                    │
   │206                     .type = NEXTHOP_TYPE_IFINDEX, .ifindex = ifp->ifindex,                                                                                                                                                           │
   │207             };                                                                                                                                                                                                                       │
   │208                                                                                                                                                                                                                                      │
   │209             if (!CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))                                                                                                                                                                              │
   │210                     return;                                                                                                                                                                                                          │
   │211                                                                                                                                                                                                                                      │
  >│212             PREFIX_COPY(&p, CONNECTED_PREFIX(ifc));                                                                                                                                                                                  │
   │213                                                                                                                                                                                                                                      │

On 5.x this crash is not happening. My guess it that one of these two commits fixed the problem: 60c0687 or f52d0a1. I need to leave now but I'll check once I get back home.

Regarding the warnings, they are harmless, but I'll try to find a way to silence them.

@rwestphal
Copy link
Member

#2590 should fix the problem. I also introduced a new commit to silence the SIOCGIFMEDIA warning. The other warning (ifam_read() doesn't read all socket data) deserves a bit more of attention, it's unclear to me why it's happening so I'll leave to investigate it later in more detail.

@pautiina
Copy link

@rwestphal have any news about:
ifam_read() doesn't read all socket data

@rzalamena
Copy link
Member

@pautiina please try my PR #3419 .

@pautiina
Copy link

pautiina commented Dec 6, 2018

@rzalamena

Hello, this is FRRouting (version 6.1-dev-g9f2c1ff-dirty).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

This is a git build of frr-6.1-dev-289-gc69f2c1ff-dirty
Associated branch(es):
        local:freebsd-route-warning-fix
        github/opensourcerouting/frr.git/freebsd-route-warning-fix
        github/opensourcerouting/frr.git/freebsd-route-warning-fix2

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants