ACINQ / phoenixd

https://phoenix.acinq.co/server
Apache License 2.0
117 stars 15 forks source link

Unreachable webhook causes node to panic #93

Closed thesimplekid closed 3 months ago

thesimplekid commented 3 months ago

If the node receives a an incoming payment with a notification webhook that is unreachable the node panics. This should be handled more gracefully and not shutdown the node

Uncaught Kotlin exception: io.ktor.client.engine.curl.CurlIllegalStateException: Connection failed for request: CurlRequestData(url='https://phd.panic.dev/webhook/phoenixd', method='POST', content: 197 bytes). Reason: Couldn't resolve host name
    at 0   phoenixd                            0x55e680           kfun:kotlin.Throwable#<init>(kotlin.String?){} + 32
    at 1   phoenixd                            0x55bece           kfun:kotlin.Exception#<init>(kotlin.String?){} + 30
    at 2   phoenixd                            0x55bf8e           kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 30
    at 3   phoenixd                            0x55c1ae           kfun:kotlin.IllegalStateException#<init>(kotlin.String?){} + 30
    at 4   phoenixd                            0x6fcacc           kfun:io.ktor.client.engine.curl.CurlIllegalStateException#<init>(kotlin.String){} + 28
    at 5   phoenixd                            0x7029e9           kfun:io.ktor.client.engine.curl.internal.CurlMultiApiHandler.collectFailedResponse#internal + 409
    at 6   phoenixd                            0x702560           kfun:io.ktor.client.engine.curl.internal.CurlMultiApiHandler.processCompletedEasyHandle#internal + 400
    at 7   phoenixd                            0x701d48           kfun:io.ktor.client.engine.curl.internal.CurlMultiApiHandler.handleCompleted#internal + 712
 at 8   phoenixd                            0x7015e4           kfun:io.ktor.client.engine.curl.internal.CurlMultiApiHandler#perform(){} + 596                                                                                                                                  [0/1071]
    at 9   phoenixd                            0x6fde20           kfun:io.ktor.client.engine.curl.CurlProcessor.$runEventLoop$lambda$2COROUTINE$2.invokeSuspend#internal + 416
    at 10  phoenixd                            0x5dfc69           kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any?-trampoline + 25
    at 11  phoenixd                            0x560300           kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 224
    at 12  phoenixd                            0x5dfcf5           kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 85
    at 13  phoenixd                            0x63a5ea           kfun:kotlinx.coroutines.DispatchedTask#run(){} + 634
    at 14  phoenixd                            0x64be9d           kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 77
    at 15  phoenixd                            0x6a76b5           kfun:io.ktor.util.MultiWorkerDispatcher.$workerRunLoop$lambda$4COROUTINE$0.invokeSuspend#internal + 341
    at 16  phoenixd                            0x5dfc69           kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any?-trampoline + 25
    at 17  phoenixd                            0x560300           kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 224
    at 18  phoenixd                            0x5dfcf5           kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 85
    at 19  phoenixd                            0x63a5ea           kfun:kotlinx.coroutines.DispatchedTask#run(){} + 634
    at 20  phoenixd                            0x64be9d           kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 77
    at 21  phoenixd                            0x60f4a8           kfun:kotlinx.coroutines.EventLoopImplBase#processNextEvent(){}kotlin.Long + 168
    at 22  phoenixd                            0x64bd53           kfun:kotlinx.coroutines.EventLoop#processNextEvent(){}kotlin.Long-trampoline + 19
    at 23  phoenixd                            0x645f07           kfun:kotlinx.coroutines.BlockingCoroutine.joinBlocking#internal + 167
    at 24  phoenixd                            0x645676           kfun:kotlinx.coroutines#runBlocking(kotlin.coroutines.CoroutineContext;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,0:0>){0§<kotlin.Any?>}0:0 + 598
    at 25  phoenixd                            0x64576e           kfun:kotlinx.coroutines#runBlocking$default(kotlin.coroutines.CoroutineContext?;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,0:0>;kotlin.Int){0§<kotlin.Any?>}0:0 + 94
    at 26  phoenixd                            0x6a71cd           kfun:io.ktor.util.MultiWorkerDispatcher.workerRunLoop#internal + 109
    at 27  phoenixd                            0x6a74f5           kfun:io.ktor.util.MultiWorkerDispatcher.<init>$lambda$3#internal + 69
    at 28  phoenixd                            0x6a7079           kfun:io.ktor.util.MultiWorkerDispatcher.$<bridge-UNNN><init>$lambda$3#static(io.ktor.util.MultiWorkerDispatcher){}#internal + 25
    at 29  phoenixd                            0x5f96d8           _ZN6Worker19processQueueElementEb + 728
    at 30  phoenixd                            0x5f93bc           _ZN12_GLOBAL__N_113workerRoutineEPv + 76
    at 31  libc.so.6                           0x7cd90e89ca93     0x0 + 137271693658771
    at 32  libc.so.6                           0x7cd90e929c3b     0x0 + 137271694236731
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@cfd77e8, DefaultExecutor@b663b80]
        at 0   phoenixd                            0x55e680           kfun:kotlin.Throwable#<init>(kotlin.String?){} + 32
        at 1   phoenixd                            0x55bece           kfun:kotlin.Exception#<init>(kotlin.String?){} + 30
        at 2   phoenixd                            0x55bf8e           kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 30
        at 3   phoenixd                            0x649da5           kfun:kotlinx.coroutines.internal.DiagnosticCoroutineContextException#<init>(kotlin.coroutines.CoroutineContext){} + 85
        at 4   phoenixd                            0x638ada           kfun:kotlinx.coroutines.internal#handleUncaughtCoroutineException(kotlin.coroutines.CoroutineContext;kotlin.Throwable){} + 314
        at 5   phoenixd                            0x60d2dc           kfun:kotlinx.coroutines#handleCoroutineException(kotlin.coroutines.CoroutineContext;kotlin.Throwable){} + 124
        at 6   phoenixd                            0x607af5           kfun:kotlinx.coroutines.StandaloneCoroutine.handleJobException#internal + 85
        at 7   phoenixd                            0x64ca63           kfun:kotlinx.coroutines.JobSupport#handleJobException(kotlin.Throwable){}kotlin.Boolean-trampoline + 19
        at 8   phoenixd                            0x611e7c           kfun:kotlinx.coroutines.JobSupport.finalizeFinishingState#internal + 316
        at 9   phoenixd                            0x615743           kfun:kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath#internal + 659
        at 10  phoenixd                            0x615460           kfun:kotlinx.coroutines.JobSupport.tryMakeCompleting#internal + 192
        at 11  phoenixd                            0x6152a4           kfun:kotlinx.coroutines.JobSupport#makeCompletingOnce(kotlin.Any?){}kotlin.Any? + 148
        at 12  phoenixd                            0x606f7a           kfun:kotlinx.coroutines.AbstractCoroutine#resumeWith(kotlin.Result<1:0>){} + 106
        at 13  phoenixd                            0x5dfcf5           kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 85
        at 14  phoenixd                            0x5603ed           kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 461
        at 15  phoenixd                            0x5dfcf5           kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 85
        at 16  phoenixd                            0x63a54a           kfun:kotlinx.coroutines.DispatchedTask#run(){} + 474
        at 17  phoenixd                            0x64be9d           kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 77
        at 18  phoenixd                            0x647d35           kfun:kotlinx.coroutines.WorkerDispatcher.dispatch$lambda$0#internal + 21
        at 19  phoenixd                            0x648186           kfun:kotlinx.coroutines.WorkerDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 22
        at 20  phoenixd                            0x6481d9           kfun:kotlinx.coroutines.WorkerDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$0.$<bridge-UNN>invoke(){}#internal + 25
        at 21  phoenixd                            0x5de1bb           kfun:kotlin.Function0#invoke(){}1:0-trampoline + 75
        at 22  phoenixd                            0x565379           WorkerLaunchpad + 57
        at 23  phoenixd                            0x5f979f           _ZN6Worker19processQueueElementEb + 927
        at 24  phoenixd                            0x5fa554           _ZN6Worker4parkElb + 244
        at 25  phoenixd                            0x566885           kfun:kotlin.native.concurrent.Worker#park(kotlin.Long;kotlin.Boolean){}kotlin.Boolean + 85
        at 26  phoenixd                            0x645f58           kfun:kotlinx.coroutines.BlockingCoroutine.joinBlocking#internal + 248
        at 27  phoenixd                            0x645676           kfun:kotlinx.coroutines#runBlocking(kotlin.coroutines.CoroutineContext;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,0:0>){0§<kotlin.Any?>}0:0 + 598
        at 28  phoenixd                            0x64576e           kfun:kotlinx.coroutines#runBlocking$default(kotlin.coroutines.CoroutineContext?;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,0:0>;kotlin.Int){0§<kotlin.Any?>}0:0 + 94
        at 29  phoenixd                            0xb49c71           kfun:io.ktor.server.cio.CIOApplicationEngine#start(kotlin.Boolean){}io.ktor.server.engine.ApplicationEngine + 177
        at 30  phoenixd                            0x4505ed           kfun:fr.acinq.lightning.bin.Phoenixd.run$lambda$37#internal + 93
        at 31  phoenixd                            0x451b61           kfun:fr.acinq.lightning.bin.Phoenixd.$run$lambda$37$FUNCTION_REFERENCE$43.invoke#internal + 33
        at 32  phoenixd                            0x5dfffb           kfun:kotlin.Function2#invoke(1:0;1:1){}1:2-trampoline + 91
        at 33  phoenixd                            0x56154b           kfun:kotlin.coroutines.intrinsics.object-4.invokeSuspend#internal + 235
        at 34  phoenixd                            0x5dfc69           kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any?-trampoline + 25
        at 35  phoenixd                            0x560300           kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 224
        at 36  phoenixd                            0x5dfcf5           kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 85
        at 37  phoenixd                            0x63a5ea           kfun:kotlinx.coroutines.DispatchedTask#run(){} + 634
        at 38  phoenixd                            0x64be9d           kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 77
        at 39  phoenixd                            0x647d35           kfun:kotlinx.coroutines.WorkerDispatcher.dispatch$lambda$0#internal + 21
        at 40  phoenixd                            0x648186           kfun:kotlinx.coroutines.WorkerDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 22
        at 41  phoenixd                            0x6481d9           kfun:kotlinx.coroutines.WorkerDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$0.$<bridge-UNN>invoke(){}#internal + 25
        at 42  phoenixd                            0x5de1bb           kfun:kotlin.Function0#invoke(){}1:0-trampoline + 75
        at 43  phoenixd                            0x565379           WorkerLaunchpad + 57
        at 44  phoenixd                            0x5f979f           _ZN6Worker19processQueueElementEb + 927
        ... and 3 more common stack frames skipped
Aborted (core dumped)