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

twister: sometimes the twister fails because the error configparser.NoSectionError: No section: 'manifest' #36655

Closed
wangnuannuan opened this issue Jul 1, 2021 · 2 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@wangnuannuan
Copy link
Collaborator

Describe the bug

Sometimes the twister fails because the error configparser.NoSectionError: No section: 'manifest'

CMake Error at /slowfs/ru20arcjenkins/de02-arcjenkins2/slaves/ru20-gp-srv-linux03/workspace/arcoss_verification/sandbox_jingru/testing_jobs/zephyr_verification/sanity_check/zephyr/cmake/zephyr_module.cmake:63 (message):
  Traceback (most recent call last):

    File "/depot/Python/Python-3.7.0/lib/python3.7/site-packages/west/manifest.py", line 172, in _mpath
      path = cp.get('manifest', 'path')
    File "/depot/Python/Python-3.7.0/lib/python3.7/configparser.py", line 780, in get
      d = self._unify_values(section, vars)
    File "/depot/Python/Python-3.7.0/lib/python3.7/configparser.py", line 1146, in _unify_values
      raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'manifest'

That's because the specific platform will call west command, which will try to modify the config file .west/config. Take nsim_hs_smp as example, the twister will call west command at

command = ["west", "flash", "--skip-rebuild", "-d", self.build_dir]
.

The contents of config are:

[manifest]
path = zephyr-downstream
file = west.yml

https://github.com/zephyrproject-rtos/west/blob/main/src/west/app/main.py#L406. The west flash will modify it's contents as:

[manifest]
path = zephyr-downstream
file = west.yml
[zephyr]
base = zephyr

Because the twister run this command with multiple processes, so I guess there are race when ·twister· call this command, then the file is not modified successfully due to multi-process race.

I found that west tool will update the contents of .west/config at

  1. west extension commands(build, flash...) https://github.com/zephyrproject-rtos/west/blob/21a478e3c87f6c910aa8b293ee50f7c8480273e6/src/west/app/main.py#L703, this may affect twister
  2. west init command https://github.com/zephyrproject-rtos/west/blob/main/src/west/app/project.py#L230, https://github.com/zephyrproject-rtos/west/blob/main/src/west/app/project.py#L299
  3. west config command
@wangnuannuan wangnuannuan added the bug The issue is a bug, or the PR is fixing a bug label Jul 1, 2021
@nashif nashif added the priority: low Low impact/importance bug label Jul 6, 2021
@nashif nashif self-assigned this Jul 6, 2021
@cfriedt
Copy link
Member

cfriedt commented Aug 6, 2021

@nashif - looks like this was not fixed in the linked PR - what's happening?

@nashif
Copy link
Member

nashif commented Sep 16, 2021

fixed in #38325

@nashif nashif closed this as completed Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants