Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 892631 - sci-geosciences/gpsd-3.25: sandbox violation trying to write a pyc file for dev-python/cycler
Summary: sci-geosciences/gpsd-3.25: sandbox violation trying to write a pyc file for d...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-30 14:35 UTC by Denis Lisov
Modified: 2023-01-30 22:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,18.20 KB, text/plain)
2023-01-30 14:41 UTC, Denis Lisov
Details
build log (gpsd-3.25:20230129-232116.log,91.17 KB, text/plain)
2023-01-30 14:42 UTC, Denis Lisov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Lisov 2023-01-30 14:35:27 UTC
For some time I've been unable to update gpsd to 3.25 due to sandbox violations during install. Initially it used to be

Checking pkg-config for gtk+-3.0... yes                                                                                                                                                                                                                                      
 * ACCESS DENIED:  open_wr:       /usr/lib/python3.11/site-packages/cffi/__pycache__/__init__.cpython-311.pyc.140282429718960                                                                                                                                                
 * ACCESS DENIED:  open_wr:       /usr/lib/python3.11/site-packages/cffi/__pycache__/api.cpython-311.pyc.140282429719472                                                                                                                                                     
 * ACCESS DENIED:  open_wr:       /usr/lib/python3.11/site-packages/cffi/__pycache__/lock.cpython-311.pyc.140282429734448                                                                                                                                                    
 * ACCESS DENIED:  open_wr:       /usr/lib/python3.11/site-packages/cffi/__pycache__/error.cpython-311.pyc.140282429733808                                                                                                                                                   
 * ACCESS DENIED:  open_wr:       /usr/lib/python3.11/site-packages/cffi/__pycache__/model.cpython-311.pyc.140282429731120                                                                                                                                                   
 * ACCESS DENIED:  open_wr:       /usr/lib/python3.11/site-packages/__pycache__/cycler.cpython-311.pyc.140282420123312                                                                                                                                                       
Checking Python module matplotlib... found           

but after rebuilding dev-python/cffi the first five are gone and the only one remaining is for cycler

Checking pkg-config for gtk+-3.0... yes                                                                                                                                                                                                                                      
 * ACCESS DENIED:  open_wr:       /usr/lib/python3.11/site-packages/__pycache__/cycler.cpython-311.pyc.139811562378416                                                                                                                                                       
Checking Python module matplotlib... found

 * ----------------------- SANDBOX ACCESS VIOLATION SUMMARY -----------------------                                                                                                                                                                                          
 * LOG FILE: "/tmp/portage/sci-geosciences/gpsd-3.25/temp/sandbox.log"                                                                                                                                                                                                       
 *                                                                                                                                                                                                                                                                           
VERSION 1.0                                                                                                                                                                                                                                                                  
FORMAT: F - Function called                                                                                                                                                                                                                                                  
FORMAT: S - Access Status                                                                                                                                                                                                                                                    
FORMAT: P - Path as passed to function                                                                                                                                                                                                                                       
FORMAT: A - Absolute Path (not canonical)                                                                                                                                                                                                                                    
FORMAT: R - Canonical Path                                                                                                                                                                                                                                                   
FORMAT: C - Command Line                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                             
F: open_wr                                                                                                                                                                                                                                                                   
S: deny                                                                                                                                                                                                                                                                      
P: /usr/lib/python3.11/site-packages/__pycache__/cycler.cpython-311.pyc.139811562378416                                                                                                                                                                                      
A: /usr/lib/python3.11/site-packages/__pycache__/cycler.cpython-311.pyc.139811562378416                                                                                                                                                                                      
R: /usr/lib/python3.11/site-packages/__pycache__/cycler.cpython-311.pyc.139811562378416                                                                                                                                                                                      
C: /usr/bin/python3.11 .sconf_temp/conftest_8a53b0ee3be125437e152c8d8488a449_0.py                    

I've checked all the filesystem timestamps on these files and they look reasonable (the pyc file is newer according to any of them)

$ stat /usr/lib/python3.11/site-packages/cycler.py
  File: /usr/lib/python3.11/site-packages/cycler.py
  Size: 14519           Blocks: 32         IO Block: 4096   regular file
Device: 254,0   Inode: 2235066     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-05-28 02:47:58.558649419 +0300
Modify: 2022-05-28 02:47:58.558649419 +0300
Change: 2022-05-28 02:48:33.828603403 +0300
 Birth: 2022-05-28 02:48:33.828603403 +0300

$ stat /usr/lib/python3.11/site-packages/__pycache__/cycler.cpython-311.pyc
  File: /usr/lib/python3.11/site-packages/__pycache__/cycler.cpython-311.pyc
  Size: 22059           Blocks: 48         IO Block: 4096   regular file
Device: 254,0   Inode: 2235067     Links: 2
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-05-28 02:48:01.555312198 +0300
Modify: 2022-05-28 02:48:01.555312198 +0300
Change: 2022-05-28 02:48:33.835270060 +0300
 Birth: 2022-05-28 02:48:33.831936732 +0300

$  file /usr/lib/python3.11/site-packages/__pycache__/cycler.cpython-311.pyc
/usr/lib/python3.11/site-packages/__pycache__/cycler.cpython-311.pyc: Byte-compiled Python module for CPython 3.11, timestamp-based, .py timestamp: Fri May 27 23:47:58 2022 UTC, .py size: 14519 bytes

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-30 14:39:34 UTC
Please attach the full build.log and emerge --info for completeness please, thanks.
Comment 2 Denis Lisov 2023-01-30 14:40:59 UTC
Forgot to mention it's Gentoo ~amd64. Also I can confirm that

python3.11 <<<"import cycler"

in a user session also tries to write a pyc file there according to `strace` (and predictably fails with permission denied).
Comment 3 Denis Lisov 2023-01-30 14:41:21 UTC
Created attachment 849509 [details]
emerge --info
Comment 4 Denis Lisov 2023-01-30 14:42:43 UTC
Created attachment 849511 [details]
build log
Comment 5 Denis Lisov 2023-01-30 21:59:41 UTC
According to discussion in #gentoo-python, I missed a mass-rebuild after installing python 3.11.0_beta4 that made pyc files generated by earlier versions invalid for newer ones.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-30 22:00:13 UTC
Thanks for the update! Was meaning to update the bug myself and forgot.