https://github.com/joshdk/distroless-monotonic-repro
🕔 Repro for a monotonic "no suitable implementation for this system" issue when using distroless
https://github.com/joshdk/distroless-monotonic-repro
Last synced: 4 months ago
JSON representation
🕔 Repro for a monotonic "no suitable implementation for this system" issue when using distroless
- Host: GitHub
- URL: https://github.com/joshdk/distroless-monotonic-repro
- Owner: joshdk
- Created: 2018-03-01T23:12:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-01T23:22:09.000Z (over 7 years ago)
- Last Synced: 2025-01-16T13:17:36.487Z (5 months ago)
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Distroless + Monotonic Repro
🕔 Repro for a monotonic "no suitable implementation for this system" issue when using distroless
## Running
First run `docker build -t repro .` in the root of this repository.
Then run `docker run --rm repro` to see the following error:
```
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/monotonic.py", line 169, in
raise RuntimeError('no suitable implementation for this system: ' + repr(e))
RuntimeError: no suitable implementation for this system: OSError(2, 'No such file or directory')
```## Observations
While debugging, I removed the outer `try`/`except` layer, and saw a (slightly better) exception:
```
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/monotonic.py", line 137, in
clock_gettime = ctypes.CDLL(ctypes.util.find_library('rt'),
File "/usr/lib/python2.7/ctypes/util.py", line 285, in find_library
return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))
File "/usr/lib/python2.7/ctypes/util.py", line 103, in _findLib_gcc
stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
```So (assuming I'm reading this correctly) it appears that it's attempting to locate `librt` and failing. This is not very surprising, given the minimal nature of the `distroless` images.