without SystemLock being held works fine:

root@xx:~#  strace -o $PWD/log -e openat,open,close,fcntl python3 $PWD/foo.py   
                                                              
(Reading database ... 25835 files and directories currently installed.)         
                                                              
Removing aptitude-common (0.7.4-2ubuntu2) ...                                   
                                                              
COMMAND           PID  TYPE SIZE MODE  M START END PATH                         
                                                              
iscsid            432 POSIX   4B WRITE 0     0   0 /run/iscsid.pid              
                                                              
atd               421 POSIX   4B WRITE 0     0   0 /run/atd.pid                 
                                                              
cron              418 FLOCK   4B WRITE 0     0   0 /run/crond.pid               
                                                              
python3          1207 POSIX   0B WRITE 0     0   0 /var/lib/dpkg/lock-frontend  
                                                              
python3          1207 POSIX   0B WRITE 0     0   0 /var/cache/apt/archives/lock 
                                                              
dpkg             1215 POSIX   0B WRITE 0     0   0 /var/lib/dpkg/lock           
                                                              
Processing triggers for man-db (2.7.5-1) ...                                    
               

with SystemLock held works fine:
# strace -o $PWD/log.locked -e openat,open,close,fcntl python3 $PWD/foo.py      
                                                    
(Reading database ... 25835 files and directories currently installed.)
Removing aptitude-common (0.7.4-2ubuntu2) ...                  
COMMAND           PID  TYPE SIZE MODE  M START END PATH          
iscsid            432 POSIX   4B WRITE 0     0   0 /run/iscsid.pid              
                                                             
atd               421 POSIX   4B WRITE 0     0   0 /run/atd.pid                 
                                                             
cron              418 FLOCK   4B WRITE 0     0   0 /run/crond.pid    
dpkg             2285 POSIX   0B WRITE 0     0   0 /var/lib/dpkg/lock
python3          2277 POSIX   0B WRITE 0     0   0 /var/lib/dpkg/lock-frontend  
                                                             
python3          2277 POSIX   0B WRITE 0     0   0 /var/cache/apt/archives/lock 
                                                             
Processing triggers for man-db (2.7.5-1) ...

In the strace log, we can see that the frontend lock is closed after the
dpkg runs (after we have relocked the lock).

** Tags removed: verification-needed verification-needed-xenial
** Tags added: verification-done verification-done-xenial

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1795407

Title:
  python-apt frontend locking

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1795407/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to