Comments (4)
Maybe we can push this issue upstream to make strict monotonicity optional by adding an additional flag to struct timers
. My fear is that this could possibly result in multiple executions of the same timers?
from lightning.
gwillen [email protected] writes:
In the ccan timer module, there's an assertion that can crash if time moves backwards. I know there are different perspectives on this, but it seems like lightningd can probably recover from slight non-monotonicity of time, so it's worth thinking about whether crashing is the best outcome in this case.
Ouch, thanks!
So you know what happened? NTP jump or manual setting?
lightningd: ccan/ccan/timer/timer.c:307: timers_expire: Assertion `now >= timers->base' failed.
lightningd(24325): FATAL SIGNAL 6 RECEIVED
Fatal signal 6. Log dumped in crash.log
Aborted
Yuck. Saying that time shouldn't go backwards is fairly fundamental,
and a useful sanity check. Lots of things assume time makes progress.
And a library can't report soft errors.
OTOH, real life always wins over my personal preferences :)
One option is to switch to timemono, which really can't go backwards.
But timemono is completely detached from any wallclock time, so it's
only useful for relative timers.
Which implies an API change to always use relative time (this actually
matches with all non-test usage I can find).
I'll look harder.
Thanks!
Rusty.
from lightning.
This was a purely artificial example -- I accidentally jumped the time when debugging some time-handling code in an unrelated project. So it's not really "real life".
Although I'm curious what you mean by "a library can't report soft errors", since I am generally a fan of what seems like the opposite philosophy, "a library should generally never crash the binary it's executing within." But I think it's fine if we decide that lightningd crashes are acceptable in weird conditions, we just have to be aware (and perhaps document) that this is possible since it's possibly surprising.
from lightning.
It happens from time to time, I noticed it 2-3 times when coming back from suspend. It's likely that the clock drifts substantially and then NTP kicks in between two calls to timer_expire
. So I wouldn't exactly call this a rare event :-)
from lightning.
Related Issues (20)
- Too many active HTLC, lost most of channels #CLN24.05 #bitcoind27.1 #RPi4
- Unilateral channel close, unrecovered funds HOT 2
- Como voy chavos ?
- No se no se pero siempre se
- pyln-proto depends on vulnerable cryptography ^41
- Enable `cln-grpc` by default
- BOLT12: fetchinvoice refuses to talk to ourselves HOT 2
- Ayuda Por favor Gracias. Hay alguien aqui?
- ??
- Este Mundo?
- FATAL SIGNAL on daemon.c in 24.02 and 24.05
- Issue HOT 1
- Issue
- Ahí va mi número
- Testing wallet generation, restoration with BIP39 give me a Wallet sanity check failed error
- Porfavorts acepta? Gracias me caso prometo respetar y amar el resto de días vivo Gracias
- Verify
- The assets are not yet shown in my wallet
- Issue
- Issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightning.