SChernykh / p2pool

Decentralized pool for Monero mining
GNU General Public License v3.0
1.08k stars 128 forks source link

Fix for p2pool SIGFAULT under docker-compose #187

Closed arthef closed 2 years ago

arthef commented 2 years ago

I tried the most recent version from github and followed instructions for docker-compose setup. Unfortunately, p2pool docker container fails with error

p2pool-p2pool | 2022-07-06 22:51:59.2612 ConsoleCommands uv_tty_init failed, error EINVAL
p2pool-p2pool exited with code 139

It appears to be missing some critical options from docker-compose.yml file for p2pool service. Adding following lines, after container_name: p2pool-p2pool to the file solved the problem:

    tty: true
    stdin_open: true

I suggest to add these lines to the docker-compose.yml file in the repository.

SChernykh commented 2 years ago

@bladedoyle since you already have an open PR for docker-compose.yml, can you also add this?

bladedoyle commented 2 years ago

I am able to reproduce it. I dont really object to the proposed change if its required .... but the p2pool process shouldnt need a tty or stdin. This must have been caused by a recent change on master branch to update libuv.
My concern is that docker probably wont be the only issue caused by this update. Probably any daemonized configuration will have the same issue? If its possible to avoid needing tty and stdin with an update to p2pool C++ code I think that would be a more robust solution. What do you think @SChernykh ?

SChernykh commented 2 years ago

Good idea, I can add a more graceful handling of tty initialization errors.

SChernykh commented 2 years ago

@arturhefczyc https://github.com/SChernykh/p2pool/commit/9d692d5194a9740654286e62e71f65a73ace69a3 should fix it.

bladedoyle commented 2 years ago

Tested. This fix looks good to me.