Skip to content

IPv6 Socket test failures on Travis #27788

Closed

Description

In https://travis-ci.org/JuliaLang/julia/jobs/396261047, there are two interesting failures in the Sockets tests:

  Got exception UDP send failed: address not available (EADDRNOTAVAIL) outside of a @test
  UDP send failed: address not available (EADDRNOTAVAIL)
  Stacktrace:
   [1] try_yieldto(::typeof(Base.ensure_rescheduled), ::Base.RefValue{Task}) at ./event.jl:196
   [2] wait() at ./event.jl:255
   [3] wait(::Condition) at ./event.jl:46
   [4] stream_wait(::Sockets.UDPSocket, ::Condition) at ./stream.jl:47
   [5] send(::Sockets.UDPSocket, ::Sockets.IPv6, ::UInt16, ::String) at /home/travis/build/JuliaLang/julia/usr/share/julia/stdlib/v0.7/Sockets/src/Sockets.jl:355
   [6] top-level scope at /tmp/julia/share/julia/stdlib/v0.7/Sockets/test/runtests.jl:237

and

  Got exception InexactError(:trunc, UInt16, 65536) outside of a @test
  InexactError: trunc(UInt16, 65536)
  Stacktrace:
   [1] throw_inexacterror(::Symbol, ::Type, ::Any) at ./boot.jl:567
   [2] checked_trunc_uint at ./boot.jl:597 [inlined]
   [3] toUInt16 at ./boot.jl:669 [inlined]
   [4] Type at ./boot.jl:720 [inlined]
   [5] convert at ./number.jl:7 [inlined]
   [6] Type at /home/travis/build/JuliaLang/julia/usr/share/julia/stdlib/v0.7/Sockets/src/IPAddr.jl:249 [inlined]
   [7] Type at /home/travis/build/JuliaLang/julia/usr/share/julia/stdlib/v0.7/Sockets/src/IPAddr.jl:253 [inlined]
   [8] listenany(::Sockets.IPv6, ::UInt16) at /home/travis/build/JuliaLang/julia/usr/share/julia/stdlib/v0.7/Sockets/src/Sockets.jl:571

My guess is that the +1 on these lines may result in the invalid port 65536, causing the respective exceptions:

bind(b, ip"127.0.0.1", randport + 1)
c = Condition()
tsk = @async begin

addr = InetAddr(addr.host, addr.port + 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    ciContinuous integrationtestThis change adds or pertains to unit tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions