sb-bsd-sockets tests fail on ubuntu 16.04 inside docker

Bug #1596043 reported by Stephen Hassard on 2016-06-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

Hi folks,

I'm trying to build sbcl 1.3.6 inside docker and am running into an error running the tests from sb-bsd-sockets.

Test SB-BSD-SOCKETS-TEST::GET-PROTOCOL-BY-NAME/ERROR failed
Form: (HANDLER-CASE
       (SB-BSD-SOCKETS:GET-PROTOCOL-BY-NAME "nonexistent-protocol")
       (SB-BSD-SOCKETS:UNKNOWN-PROTOCOL NIL T) (:NO-ERROR NIL NIL))
Expected value: T
Actual value: #<SIMPLE-ERROR "Unexpected errno ~d" {10049D8A63}>.

I'm not sure what's causing this error and wondered if anyone had any ideas?

My Dockerfile is:
---
FROM ubuntu:16.04
RUN apt update
RUN apt upgrade -y
RUN apt install -y bzip2 make gcc time zlib1g-dev sbcl

# build sbcl
WORKDIR /opt/sbcl_build
ADD http://downloads.sourceforge.net/project/sbcl/sbcl/1.3.6/sbcl-1.3.6-source.tar.bz2 ./
RUN ["tar","-xjf","./sbcl-1.3.6-source.tar.bz2"]

WORKDIR /opt/sbcl_build/sbcl-1.3.6
RUN ["./make.sh","--fancy"]
---

Stephen Hassard (steve-hassard) wrote :

A trival patch to the tests for sb-bsd-sockets seems to make things work.

I'm still not sure why the getprotobyname function is failing in an unexpected way when run inside a docker container.

PuercoPop (pirata) wrote :

Seeing the errno returned by getprotobyname-r may give more information. What is the error message (of the simple-error shown above) shown in the REPL when running (SB-BSD-SOCKETS:GET-PROTOCOL-BY-NAME "nonexistent-protocol")? The

Stephen Hassard (steve-hassard) wrote :

It doesn't have much more info:

* (SB-BSD-SOCKETS:GET-PROTOCOL-BY-NAME "nonexistent-protocol")

debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "main thread" RUNNING {1002916753}>:
  Unexpected errno 2

PuercoPop (pirata) wrote :

I should had pointed you to str

Ok, so the problem is that getprotobyname doesn't handle the ENOENT error. By adding the follwing[1] to getprotobyname you should see a more appropiate error message. But we still have to figure why it is raising ENOENT, although I'm guessing that problem is related to docker more than SBCL.

[1]

((eql errno sb-posix:enoent)
 (sb-int:simple-perror "getprotobyname"))

Below the cond case of(eql errno sockint::erange)

Stephen Hassard (steve-hassard) wrote :

Adding 'netbase' package to the docker container seems to resolve the failure, so I can now build sbcl without issues.

Stas Boukarev (stassats) wrote :

In 0c097f8815ea9ea0e5272ae23ac1cf510bc18381

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats) on 2016-08-02
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers