Skip to content

Shrinkray doesn't progress on OpenBSD #56

@vext01

Description

@vext01

Hi David,

I'm trying to update the OpenBSD shrinkray package. Currently we have version 185b0f62743 and I'll update to the latest release. The old version works fine [see below!], but doesn't have the fancy UI.

I've been using newer versions of shrinkray on Linux just fine, but on OpenBSD there's an issue where the reduction doesn't progress. I can reproduce it using shrinkray installed from pip.

Installed like this (using the system Python 3.13.11):

$ python3 -m venv shrinkray
$ ./shrinkray/bin/pip install shrinkray

Then a test like this:

$ cat interest.sh
#!/bin/sh
set -eu
grep bug words

This is a fast to run test:

$ time sh interest.sh
...
bugseed
bugweed
bugwort
sh interest.sh  0.00s user 0.00s system 0% cpu 0.008 total

Proceeding to run the reduce:

$ ./shrinkray/bin/shrinkray --no-clang-delta interest.sh words

The reduction gets stuck like this:

Image

Trying to get some info on what's up, I can run with "--ui basic" and kill it with CTRL+C to get a backtrace:

$ ./shrinkray/bin/shrinkray --no-clang-delta --ui basic interest.sh words
...
bugweed
bugwort

Exit code: 0
Initial validation passed.

Starting reduction...
^C  + Exception Group Traceback (most recent call last):
  |   File "/tmp/./shrinkray/bin/shrinkray", line 7, in <module>
  |     sys.exit(main())
  |              ~~~~^^
  |   File "/tmp/shrinkray/lib/python3.13/site-packages/click/core.py", line 1485, in __call__
  |     return self.main(*args, **kwargs)
  |            ~~~~~~~~~^^^^^^^^^^^^^^^^^
  |   File "/tmp/shrinkray/lib/python3.13/site-packages/click/core.py", line 1406, in main
  |     rv = self.invoke(ctx)
  |   File "/tmp/shrinkray/lib/python3.13/site-packages/click/core.py", line 1269, in invoke
  |     return ctx.invoke(self.callback, **ctx.params)
  |            ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/tmp/shrinkray/lib/python3.13/site-packages/click/core.py", line 824, in invoke
  |     return callback(*args, **kwargs)
  |   File "/tmp/shrinkray/lib/python3.13/site-packages/shrinkray/__main__.py", line 424, in main
  |     raise eg.exceptions[0]
  |   File "/tmp/shrinkray/lib/python3.13/site-packages/shrinkray/__main__.py", line 45, in run_shrink_ray
  |     await problem.setup()
  |   File "/tmp/shrinkray/lib/python3.13/site-packages/shrinkray/problem.py", line 606, in setup
  |     if not await self.__is_interesting(self.current_test_case):
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/tmp/shrinkray/lib/python3.13/site-packages/shrinkray/state.py", line 845, in is_interesting
  |     exit_code = await self.run_for_exit_code(test_case)
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/tmp/shrinkray/lib/python3.13/site-packages/shrinkray/state.py", line 498, in run_for_exit_code
  |     return await self.run_script_on_file(
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |     ...<3 lines>...
  |     )
  |     ^
  |   File "/tmp/shrinkray/lib/python3.13/site-packages/shrinkray/state.py", line 393, in run_script_on_file
  |     async with trio.open_nursery() as nursery:
  |                ~~~~~~~~~~~~~~~~~^^
  |   File "/tmp/shrinkray/lib/python3.13/site-packages/trio/_core/_run.py", line 1126, in __aexit__
  |     raise combined_error_from_nursery
  | BaseExceptionGroup: Exceptions from Trio nursery (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/tmp/shrinkray/lib/python3.13/site-packages/trio/_core/_run.py", line 1681, in raise_cancel
    |     raise KeyboardInterrupt
    | KeyboardInterrupt
    +------------------------------------

I'm not sure if this helps? Maybe a deadlock to do with this async stuff?

--volume debug doesn't give many clues:

$ ./shrinkray/bin/shrinkray --no-clang-delta --ui basic --volume debug  interest.sh words
Validating interestingness test...

Running interestingness test:
cd /tmp/shrinkray-validate-ix_jmhd_
/tmp/interest.sh words

bedbug
billbug
blitzbuggy
...
Exit code: 0
Initial validation passed.

Starting reduction...

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions