* Running test phase for ruby31 Run options: include {:focus=>true} exclude {:windows=>true} All examples were filtered out; ignoring {:focus=>true} Randomized with seed 44524 ./var/tmp/portage/dev-ruby/pg-1.5.4-r1/work/ruby31/ruby-pg-1.5.4/spec/pg/basic_type_map_for_results_spec.rb:34: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. ......................................F.............................................................TcpGate server listening: #<TCPServer:fd 7, AF_INET, 127.0.0.1, 5432> accept new int:#<TCPSocket:fd 9, AF_INET, 127.0.0.1, 5432> from #<Addrinfo: 127.0.0.1:43186 TCP> server fd:7 accept new int:#<TCPSocket:fd 11, AF_INET, 127.0.0.1, 5432> from #<Addrinfo: 127.0.0.1:43194 TCP> server fd:7 ................................................(eval):1: warning: already initialized constant PG::Connection::PROGRAM_NAME /var/tmp/portage/dev-ruby/pg-1.5.4-r1/work/ruby31/ruby-pg-1.5.4/lib/pg/connection.rb:49: warning: previous definition of PROGRAM_NAME was here (eval):1: warning: already initialized constant PG::Connection::PROGRAM_NAME (eval):1: warning: previous definition of PROGRAM_NAME was here ..........................................TcpGate server listening: #<TCPServer:fd 7, AF_INET6, ::1, 38203> accept new int:#<TCPSocket:fd 9, AF_INET6, ::1, 38203> from #<Addrinfo: [::1]:33898 TCP> server fd:7 ....*................................................................................NOTICE: table "copytable" does not exist, skipping WARNING: there is no transaction in progress .WARNING: there is no transaction in progress ...NOTICE: table "copytable" does not exist, skipping WARNING: there is no transaction in progress .WARNING: there is no transaction in progress ...WARNING: there is no transaction in progress ...NOTICE: table "copytable" does not exist, skipping WARNING: there is no transaction in progress ....WARNING: there is already a transaction in progress WARNING: there is no transaction in progress ........................................................................................TcpGate server listening: #<TCPServer:fd 6, AF_INET, 127.0.0.1, 5432> accept new int:#<TCPSocket:fd 8, AF_INET, 127.0.0.1, 5432> from #<Addrinfo: 127.0.0.1:47178 TCP> server fd:6 accept new int:#<TCPSocket:fd 10, AF_INET, 127.0.0.1, 5432> from #<Addrinfo: 127.0.0.1:47188 TCP> server fd:6 ............................................................................................................WARNING: there is already a transaction in progress WARNING: there is no transaction in progress ................WARNING: there is no transaction in progress .WARNING: there is no transaction in progress .WARNING: there is no transaction in progress ..........................................WARNING: there is no transaction in progress .WARNING: there is no transaction in progress ..NOTICE: table "copytable" does not exist, skipping WARNING: there is no transaction in progress .NOTICE: table "copytable" does not exist, skipping WARNING: there is no transaction in progress .NOTICE: table "copytable" does not exist, skipping WARNING: there is no transaction in progress ..WARNING: there is no transaction in progress .....(eval):1: warning: already initialized constant PG::Connection::PROGRAM_NAME (eval):1: warning: previous definition of PROGRAM_NAME was here (eval):1: warning: already initialized constant PG::Connection::PROGRAM_NAME (eval):1: warning: previous definition of PROGRAM_NAME was here ............*....TcpGate server listening: #<TCPServer:fd 9, AF_INET6, ::1, 40069> accept new int:#<TCPSocket:fd 11, AF_INET6, ::1, 40069> from #<Addrinfo: [::1]:57162 TCP> server fd:9 .................................................#<Thread:0xe8a36324 run> terminated with exception (report_on_exception is true): /var/tmp/portage/dev-ruby/pg-1.5.4-r1/work/ruby31/ruby-pg-1.5.4/spec/pg/exceptions_spec.rb:32:in `exec': ERROR: division by zero (PG::DivisionByZero) from /var/tmp/portage/dev-ruby/pg-1.5.4-r1/work/ruby31/ruby-pg-1.5.4/spec/pg/exceptions_spec.rb:32:in `block (3 levels) in <top (required)>' ...........................................................................................................*......................................*.........................................................................................../var/tmp/portage/dev-ruby/pg-1.5.4-r1/work/ruby31/ruby-pg-1.5.4/spec/pg/type_spec.rb:1256: [BUG] Segmentation fault at 0xe8a5c000 ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [i686-linux] Reproducible: Always
Created attachment 882503 [details] build.log and emerge --info
I can't seem to get a good backtrace for this, I can't run it outside of portage in a chroot due to some namespacing shenanigans with postgres
Could be https://github.com/ged/ruby-pg/commit/fb3fba9eac65291b20f22eb956f02490d62de3ec although the spec where this fails is a different one (but also using COPY).
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3938931284f14b3e2aaed62040743b9a730f960 commit b3938931284f14b3e2aaed62040743b9a730f960 Author: Hans de Graaff <graaff@gentoo.org> AuthorDate: 2024-01-27 11:38:55 +0000 Commit: Hans de Graaff <graaff@gentoo.org> CommitDate: 2024-01-27 11:39:51 +0000 dev-ruby/pg: apply upstream fix for x86 Bug: https://bugs.gentoo.org/922334 Signed-off-by: Hans de Graaff <graaff@gentoo.org> dev-ruby/pg/Manifest | 1 + dev-ruby/pg/pg-1.5.4-r2.ebuild | 67 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+)
(In reply to Larry the Git Cow from comment #4) > commit b3938931284f14b3e2aaed62040743b9a730f960 > Author: Hans de Graaff <graaff@gentoo.org> > AuthorDate: 2024-01-27 11:38:55 +0000 > Commit: Hans de Graaff <graaff@gentoo.org> > CommitDate: 2024-01-27 11:39:51 +0000 > > dev-ruby/pg: apply upstream fix for x86 > > Bug: https://bugs.gentoo.org/922334 > Signed-off-by: Hans de Graaff <graaff@gentoo.org> > > dev-ruby/pg/Manifest | 1 + > dev-ruby/pg/pg-1.5.4-r2.ebuild | 67 > ++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 68 insertions(+) Could you test this version and see if that fixes the issue?
(In reply to Hans de Graaff from comment #5) > (In reply to Larry the Git Cow from comment #4) > > > commit b3938931284f14b3e2aaed62040743b9a730f960 > > Author: Hans de Graaff <graaff@gentoo.org> > > AuthorDate: 2024-01-27 11:38:55 +0000 > > Commit: Hans de Graaff <graaff@gentoo.org> > > CommitDate: 2024-01-27 11:39:51 +0000 > > > > dev-ruby/pg: apply upstream fix for x86 > > > > Bug: https://bugs.gentoo.org/922334 > > Signed-off-by: Hans de Graaff <graaff@gentoo.org> > > > > dev-ruby/pg/Manifest | 1 + > > dev-ruby/pg/pg-1.5.4-r2.ebuild | 67 > > ++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 68 insertions(+) > > Could you test this version and see if that fixes the issue? This indeed removes the segfault, but now there is a test failure. Attaching full copy below. Failures: 1) Basic type mapping PG::BasicTypeMapBasedOnResult with usage of result oids for copy encoder selection can type cast #copy_data input with encoder to format 1 Failure/Error: expect( res.values ).to eq( [ ["\\xff000a0d27", "123", "2023-03-17 03:04:05.678912", "1990-12-17 15:14:45", "12.345", "-1.2345e+168", "2055-12-31", "1234-08-31"], ["\\x202078797a2020", "-444", "infinity", "-infinity", "-Infinity", "NaN", "infinity", "-infinity"] ] ) expected: [["\\xff000a0d27", "123", "2023-03-17 03:04:05.678912", "1990-12-17 15:14:45", "12.345", "-1.2345e+16...["\\x202078797a2020", "-444", "infinity", "-infinity", "-Infinity", "NaN", "infinity", "-infinity"]] got: [["\\xff000a0d27", "123", "1999-12-31 23:31:17.070656", "1999-12-31 23:50:53.061952", "12.345", "-1.2...["\\x202078797a2020", "-444", "infinity", "-infinity", "-Infinity", "NaN", "infinity", "-infinity"]] (compared using ==) # ./spec/pg/basic_type_map_based_on_result_spec.rb:135:in `block (5 levels) in <top (required)>' # ./spec/helpers.rb:56:in `block in included' Finished in 35.81 seconds (files took 0.25751 seconds to load) 976 examples, 1 failure, 4 pending
Created attachment 883320 [details] test log for new version
time_t again?
(In reply to Sam James from comment #8) > time_t again? Yes: https://github.com/ged/ruby-pg/pull/547 Should be fixed in pg-1.5.5.
Could you please retest with pg 1.5.6? If tests pass there we can make that the new stable candidate.
Created attachment 901957 [details] build.log and emerge --info Still get a crash with 1.5.6, tested on ppc.