imppg icon indicating copy to clipboard operation
imppg copied to clipboard

Tests fail (SEGFAULT) on i686 architecture

Open Hellseher opened this issue 1 year ago • 8 comments

Hi,

I refreshed imppg in Guix Astro to 1.9.2-beta and noticed tests started failing on i686 architecture. Round 1:

Running 20 test cases...
unknown location(0): fatal error: in "ModifyToneCurvePointToOverlapWithSuccessor_ExecutionFails": signal: SIGABRT (application abort requested)
/tmp/guix-build-imppg-1.9.2-beta.drv-0/source/src/scripting/test/settings_tests.cpp(100): last checkpoint


50% tests passed, 1 tests failed out of 2

Total Test time (real) =   0.13 sec

The following tests FAILED:
          2 - scripting (SEGFAULT)
Errors while running CTest
make: *** [Makefile:74: test] Error 8

Test suite failed, dumping logs.

Round 2

TIFFFieldWithTag: Internal error, unknown tag 0xa407.
TIFFFieldWithTag: Internal error, unknown tag 0xa420.
Running 20 test cases...
unknown location(0): fatal error: in "ModifyToneCurvePointToOverlapWithSuccessor_ExecutionFails": signal: SIGABRT (application abort requested)
/tmp/guix-build-imppg-1.9.2-beta.drv-0/source/src/scripting/test/settings_tests.cpp(100): last checkpoint
./src/unix/threadpsx.cpp(1502): assert "This() != this" failed in Wait(): a thread can't wait for itself [in thread e72d5b40]


Call stack:
[00] ScriptTestFixture::RunScript(char const*)  /tmp/guix-build-imppg-1.9.2-beta.drv-0/source/src/scripting/test/ScriptTestFixture.cpp:51
[01] ModifyToneCurvePointToOverlapWithPredecessor_ExecutionFails::test_method() /tmp/guix-build-imppg-1.9.2-beta.drv-0/source/src/scripting/test/settings_tests.cpp:114
[02] ModifyToneCurvePointToOverlapWithPredecessor_ExecutionFails_invoker()      /tmp/guix-build-imppg-1.9.2-beta.drv-0/source/src/scripting/test/settings_tests.cpp:103
[03] 0xf7f3b186
[04] boost::execution_monitor::catch_signals(boost::function<int ()> const&)
[05] boost::execution_monitor::execute(boost::function<int ()> const&)
[06] boost::execution_monitor::vexecute(boost::function<void ()> const&)
[07] boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long)
[08] 0xf7f4029a
[09] 0xf7f404e1
[10] boost::unit_test::framework::run(unsigned long, bool)
[11] boost::unit_test::unit_test_main(bool (*)(), int, char**)
[12] main                                       /gnu/store/j53nf3aj6b0y1kf3533kixvjaffr8g8x-boost-1.83.0/include/boost/test/unit_test.hpp:65
[13] 0xf6820cc9
[14] __libc_start_main
[15] _start
./src/unix/threadpsx.cpp(1502): assert "This() != this" failed in Wait(): a thread can't wait for itself [in thread e72d5b40]


Call stack:
[00] std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /gnu/store/xgqbv2lkh6z9x6wgyfjvcpr8paw0zd9a-gcc-11.4.0/include/c++/bits/shared_ptr_base.h:704
[01] std::__shared_ptr<std::__future_base::_State_baseV2, (__gnu_cxx::_Lock_policy)2>::operator bool() const    /gnu/store/xgqbv2lkh6z9x6wgyfjvcpr8paw0zd9a-gcc-11.4.0/include/c++/bits/shared_ptr_base.h:1300
[02] ModifyToneCurvePointToOverlapWithPredecessor_ExecutionFails::test_method() /tmp/guix-build-imppg-1.9.2-beta.drv-0/source/src/scripting/test/settings_tests.cpp:114
[03] ModifyToneCurvePointToOverlapWithPredecessor_ExecutionFails_invoker()      /tmp/guix-build-imppg-1.9.2-beta.drv-0/source/src/scripting/test/settings_tests.cpp:103
[04] 0xf7f3b186
[05] boost::execution_monitor::catch_signals(boost::function<int ()> const&)
[06] boost::execution_monitor::execute(boost::function<int ()> const&)
[07] boost::execution_monitor::vexecute(boost::function<void ()> const&)
[08] boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long)
[09] 0xf7f4029a
[10] 0xf7f404e1
[11] boost::unit_test::framework::run(unsigned long, bool)
[12] boost::unit_test::unit_test_main(bool (*)(), int, char**)
[13] main                                       /gnu/store/j53nf3aj6b0y1kf3533kixvjaffr8g8x-boost-1.83.0/include/boost/test/unit_test.hpp:65
[14] 0xf6820cc9
[15] __libc_start_main
[16] _start

*** 1 failure is detected in the test module "Master Test Suite"



50% tests passed, 1 tests failed out of 2

Total Test time (real) =   0.98 sec

The following tests FAILED:
          2 - scripting (Failed)
Errors while running CTest
make: *** [Makefile:74: test] Error 8

You may see the full log of Guix CI here https://ci.guix.gnu.org/build/6720267/log/raw

Inputs:

Hellseher avatar Nov 30 '24 19:11 Hellseher

I've installed an i686 guix 1.4.0 in a VM. Can you post commands/steps for me to try to build ImPPG 1.9.2-beta? (By default, guix build imppg takes 0.6.5).

GreatAttractor avatar Dec 02 '24 21:12 GreatAttractor

Hi,

It was merged on 30th of November with test only kept on x86_64, https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/astronomy.scm#n905, https://packages.guix.gnu.org/packages/imppg/1.9.2-beta/

You may need to pull the latests changes first:

guix pull

Make Qemu backend enabled to build for variety of architectures: <your-config-file>.scm

;; ...
(service qemu-binfmt-service-type
         (qemu-binfmt-configuration
          (platforms (lookup-qemu-platforms "aarch64" "armhf"
                                            "i586" "i686"
                                            "mips64el" "powerpc"
                                            "powerpc64le" "riscv64"))))
;; ...

After that step, you may need to reconfigure the system to make the service availalbe:

guix system reconfigure path/to/<your-config-file>.scm

And try to build on i686-linux:

guix build --system=i686-linux imppg

Or maby try to cross compile

guix build --target=i686-linux-gnu imppg

I'll check for the option how to modify the #:test? condition without too much pain.

References:

  • Complete manual https://guix.gnu.org/manual/en/guix.html
  • Build with on-the-fly changes https://guix.gnu.org/manual/en/html_node/Package-Transformation-Options.html
  • Build options https://guix.gnu.org/manual/en/html_node/Additional-Build-Options.html

Hellseher avatar Dec 03 '24 20:12 Hellseher

Thanks; I did guix pull, which updated a bunch of things, but then guix build imppg still sees only 0.6.5. I've found this command:

guix build imppg [email protected]=./imppg

but it turned out I need to clone the sources myself into ./imppg, and anyway the dependencies are not automatically resolved (e.g., Lua).

I'd be happy to investigate the test problem, but first I'd need precise, verified instructions on how to replicate this build/test environment (either guix-on-host-Linux, or docker/VM), with the possibility to tweak the ImPPG sources used.

GreatAttractor avatar Dec 05 '24 18:12 GreatAttractor

Hi,

Sorry for confustion.

I think you may share which commit you are on right now:

guix describe
Generation 60   Dec 04 2024 10:21:25    (current)
  guix 1c4a008
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 1c4a00820a1ba6265d2d96f4f7804d0807d69dcc

Check the version of imppg provided by that commit:

guix time-machine --commit=1c4a00820a1ba6265d2d96f4f7804d0807d69dcc -- package --list-available=imppg
imppg   1.9.2-beta      out     gnu/packages/astronomy.scm:906:2

Build the verion from provided commit of the generation.

guix time-machine --commit=1c4a00820a1ba6265d2d96f4f7804d0807d69dcc -- build imppg
/gnu/store/jdkdhj2s8f1ifcq3h4yy0hrv16azx74i-imppg-1.9.2-beta

As all issues with tests are resolved during packaging for x86_68 and i686 (just ignored test suit) the build should be successfull.

It starts up just fine on x86_64 (have no i686 or aarch64 hardware to test on)

guix time-machine --commit=1c4a00820a1ba6265d2d96f4f7804d0807d69dcc -- shell imppg -- imppg

Screenshot from 2024-12-08 19-34-17

As you may noticed I've used 1c4a00820a1ba6265d2d96f4f7804d0807d69dcc commit of the https://git.savannah.gnu.org/git/guix.git main repository providing packages, it may be reproudced bit-to-bit on your end.

Hellseher avatar Dec 08 '24 19:12 Hellseher

Could you re-check with the latest version (2.1.0)? It's been likely fixed by 4f0cd6c63b.

GreatAttractor avatar Nov 18 '25 19:11 GreatAttractor

Could you re-check with the latest version (2.1.0)? It's been likely fixed by 4f0cd6c63b.

Hi, thanks for response. I'm in process of getting ready Guix Astro Update 2025/11 and will include the fresh version of imppg

Hellseher avatar Nov 19 '25 23:11 Hellseher

Hi,

x86_64 build has been successful with tests enabled:

successfully built /gnu/store/qbswpl68ryzkqb0s1fs8cmg84pzry32w-imppg-2.1.0.drv
/gnu/store/2pai1z6l6qz4fqdkg3gzdqvb8wddwfb3-imppg-2.1.0

Hellseher avatar Nov 19 '25 23:11 Hellseher

I can't confirm the build on i686-linux yet, see the blocking issue on Guix side: https://codeberg.org/guix/guix/issues/4313

Hellseher avatar Nov 19 '25 23:11 Hellseher