Skip to content

Serious Bug with openssl, @system #1555

@citibeth

Description

@citibeth

@tgamblin

To see fireworks, try the following:

  1. Clone latest Spack, go to develop branch.
  2. Use the following for packages.yaml:
packages:
    openssl:
        paths:
            openssl@system: /usr
  1. Try the following Spack command:
spack spec openssl@system

This produces the following stacktrace (many times over):

  File "/home2/rpfische/spack2/lib/spack/spack/repository.py", line 580, in get
    self._instances[key] = package_class(copy)
  File "/home2/rpfische/spack2/lib/spack/spack/package.py", line 372, in __init__
    f = fs.for_package_version(self, self.version)
  File "/home2/rpfische/spack2/lib/spack/spack/fetch_strategy.py", line 812, in for_package_version
    url = pkg.url_for_version(version)
  File "/home2/rpfische/spack2/var/spack/repos/builtin/packages/openssl/package.py", line 52, in url_for_version
    if '@system' in self.spec:
  File "/home2/rpfische/spack2/lib/spack/spack/spec.py", line 1986, in __contains__
    if s.satisfies(spec, strict=True):
  File "/home2/rpfische/spack2/lib/spack/spack/spec.py", line 1814, in satisfies
    return self.satisfies_dependencies(other, strict=deps_strict)
  File "/home2/rpfische/spack2/lib/spack/spack/spec.py", line 1843, in satisfies_dependencies
    self_index = ProviderIndex(self.traverse(), restrict=True)
  File "/home2/rpfische/spack2/lib/spack/spack/provider_index.py", line 86, in __init__
    self.update(spec)
  File "/home2/rpfische/spack2/lib/spack/spack/provider_index.py", line 98, in update
    pkg = spec.package
  File "/home2/rpfische/spack2/lib/spack/spack/spec.py", line 716, in package
    return spack.repo.get(self)
  File "/home2/rpfische/spack2/lib/spack/spack/repository.py", line 75, in converter
    return function(self, spec_like, *args, **kwargs)
  File "/home2/rpfische/spack2/lib/spack/spack/repository.py", line 326, in get
    return self.repo_for_pkg(spec).get(spec)
  File "/home2/rpfische/spack2/lib/spack/spack/repository.py", line 75, in converter
    return function(self, spec_like, *args, **kwargs)
  File "/home2/rpfische/spack2/lib/spack/spack/repository.py", line 584, in get
    raise FailedConstructorError(spec.fullname, *sys.exc_info())

Looks to me like a bug in the core Spec handling code. I can work around it by commenting out url_for_version() in openssl/package.py:

#    def url_for_version(self, version):
#        if '@system' in self.spec:
#            return '@system (reserved version for system openssl)'
#        else:
#            return super(Openssl, self).url_for_version(self.version)

Although I'm dubious of the value of the code I just commented out, I also don't believe that if '@system' in self.spec should crash Spack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions