hyperboria / bugs

Peer-to-peer IPv6 networking, secure and near-zero-conf.
154 stars 17 forks source link

New assertion failed (dhtcore) on master #41

Open viric opened 9 years ago

viric commented 9 years ago

Running the master code a05ade40dc:

Assertion failure [Node.c:57] [(!Node_isAncestorOf(node, bestParent->parent))]

It took two or three days to get it. We don't have a backtrace.

(linux-armv5tel)

viric commented 9 years ago

I guess the label means "on hold until you provide a backtrace". It may be tricky to reproduce this again, with means to get a backtrace. It would be much easier if #45 were implemented.

ghost commented 9 years ago

I don't have the knowledge to quickly look into it. Can you get GDB on there?

gdb ./cjdroute -ex 'set follow-fork-mode child' -ex 'set confirm off' -ex 'run < ./cjdroute.conf' -ex 'thread apply all bt' -ex 'quit' 2>&1 | tee gdb.log

viric commented 9 years ago

The backtrace. I have a core dump, if anyone want variables, I can use gdb to get them. I reproduced it in x86_64.

Program terminated with signal SIGABRT, Aborted.
#0  0x00007f64c0991137 in raise ()
   from /nix/store/la5imi1602jxhpds9675n2n2d0683lbq-glibc-2.20/lib/libc.so.6
(gdb) bt
#0  0x00007f64c0991137 in raise ()
   from /nix/store/la5imi1602jxhpds9675n2n2d0683lbq-glibc-2.20/lib/libc.so.6
#1  0x00007f64c099253a in abort ()
   from /nix/store/la5imi1602jxhpds9675n2n2d0683lbq-glibc-2.20/lib/libc.so.6
#2  0x00007f64c13470eb in Assert_failure (
    format=format@entry=0x7f64c13bdca0 "Assertion failure [%s:%d] [%s]\n") at util/Assert.c:32
#3  0x00007f64c136243b in Node_setParentReachAndPath (node=node@entry=0x7f64c2e5d1e8, 
    bestParent=bestParent@entry=0x7f64c2e14058, reach=reach@entry=10556448, 
    path=path@entry=8956360528167) at dht/dhtcore/Node.c:57
#4  0x00007f64c1364ccf in setParentReachAndPath (store=<optimized out>, store=<optimized out>, 
    path=8956360528167, reach=10556448, parent=0x7f64c2e14058, node=0x7f64c2e5d1e8)
    at dht/dhtcore/NodeStore.c:339
#5  updateBestParentCycle (cycle=0, store=<optimized out>, nextReach=10556448, limit=0, 
    newBestLink=0x7f64c2e14058) at dht/dhtcore/NodeStore.c:491
#6  updateBestParent (newBestParent=0x7f64c2e14058, nextReach=10556448, store=0x7f64c2e3b4e8)
    at dht/dhtcore/NodeStore.c:513
#7  0x00007f64c1365375 in handleGoodNews (node=node@entry=0x7f64c2ed92f8, 
    newReach=newReach@entry=14075264, store=store@entry=0x7f64c2e3b4e8)
    at dht/dhtcore/NodeStore.c:546
#8  0x00007f64c1366d41 in handleNews (node=0x7f64c2ed92f8, newReach=14075264, 
    store=0x7f64c2e3b4e8) at dht/dhtcore/NodeStore.c:655
#9  0x00007f64c1368d5d in NodeStore_discoverNode (nodeStore=0x7f64c2e3b4e8, 
    addr=addr@entry=0x7fffe2bc8fe0, scheme=<optimized out>, inverseLinkEncodingFormNumber=0, 
    milliseconds=milliseconds@entry=266) at dht/dhtcore/NodeStore.c:1572
#10 0x00007f64c136e847 in onResponseOrTimeout (data=<optimized out>, milliseconds=266, 
    vping=0x7f64c2fff1d8) at dht/dhtcore/RouterModule.c:514
#11 0x00007f64c136e62a in callback (ping=0x7f64c2e7d548, data=0x7f64c2eeed48) at util/Pinger.c:55
#12 Pinger_pongReceived (data=data@entry=0x7f64c2eeed48, pinger=<optimized out>)
    at util/Pinger.c:167
#13 0x00007f64c136eaa1 in handleIncoming (message=0x7fffe2bc8fa0, vcontext=0x7f64c2e14468)
    at dht/dhtcore/RouterModule.c:459
#14 0x00007f64c1360bea in DHTModuleRegistry_handleIncoming (message=message@entry=0x7fffe2bc8fa0, 
    registry=<optimized out>) at dht/DHTModuleRegistry.c:63
#15 0x00007f64c1377db5 in incomingMsg (pf=0x7f64c2e31698, msg=0x7f64c2ef5af8)
    at dht/Pathfinder.c:385
#16 incomingFromEventIf (msg=0x7f64c2ef5af8, eventIf=0x7f64c2e31698) at dht/Pathfinder.c:415
#17 0x00007f64c138af04 in Iface_send (msg=0x7f64c2ef5af8, iface=0x7f64c2e319c8)
    at ./interface/Iface.h:69
#18 timeoutTrigger (vASynchronizer=0x7f64c2e319c8) at interface/ASynchronizer.c:69
#19 0x00007f64c13ba3c1 in uv__run_timers (loop=loop@entry=0x7f64c2e112b0)
    at ../src/unix/timer.c:146
#20 0x00007f64c13b0bf2 in uv_run (loop=0x7f64c2e112b0, mode=mode@entry=UV_RUN_DEFAULT)
    at ../src/unix/core.c:275
#21 0x00007f64c134c125 in EventBase_beginLoop (eventBase=eventBase@entry=0x7f64c2e11268)
    at util/events/libuv/EventBase.c:83
#22 0x00007f64c1399060 in Core_main (argc=<optimized out>, argv=<optimized out>)
    at admin/angel/Core.c:326
#23 0x00007f64c1345d14 in main (argc=3, argv=0x7fffe2bc98d8) at client/cjdroute2.c:462