8000 Segfault when running the testsuite with `AGDA_BIN` that is not an absolute path · Issue #6905 · agda/agda · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Segfault when running the testsuite with AGDA_BIN that is not an absolute path #6905

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

Closed
andreasabel opened this issue Oct 7, 2023 · 5 comments · Fixed by #6907
Closed

Segfault when running the testsuite with AGDA_BIN that is not an absolute path #6905

andreasabel opened this issue Oct 7, 2023 · 5 comments · Fixed by #6907
Assignees
Labels
devx Developer Experience (IDE setup, linting, dev builds, etc.) (not in changelog) infra: test suite Issues relating to the test suite (not in changelog) regression in 2.6.4 Regression that first surfaced in Agda 2.6.4 segfault (core dumped) upstream workaround exists
Milestone

Comments

@andreasabel
Copy link
Member
andreasabel commented Oct 7, 2023

I experience segfaults when running the agda-tests (build by make v1-install) binary with agda-quicker (build by make quicker-install-bin):

make AGDA_BIN=agda-quicker fail
...
all
  Fail
    LetPatternData:                                    
bash: line 1: 63472 Segmentation fault: 11  
AGDA_BIN=agda-quicker dist-2.6.5-ghc-9.6.3/build/agda-tests/agda-tests -i -j1 --regex-include all/Fail

This can be reproduced by directly invocation as well (sans Makefile):

$ AGDA_BIN=agda-quicker dist-2.6.5-ghc-9.6.3/build/agda-tests/agda-tests -i -j1 --regex-include all/Fail
... Segmentation fault: 11  
@andreasabel andreasabel added infra: test suite Issues relating to the test suite (not in changelog) segfault (core dumped) devx Developer Experience (IDE setup, linting, dev builds, etc.) (not in changelog) labels Oct 7, 2023
@andreasabel
Copy link
Member Author

It seems the segfault appears if AGDA_BIN is not an absolute path:

$ dist-2.6.5-ghc-9.4.7/build/agda-tests/agda-tests -i -j1 --regex-include all/Fail
... AGDA_
8000
BIN not set
... (segfault)

$ make AGDA_BIN=$(which agda-quicker) fail
(works)

$ AGDA_BIN=$(which agda-quicker) dist-2.6.5-ghc-9.6.3/build/agda-tests/agda-tests -i -j1 --regex-include all/Fail
(works)

The last change around AGDA_BIN was

@lawcho: Do you see whether your changes could have triggered this bug?

@andreasabel andreasabel changed the title Segfault when running the testsuite with agda-quicker Segfault when running the testsuite with AGDA_BIN that is not an absolute path Oct 7, 2023
@andreasabel
Copy link
Member Author

Smells like this bug (fixed in process-1.6.18.0 of September 2023):

@andreasabel andreasabel added this to the 2.6.5 milestone Oct 7, 2023
@andreasabel
Copy link
Member Author

I tested with GHC 9.8 which ships process-1.6.18.0. Indeed the bug is gone there, while the same experiments with GHC 9.6.3 and 9.4.7 (both ship 1.6.17.0) reproduce the segfault.
So we could sit this out or work around this along the lines of haskell/process#296, by supplying a cwd that is not Nothing.

@andreasabel
Copy link
Member Author
andreasabel commented Oct 7, 2023

Here is the results for cabal run agda-tests -O0 -w ${GHC} for the following values of GHC, using the Agda 2.6.4 codebase (tag 2.6.4-release-base).

GHC process segfault
9.0.2 1.6.13.2 no
9.2.8 1.6.16.0 yes
9.4.7 1.6.17.0 yes
9.6.3 1.6.17.0 yes
9.8.0 1.6.18.0 no

@andreasabel andreasabel added the regression in 2.6.4 Regression that first surfaced in Agda 2.6.4 label Oct 7, 2023
@andreasabel
Copy link
Member Author

Turns our that Agda 2.6.3 didn't have this problem with the testsuite, so it is a regression in 2.6.4, albeit a harmless (devx only) one.

andreasabel added a commit that referenced this issue Oct 7, 2023
Problem does not exist in process library shipped with GHC 9.0 or 9.8,
but currently affects the versions inbetween (9.2.8, 9.4.7, 9.6.3).

Closes #6905.
@andreasabel andreasabel self-assigned this Oct 7, 2023
andreasabel added a commit that referenced this issue Oct 7, 2023
Problem does not exist in process library shipped with GHC 9.0 or 9.8,
but currently affects the versions inbetween (9.2.8, 9.4.7, 9.6.3).

Closes #6905.
@andreasabel andreasabel modified the milestones: 2.6.5, 2.6.4.1 Oct 25, 2023
JobPetrovcic pushed a commit to JobPetrovcic/agda that referenced this issue Apr 12, 2024
Problem does not exist in process library shipped with GHC 9.0 or 9.8,
but currently affects the versions inbetween (9.2.8, 9.4.7, 9.6.3).

Closes agda#6905.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devx Developer Experience (IDE setup, linting, dev builds, etc.) (not in changelog) infra: test suite Issues relating to the test suite (not in changelog) regression in 2.6.4 Regression that first surfaced in Agda 2.6.4 segfault (core dumped) upstream workaround exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0