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

Binary garbage in /etc/lsb-release (on Travis CI) #15

Open
xolox opened this issue Oct 8, 2018 · 1 comment
Open

Binary garbage in /etc/lsb-release (on Travis CI) #15

xolox opened this issue Oct 8, 2018 · 1 comment

Comments

@xolox
Copy link
Owner

xolox commented Oct 8, 2018

While implementing a fix for #10 I found a really weird edge case that (so far) has only manifested in the Python 2.6 environment on Travis CI: The parsing of /etc/lsb-release results in the expected variable names but the values contain binary garbage including nul bytes. Here's a failing Travis CI build where the following log message can be observed (hard wrapped for readability):

Extracted 4 variables from /etc/lsb-release:
{u'DISTRIB_CODENAME': 't\x00\x00\x00r\x00\x00\x00u\x00\x00\x00s\x00\x00\x00t\x00\x00\x00y\x00\x00\x00',
 u'DISTRIB_RELEASE': '1\x00\x00\x004\x00\x00\x00.\x00\x00\x000\x00\x00\x004\x00\x00\x00',
 u'DISTRIB_ID': 'U\x00\x00\x00b\x00\x00\x00u\x00\x00\x00n\x00\x00\x00t\x00\x00\x00u\x00\x00\x00',
 u'DISTRIB_DESCRIPTION': '\x00\x00\x00U\x00\x00\x00b\x00\x00\x00u\x00\x00\x00n\x00\x00\x00t\x00\x00\x00u\x00\x00\x00 \x00\x00\x001\x00\x00\x004\x00\x00\x00.\x00\x00\x000\x00\x00\x004\x00\x00\x00.\x00\x00\x005\x00\x00\x00 \x00\x00\x00L\x00\x00\x00T\x00\x00\x00S\x00\x00\x00\x00\x00\x00'}

At first this seemed a minor annoyance in the sense that the test suite failed on this and that needed a workaround (see d3451a9). However since then I found that this also has an adverse effect on the test suite of another project of mine which uses executor.

This has left me wondering whether this weird edge case is isolated to the Python 2.6 environment on Travis CI or whether this is a symptom of a bigger problem, possibly a programming error on my side. The weird thing is that the Python 2.7, 3.4, 3.5, 3.6 and PyPy builds all work fine...

In the short term I'm worried that I may have broken the distributor_id and distribution_codename logic for more environments then just the Python 2.6 environment on Travis CI, so I'm going to add a "countermeasure" of sorts to executor.

@xolox
Copy link
Owner Author

xolox commented Oct 8, 2018

While I still don't know why this binary garbage appears during the parsing of /etc/lsb-release in the Python 2.6 environment on Travis CI I've at least implemented a countermeasure (in ec3d737) to avoid regressions in existing features, specifically the distributor_id and distribution_codename logic.

This countermeasure has since been confirmed to fix the apt-mirror-updater test suite breakage, here's a successful build based on executor 21.1.1.

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

No branches or pull requests

1 participant