This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bullseye arm/v7 time.time() Operation not permitted
Type: behavior Stage:
Components: Interpreter Core Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: SaschaJohn, christian.heimes
Priority: normal Keywords:

Created on 2021-12-02 08:42 by SaschaJohn, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg407515 - (view) Author: Sascha Hesse (SaschaJohn) Date: 2021-12-02 08:42
Given a docker container on raspbian 10.11
based on bullseye:

docker run --rm -it --entrypoint sh python:3.10-slim

time.time() fails with error

# python
Python 3.10.0 (default, Nov 18 2021, 00:56:34) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.time()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
PermissionError: [Errno 1] Operation not permitted

based on buster:

docker run --rm -it --entrypoint sh python:3.10-slim-buster

# python
Python 3.10.0 (default, Nov 18 2021, 02:00:41) [GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.time()
1638433441.9555993
>>> exit()
#

works as expected
msg407598 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-12-03 19:34
time.time() is a wrapper for libc function call clock_gettime() with CLOCK_REALTIME. This is either a problem with the container build or a Kernel ABI issue between the container build and your operating system.

I suggest that you report the issue to https://github.com/docker-library/python . The Dockerhub Python image is not maintained by us.
History
Date User Action Args
2022-04-11 14:59:53adminsetgithub: 90118
2021-12-03 19:34:10christian.heimessetnosy: + christian.heimes
messages: + msg407598
2021-12-02 08:42:21SaschaJohncreate