Hi all,
this week I’ve changed laptops and hence the OS was installed from scratch.
Previously I was on Ubuntu 20.04 with Hanami 1.3 and Ruby 3.0.0. Then I’ve upgraded to Ubuntu 22.04. My app still worked, both locally and in Docker.
On the new laptop I now have a fresh install of Ubuntu 22.04 with Ruby 2.7.2. I’ve tried 2.5.1, 3.0.0 and 3.1.0 as well but 3 or above won’t work with bundle install due to Hanami model 1.3.3 dependency. I can use 2.7.2 though.
When I run bundle exec hanami db prepare
it creates the DB, but the migration fails. I’ve only found out after manually checking the pg databases.
bundle exec hanami db migrate
fails with the same error:
Here is only the Control frame information. There is also Ruby level backtrace and process memory map which is eventually interrupted.
bundle exec hanami db migrate
/home/hribarinho/.rvm/gems/ruby-2.7.2/gems/pg-1.4.5/lib/pg/connection.rb:626: [BUG] Segmentation fault at 0x00007f676aeaf140
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0036 p:---- s:0241 e:000240 CFUNC :connect_poll
c:0035 p:0551 s:0237 e:000236 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/pg-1.4.5/lib/pg/connection.rb:626
c:0034 p:0356 s:0224 e:000223 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/pg-1.4.5/lib/pg/connection.rb:760
c:0033 p:0007 s:0213 e:000212 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/pg-1.4.5/lib/pg/connection.rb:695
c:0032 p:0134 s:0207 e:000206 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/sequel-4.49.0/lib/sequel/adapters/postgres.rb:225
c:0031 p:0007 s:0197 e:000196 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/sequel-4.49.0/lib/sequel/connection_pool.rb:123
c:0030 p:0048 s:0189 e:000188 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/sequel-4.49.0/lib/sequel/connection_pool/threaded.rb:228
c:0029 p:0012 s:0183 e:000182 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/sequel-4.49.0/lib/sequel/connection_pool/threaded.rb:201
c:0028 p:0003 s:0179 e:000178 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/sequel-4.49.0/lib/sequel/connection_pool/threaded.rb:137
c:0027 p:0006 s:0173 e:000172 BLOCK /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/sequel-4.49.0/lib/sequel/connection_pool/threaded.rb:151
c:0026 p:0003 s:0166 e:000165 BLOCK /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/sequel-4.49.0/lib/sequel/connection_pool/threaded.rb:282 [FINISH]
c:0025 p:---- s:0163 e:000162 CFUNC :synchronize
c:0016 p:0021 s:0101 e:000100 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/sequel-4.49.0/lib/sequel/extensions/migration.rb:687 [FINISH]
c:0010 p:0029 s:0061 E:000aa8 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/hanami-1.3.0/lib/hanami/cli/commands/db/migrate.rb:33
c:0009 p:0022 s:0056 E:001690 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/hanami-1.3.0/lib/hanami/cli/commands/db/migrate.rb:24
c:0008 p:0070 s:0048 E:001e38 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/hanami-1.3.0/lib/hanami/cli/commands/command.rb:85
c:0007 p:0071 s:0041 E:000190 METHOD /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/hanami-cli-0.3.1/lib/hanami/cli.rb:57
c:0006 p:0091 s:0031 E:000640 TOP /home/hribarinho/.rvm/gems/ruby-2.7.2/gems/hanami-1.3.0/bin/hanami:6 [FINISH]
c:0005 p:---- s:0028 e:000027 CFUNC :load
c:0004 p:0112 s:0023 E:000930 EVAL /home/hribarinho/.rvm/gems/ruby-2.7.2/bin/hanami:23 [FINISH]
c:0003 p:---- s:0018 e:000017 CFUNC :eval
c:0002 p:0189 s:0011 E:000d78 EVAL /home/hribarinho/.rvm/gems/ruby-2.7.2/bin/ruby_executable_hooks:22 [FINISH]
c:0001 p:0000 s:0003 E:0022b0 (none) [FINISH]
To be honest this is the first time I’ve encountered this and I don’t know where to start debugging. The Hanami project is exactly the same with all .env and docker files as it was on the old laptop.
Can someone point me in the right direction?
Thank you, seba