Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#71312 - {pyalpm} transaction.to_add segfault
Attached to Project:
Arch Linux
Opened by Matthew G (djmattyg007) - Sunday, 20 June 2021, 08:01 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 27 June 2021, 09:35 GMT
Opened by Matthew G (djmattyg007) - Sunday, 20 June 2021, 08:01 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 27 June 2021, 09:35 GMT
|
DetailsDescription:
I'm seeing segfaults when trying to perform a sysupgrade, but only if transaction.to_add and transaction.to_remove are accessed. Package versions: pyalpm 0.10.4-1 python 3.9.5-3 pacman 6.0.0-3 Steps to reproduce: The behaviour is pretty weird, varying slightly depending on the order of operations. To reproduce, I have an executable script that always starts with the following code: --- #!/usr/bin/python3 import pycman.config import pycman.transaction handle = pycman.confi.init_with_config("/etc/pacman.conf") transaction = pycman.transaction.init_from_options(handle, {}) transaction.sysupgrade(False) --- From here, the behaviour varies depending on the order of the next few instructions. If the rest of the script looks like this: print(transaction.to_add) print(transaction.to_remove) transaction.release() print("released") Then the script segfaults upon accessing transaction.to_remove. If the rest of the script looks like this: print(transaction.to_add) transaction.release() print("released") Then the script segfaults upon calling transaction.release(). If the rest of the script looks like this: print(transaction.to_remove) print(transaction.to_add) transaction.release() print("released") Then the script segfaults upon calling transaction.release(). If the rest of the script looks like this: print(transaction.to_remove) transaction.release() print("released") Then the script completes successfully without segfaulting. If transaction.release() is called without ever accessing transaction.to_add, the script completes successfully. To confirm: - The same results occurred regardless of whether or not print statements were used. I used print statements simply to aid the initial diagnosis. - Every time the script segfaulted, I had to manually clear the lock file /var/lib/pacman/db.lck before I was able to try it again. - I tested elevating privileges using both sudo and doas, and it had the same effect. - I observe what appears to be the exact same segfault when running 'pycman-sync -u' (with both sudo and doas). - While performing these tests, I have three packages awaiting upgrades. I arbitrarily downgraded these packages in order to test: broot 1.5.1-1 -> 1.6.0-1 typescript 4.3.2-1 -> 4.3.4-1 vlc 3.0.15-2 -> 3.0.16-1 Please let me know if I can provide any further information that would assist debugging. |
This task depends upon
Closed by Jelle van der Waa (jelly)
Sunday, 27 June 2021, 09:35 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 0.10.5
Sunday, 27 June 2021, 09:35 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 0.10.5
$ sudo python3 pyalpm_test.py
WARNING: libblockdev: local (2.25-2.1) is newer than extra (2.25-2)
[]
[]
released
$ sudo pacman -Sy
...
$ sudo python3 pyalpm_test.py
WARNING: libblockdev: local (2.25-2.1) is newer than extra (2.25-2)
[<alpm.Package("fortune-mod-3.6.1-1-x86_64") at 0x7f44970febd0>, <alpm.Package("python-backcall-0.2.0-4-any") at 0x7f44970fef90>, <alpm.Package("python-black-21.6b0-2-any") at 0x7f44970fef60>]
Segmentation fault
Thank you :)