Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM Fiber bug #30

Open
egillet opened this issue Oct 26, 2017 · 3 comments
Open

ARM Fiber bug #30

egillet opened this issue Oct 26, 2017 · 3 comments

Comments

@egillet
Copy link

egillet commented Oct 26, 2017

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

@faustinoaq
Copy link

Hi, Thanks for report this issue

Why ARM, did you try other architectures? It, just happen on crystal-sqlite3 ?

@egillet
Copy link
Author

egillet commented Nov 8, 2017 via email

@hkalexling
Copy link

Any updates on this? I am having the same issue with Crystal 0.34.0 and the latest version of crystal-sqlite3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants