RejectedSoftware Forums

Sign up

Running with no internet connection

I'm new to D and vibe...it looks great. I modified
.../mongodb/source/app.d to point to an existing collection. When
running while connected (wireless network on laptop) I can see my
documents. When run not connected I get seg fault. I'm running on
linux with rejectedsoftware-vibe.d-482ca76.

The following is the result of where in gdb:
Any suggestions on how to proceed appreciated.

Thanks
Dan

#0 vibe.core.drivers.libevent2.Libevent2Driver.runEventLoopOnce() (this=0x7ffff7ed3f80) at /home/dbdavidson/stage/rejectedsoftware-vibe.d-482ca76/bin/../source/vibe/core/drivers/libevent2.d:110
#1 0x000000000055ea29 in vibe.core.core.VibeDriverCore.yieldForEvent() (this=0x7ffff7ed3fc0) at /home/dbdavidson/stage/rejectedsoftware-vibe.d-482ca76/bin/../source/vibe/core/core.d:338
#2 0x00000000005c7c57 in vibe.core.drivers.libevent2.Libevent2Driver.resolveHost() (this=0x7ffff7ed3f80, HID178=0x7fffffffd4d0, no_dns=false, family=0, host=...) at /home/dbdavidson/stage/rejectedsoftware-vibe.d-482ca76/bin/../source/vibe/core/drivers/libevent2.d:162
#3 0x00000000005c7dba in vibe.core.drivers.libevent2.Libevent2Driver.connectTcp() (this=0x7ffff7ed3f80, port=27017, host=...) at /home/dbdavidson/stage/rejectedsoftware-vibe.d-482ca76/bin/../source/vibe/core/drivers/libevent2.d:171
#4 0x00000000005b8434 in vibe.core.net.connectTcp() (port=27017, host=...) at /home/dbdavidson/stage/rejectedsoftware-vibe.d-482ca76/bin/../source/vibe/core/net.d:68
#5 0x00000000005a273b in vibe.db.mongo.connection.MongoConnection.connect() (this=0x7ffff7ed3980) at /home/dbdavidson/stage/rejectedsoftware-vibe.d-482ca76/bin/../source/vibe/db/mongo/connection.d:78
#6 0x00000000005c5acc in vibe.db.mongo.db.MongoDB.
ctor() (this=0x7ffff7ed5fb0) at /home/dbdavidson/stage/rejectedsoftware-vibe.d-482ca76/bin/../source/vibe/db/mongo/db.d:52
#7 0x00000000005c6589 in vibe.core.connectionpool.T14ConnectionPoolTC4vibe2db5mongo10connection15MongoConnectionZ.ConnectionPool.lockConnection() (this=0x7ffff7ed3b00, HID175=0x7fffffffd748) at /home/dbdavidson/stage/rejectedsoftware-vibe.d-482ca76/bin/../source/vibe/core/connectionpool.d:54
#8 0x00000000005c633f in vibe.db.mongo.db.MongoDB.lockConnection() (this=0x7ffff7ed4f80, HID174=0x7fffffffd7e0) at /home/dbdavidson/stage/rejectedsoftware-vibe.d-482ca76/bin/../source/vibe/db/mongo/db.d:131
#9 0x000000000055744b in vibe.db.mongo.collection.MongoCollection.
T4findTS4vibe4data4bson4BsonTnZ.find() (this=0x7fffffffd950, HID68=0x7fffffffd8c8, num_docs_per_chunk=0, num_skip=0, flags=, returnFieldSelector=0x0, query=...) at /home/dbdavidson/stage/rejectedsoftware-vibe.d-482ca76/bin/../source/vibe/db/mongo/collection.d:100
#10 0x0000000000517d4e in vibe.db.mongo.collection.MongoCollection.
T4findTS4vibe4data4bson4BsonZ.find() (this=0x7fffffffd950, __HID1=0x7fffffffd9d8, query=...) at /home/dbdavidson/stage/rejectedsoftware-vibe.d-482ca76/bin/../source/vibe/db/mongo/collection.d:98
#11 0x000000000050f9b4 in D main (args=...) at /home/dbdavidson/plusauri/dlang/plusauri/tvm/dump.d:7
#12 0x00000000005df1c4 in rt.dmain2.main() ()
#13 0x00007fffffffdb90 in ?? ()
#14 0x00007fffffffda70 in ?? ()
#15 0x00000000005deb3e in rt.dmain2.main() ()
#16 0x0000000000000001 in ?? ()
#17 0x0000000000000031 in ?? ()
#18 0x00000000008e1020 in ?? ()
#19 0x00007fffffffdb90 in ?? ()
#20 0x00007fffffffd8b0 in ?? ()
#21 0x00000000006070e3 in gc.gcx.GC.mallocNoSync() ()
#22 0x00007fffffffdb90 in ?? ()
#23 0x00000000005df1a8 in ?? ()
#24 0x00007fffffffda90 in ?? ()
#25 0x00000000005df20b in rt.dmain2.main() ()
#26 0x00007fffffffdc78 in ?? ()
#27 0x00007fffffffdaf0 in ?? ()
#28 0x00000000005deb3e in rt.dmain2.main() ()
#29 0x0000000000000001 in ?? ()
#30 0x0000000000000031 in ?? ()
#31 0x00000000008e1020 in ?? ()
#32 0x0000000000000001 in ?? ()
#33 0x00000000008e1020 in ?? ()
#34 0x00007fffffffe025 in ?? ()
#35 0x00007fffffffdb90 in ?? ()
#36 0x00007fffffffdb90 in ?? ()
#37 0x00000000005df1d0 in rt.dmain2.main() ()
#38 0x00000000005deac9 in main ()

Re: Running with no internet connection

Am 10/9/2012 1:00 AM, schrieb Dan Davidson:

I'm new to D and vibe...it looks great. I modified
../mongodb/source/app.d to point to an existing collection. When
running while connected (wireless network on laptop) I can see my
documents. When run not connected I get seg fault. I'm running on
linux with rejectedsoftware-vibe.d-482ca76.

The following is the result of where in gdb:
Any suggestions on how to proceed appreciated.

Thanks
Dan

It seems that libevent is causing the crash when trying to resolve
"localhost", although it should usually just look in the hosts file.
Changing localhost to 127.0.0.1 makes it work. I'll look into why it
crashes.

Re: Running with no internet connection

It was an assertion that triggered inside of a C callback. Now it
produces a "valid" error message saying it could not resolve host
"localhost".