-
Notifications
You must be signed in to change notification settings - Fork 902
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
[Bug] When using -plugindir, plugins get stuck in initialization #4822
Comments
My current working theory is that we're blocking on one of the plugins in the @NicolasDorier can you list the files in the plugin directory, and can you tell us more about the volume (host OS, underlying filesystem, ...)? |
So I tried to revert the commit. Could repro the problem. My plugindir is empty. root@btcpay763334:~/btcpayserver-docker# docker exec btcpayserver_clightning_bitcoin ls -al /etc/clightningplugins
total 8
drwxr-xr-x 2 root root 4096 Sep 28 02:06 .
drwxr-xr-x 1 root root 4096 Sep 28 02:06 .. |
we run clightning as root. |
root@c41750064c74:/# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 2276 32 ? Ss 02:06 0:00 /usr/bin/tini -g -- ./entrypoint.sh
root 6 0.7 2.7 62320 56888 ? S 02:06 0:01 lightningd
root 12 0.0 0.1 6024 2108 ? S 02:06 0:00 /usr/local/bin/../libexec/c-lightning/plugins/autoclean
root 13 0.0 0.1 6036 2416 ? S 02:06 0:00 /usr/local/bin/../libexec/c-lightning/plugins/bcli
root 14 0.0 0.1 6116 2252 ? S 02:06 0:00 /usr/local/bin/../libexec/c-lightning/plugins/fetchinvoice
root 15 0.0 0.1 6044 2256 ? S 02:06 0:00 /usr/local/bin/../libexec/c-lightning/plugins/funder
root 16 0.0 0.1 6056 2160 ? S 02:06 0:00 /usr/local/bin/../libexec/c-lightning/plugins/topology
root 17 0.0 0.1 6096 2156 ? S 02:06 0:00 /usr/local/bin/../libexec/c-lightning/plugins/keysend
root 18 0.0 0.1 6100 2220 ? S 02:06 0:00 /usr/local/bin/../libexec/c-lightning/plugins/offers
root 19 0.0 0.1 6152 2116 ? S 02:06 0:00 /usr/local/bin/../libexec/c-lightning/plugins/pay
root 20 0.0 0.0 6036 1484 ? S 02:06 0:00 /usr/local/bin/../libexec/c-lightning/plugins/txprepare
root 21 0.0 0.0 6068 1552 ? S 02:06 0:00 /usr/local/bin/../libexec/c-lightning/plugins/spenderp
root 22 0.0 0.5 1007236 10532 ? Sl 02:06 0:00 /root/.lightning/plugins/invoicewithdescriptionhash
root 34 0.0 0.1 6056 2128 ? SL 02:06 0:00 /usr/local/libexec/c-lightning/lightning_hsmd
root 35 0.0 0.1 6320 2748 ? S 02:06 0:00 /usr/local/libexec/c-lightning/lightning_connectd
root 36 0.0 0.0 6224 2040 ? S 02:06 0:00 /usr/local/libexec/c-lightning/lightning_gossipd
root 160 0.1 0.1 3864 2956 pts/0 Ss 02:08 0:00 bash
root 749 0.0 0.1 7636 2700 pts/0 R+ 02:08 0:00 ps aux config root@c41750064c74:/# cat /root/.lightning/config
bitcoin-datadir=/etc/bitcoin
bitcoin-rpcconnect=bitcoind
plugin-dir=/etc/clightningplugins
proxy=tor:9050
bind-addr=0.0.0.0:9735
network=bitcoin
announce-addr=btcpay.store.nicolas-dorier.com:9735
announce-addr=uewlcjmuuwcgs43lpcc7d64k2pf4xs7yyer7ztsq6cblyjxue3bc35qd.onion:9735
rpc-file=/root/.lightning/lightning-rpc logs root@btcpay763334:~/btcpayserver-docker# docker logs btcpayserver_clightning_bitcoin
network=bitcoin added in /root/.lightning/config
Waiting /root/.nbxplorer/btc_fully_synched to be created...
The chain is fully synched
Waiting /var/lib/tor/hidden_services/c-lightning/hostname to be created by tor...
announce-addr=uewlcjmuuwcgs43lpcc7d64k2pf4xs7yyer7ztsq6cblyjxue3bc35qd.onion:9735 added to /root/.lightning/config
rpc-file=/root/.lightning/lightning-rpc added to /root/.lightning/config
Installing bundled plugins
C-Lightning starting, listening on port 9735 When the bug is fixed, you can notice that we get logs from plugin root@btcpay763334:~/btcpayserver-docker# docker logs btcpayserver_clightning_bitcoin
network=bitcoin added in /root/.lightning/config
Waiting /root/.nbxplorer/btc_fully_synched to be created...
root@btcpay763334:~/btcpayserver-docker# docker logs btcpayserver_clightning_bitcoin -f
network=bitcoin added in /root/.lightning/config
Waiting /root/.nbxplorer/btc_fully_synched to be created...
The chain is fully synched
Waiting /var/lib/tor/hidden_services/c-lightning/hostname to be created by tor...
announce-addr=uewlcjmuuwcgs43lpcc7d64k2pf4xs7yyer7ztsq6cblyjxue3bc35qd.onion:9735 added to /root/.lightning/config
rpc-file=/root/.lightning/lightning-rpc added to /root/.lightning/config
Installing bundled plugins
C-Lightning starting, listening on port 9735
2021-09-28T02:04:06.912Z INFO plugin-bcli: bitcoin-cli initialized and connected to bitcoind.
plugin-invoicewithdescriptionhash initialized plugin v1.2
2021-09-28T02:04:07.249Z INFO lightningd: --------------------------------------------------
2021-09-28T02:04:07.249Z INFO lightningd: Server started with public key 0286024f7f15211e3b037ca1d28cc70e60ebf0e39d6b79ba711e819ef1b239af52, alias YELLOWMONKEY (color #028602) and lightningd basedon-v0.10.1-2 Again: When I tried to debug the situation, I found out that code was blocked in the init of the first plugin loaded ( |
Actually, in the |
Ok, I'm back with a small reproducible example, IMO there is no problem with the plugin but the problem is with the database creation at first startup, maybe with I/O operation in the container from C procedure?. I have two different docker-compose configurations, with the same c-lightning image with just two plugins, inside where one got stuck and the other one no when it is the time to create the database. So here I have a question, and maybe @cdecker has some experience with it: It is possible that we have some I/O operation stuck on the container? or maybe there is some permission related that our C procedure is stuck inside the container? I can give also some copies and past examples to reproduce the problem, I ran them on the same AWS service in a Debian machine: Docker container where I have the problemhttps://github.com/clightning4j/clightning4j-node/blob/main/examples/ui-rest-mode-docker-compose.yml Stuck with the actual status
Docker container where I have not the problemhttps://github.com/clightning4j/clightning4j-node/blob/main/examples/rest-mode-docker-compose.yml Completed with the actual status
|
This is continuation of #4810
Our users in btcpay had their c-lightning not working anymore after adding plugins with
-plugindir
. Reverting it (btcpayserver/btcpayserver-docker@33fd9d2) fixed the situation.I tried to printf debug it, and I found out that even
bcli
, which is not even a plugin in theplugindir
was blocked on initialization.The
init
of the plugin was called, but the plugin couldn't even report back logs about what was going on.I also tried to remove our only plugin in
plugindir
(invoicewithdescriptionhash
), but this didn't fix the situation.Let me know if I can assist more for debugging this. I can repro easily now.
The text was updated successfully, but these errors were encountered: