crystal-sqlite3
crystal-sqlite3 copied to clipboard
ARM Fiber bug
I just try the 0.8.2 version with a Crystal 0.23.1 [e2a1389e8] LLVM 3.8. There is a bug that doesn't allow sqlite to run in a spawned Fiber (which is annoying if you try to run Kemal e.g.)
The bug is easy to reproduce: require "sqlite3"
spawn do DB.open "sqlite3://%3Amemory%3A" do |db| db.exec "CREATE TABLE IF NOT EXISTS contacts (name string, age integer)" puts "=== count is #{db.scalar "select count(*) from contacts"}" end end sleep 1.seconds
The execution gives:
---inside #step : #SQLite3::Statement:0x412d20 sql select count(*) from contacts Unhandled exception in spawn: database disk image is malformed (SQLite3::Exception) 0x72eb4: *CallStack::unwind:Array(Pointer(Void)) at /home/pi/Projects/crystal/src/float/printer/cached_powers.cr 1:1 0xd7cf0: move_next at /home/pi/Projects/CrystalThinking/lib/sqlite3/src/sqlite3/result_set.cr 20:7 0xce484: scalar at /home/pi/Projects/CrystalThinking/lib/db/src/db/statement.cr 39:13 0xcec04: scalar at /home/pi/Projects/CrystalThinking/lib/db/src/db/pool_statement.cr 44:30 0xc5268: scalar at /home/pi/Projects/CrystalThinking/lib/db/src/db/query_methods.cr 223:7 0x6e584: ~procProc(Nil) at /home/pi/Projects/crystal/src/time/format/pattern.cr 1:1 0x83260: run at /home/pi/Projects/crystal/src/fiber.cr 255:3 0x6d834: ~proc2Proc(Fiber, (IO::FileDescriptor | Nil)) at /home/pi/Projects/crystal/src/concurrent.cr 61:3
Hi, Thanks for report this issue
Why ARM, did you try other architectures? It, just happen on crystal-sqlite3
?
I used a raspberry 2 and a Odroid-UX4, both 32 bits armhf. The pg packet is working well.
Le 8 nov. 2017 à 04:50, Faustino Aguilar [email protected] a écrit :
Hi, Thanks for report this issue
Why ARM, did you try other architectures? It, just happen on crystal-sqlite3 ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/crystal-lang/crystal-sqlite3/issues/30#issuecomment-342703044, or mute the thread https://github.com/notifications/unsubscribe-auth/AAF1PMcRBaihA4e1DcbfLr38pJmFmjrcks5s0ST4gaJpZM4QHb3E.
Any updates on this? I am having the same issue with Crystal 0.34.0 and the latest version of crystal-sqlite3
.