Issue 1:
The new pollster should probably handle out of fds more gracefully.

Fixing an unrelated fd leak, I wrote a test to intentionally run out of file descriptors.

With the new scheduler, you get pages of this ~forever, EBADF from epoll_wait, I believe:

epollwait failed with epollwait failed with 99

epollwait failed with 9epollwait failed with 9
epollwait failed with
9
epollwait failed with epollwait failed with 9
9
epollwait failed with epollwait failed with 99

epollwait failed with epollwait failed with 9
9
epollwait failed with 9epollwait failed with 9

epollwait failed with epollwait failed with 99

epollwait failed with epollwait failed with 99

epollwait failed with epollwait failed with 99

epollwait failed with epollwait failed with 99

epollwait failed with epollwait failed with 99

epollwait failed with epollwait failed with 99

epollwait failed with 9epollwait failed with 9
epollwait failed with
epollwait failed with 99

epollwait failed with epollwait failed with 99

epollwait failed with epollwait failed with 99

epollwait failed with 9epollwait failed with
epollwait failed with 9
9
epollwait failed with 9epollwait failed with 9
epollwait failed with
epollwait failed with 9
9epollwait failed with
epollwait failed with 9
9
epollwait failed with epollwait failed with 99

epollwait failed with 9
epollwait failed with 9
epollwait failed with 9
epollwait failed with 9
epollwait failed with 9epollwait failed with 9
epollwait failed with
epollwait failed with 9
9epollwait failed with 9
epollwait failed with
epollwait failed with 9
9epollwait failed with 9
epollwait failed with
epollwait failed with 99
epollwait failed with
epollwait failed with 9
9epollwait failed with
epollwait failed with 9
9epollwait failed with 9
epollwait failed with
epollwait failed with 9
9epollwait failed with 9
epollwait failed with
epollwait failed with 99
epollwait failed with
epollwait failed with 9
9epollwait failed with 9
epollwait failed with
epollwait failed with 99

epollwait failed with epollwait failed with 99
epollwait failed with
epollwait failed with 9
9epollwait failed with 9
epollwait failed with
epollwait failed with 9
9epollwait failed with 9
epollwait failed with
epollwait failed with 99
epollwait failed with
epollwait failed with 9
9epollwait failed with 9
epollwait failed with
epollwait failed with 99

epollwait failed with epollwait failed with 99
epollwait failed with
epollwait failed with 9
9epollwait failed with 9
epollwait failed with
epollwait failed with 9
9epollwait failed with 9

Issue 2:
docker -v works only on Linux and silently fails if you run a docker client on a non-Linux machine. It creates confusion for those who are using the following command as instructed as on the README to build their packages.

docker run -v $GOPATH/src:/src mobile /bin/bash -c 'cd /src/your/project && ./make.bash'

We should copy the package to be built and its dependencies from the host to the container. But, Docker provides no additional tools to help us with this issue.

One alternative is to vendor the dependencies and use ONBUILD ADD to build an app builder image. It will only work if all dependencies are vendored under the Dockerfile's directory, because Docker rejects to add files from outer contexts. https://docs.docker.com/reference/builder/#add

FROM mobile:latest

ONBUILD ADD . /src/your/project/

RUN cd /src/your/project/ && ./all.bash

Then the user can do a docker cp to retrieve the apk.