Skip to content
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

Crash when using meson on existing build generated by older version #7613

Closed
DaanDeMeyer opened this issue Aug 18, 2020 · 1 comment · Fixed by #7711
Closed

Crash when using meson on existing build generated by older version #7613

DaanDeMeyer opened this issue Aug 18, 2020 · 1 comment · Fixed by #7711
Labels

Comments

@DaanDeMeyer
Copy link
Contributor

Describe the bug

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mesonbuild/mesonmain.py", line 131, in run
    return options.run_func(options)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 1220, in run
    return th.doit()
  File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 975, in doit
    self.run_tests(tests)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 1130, in run_tests
    self.drain_futures(futures)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 1146, in drain_futures
    self.process_test_result(result.result())
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 628, in run
    cmd = self._get_cmd()
  File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 612, in _get_cmd
    elif self.test.cmd_is_built and self.test.needs_exe_wrapper:
AttributeError: 'TestSerialisation' object has no attribute 'cmd_is_built'

To Reproduce

The issue occurred when running the latest version of meson on an already built version of systemd. After removing the build directory I cannot reproduce the issue anymore. Maybe some issue where the new version of meson can't handle serialized data from older versions?

Expected behavior

No crash

system parameters

  • Is this a cross build or just a plain native build (for the same computer)?

Not a cross build

  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.)

Python: 3.8.5
Arch Linux

  • what meson --version

meson: 0.55.1

  • what ninja --version if it's a Ninja build

ninja: 1.10.0

@xclaesse
Copy link
Member

Meson uses python's pickle to store data, so a build dir cannot be reused after meson update. That being said, meson usually detect it's a build from an older version and print an error message saying to reconfigure. Looks like "meson test" subcommand is missing that check.

@dcbaker dcbaker added the bug label Aug 20, 2020
@nirbheek nirbheek modified the milestone: 0.55.2 Sep 2, 2020
nirbheek added a commit to nirbheek/meson that referenced this issue Sep 8, 2020
Same as coredata.dat and build.dat loading

Fixes mesonbuild#7613
nirbheek added a commit to nirbheek/meson that referenced this issue Sep 9, 2020
Same as coredata.dat and build.dat loading

Fixes mesonbuild#7613
nirbheek added a commit to nirbheek/meson that referenced this issue Sep 9, 2020
Same as coredata.dat and build.dat loading. Also, do not assert if
things change. Raise the appropriate exception.

Fixes mesonbuild#7613
nirbheek added a commit to nirbheek/meson that referenced this issue Sep 9, 2020
Same as coredata.dat and build.dat loading. Also, do not assert if
things change. Raise the appropriate exception.

Fixes mesonbuild#7613
nirbheek added a commit that referenced this issue Sep 10, 2020
Same as coredata.dat and build.dat loading. Also, do not assert if
things change. Raise the appropriate exception.

Fixes #7613
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants