FS#24230 - pacman crashes, maybe bad weather?

Attached to Project: Pacman
Opened by Dimytch (dimytch) - Wednesday, 11 May 2011, 21:08 GMT
Last edited by Dan McGee (toofishes) - Thursday, 19 May 2011, 22:21 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To Dan McGee (toofishes)
Architecture All
Severity Critical
Priority Normal
Reported Version 3.5.2
Due in Version 3.5.3
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I`ve installed last pacman 3.5.2-1 in big pack of updates, then rebooted my box.
Then ran:
pacman -R xorg-server-common xorg-server-utils xorg-xinit [owerqvotting omitted]
and got crash
then ran again
the same, got crashed
then ran with debug:
rm /var/lib/pacman/db.lck; pacman --debug -R xorg-server-common xorg-server-utils xorg-xinit

Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:
This task depends upon

Closed by  Dan McGee (toofishes)
Thursday, 19 May 2011, 22:21 GMT
Reason for closing:  Fixed
Additional comments about closing:  Commit aec60e378225
Comment by Dimytch (dimytch) - Wednesday, 11 May 2011, 21:10 GMT
box is:
Linux nz 2.6.38-pf3-nz #1 SMP PREEMPT Fri Apr 15 15:01:02 EEST 2011 x86_64 Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz GenuineIntel GNU/Linux
Comment by Allan McRae (Allan) - Wednesday, 11 May 2011, 22:53 GMT
Trimmed down debug log:

debug: removing package xorg-xinit-1.3.0-3
debug: removing 20 files
debug: file /usr/share/man/man1/xinit.1.gz does not exist
debug: file /usr/share/man/man1/startx.1.gz does not exist
debug: keeping directory /usr/share/man/man1/
debug: keeping directory /usr/share/man/
debug: file /usr/share/licenses/xorg-xinit/COPYING does not exist
debug: file /usr/share/licenses/xorg-xinit/ does not exist
debug: keeping directory /usr/share/licenses/
debug: keeping directory /usr/share/
debug: file /usr/bin/xinit does not exist
debug: file /usr/bin/startx does not exist
debug: keeping directory /usr/bin/
debug: keeping directory /usr/
debug: file /etc/skel/.xsession does not exist
debug: file /etc/skel/.xinitrc does not exist
debug: keeping directory /etc/skel/
debug: file /etc/X11/xinit/xserverrc does not exist
debug: returning error 4 from alpm_compute_md5sum : не удалось найти или прочитать файл
error: segmentation fault
Internal pacman error: Segmentation fault.
Comment by Allan McRae (Allan) - Thursday, 12 May 2011, 03:22 GMT
"не удалось найти или прочитать файл" = "could not find or read file"
Comment by Dimytch (dimytch) - Thursday, 12 May 2011, 09:54 GMT
yes translation is correct
I`m sorry, did`nt see that some text is in Russian.
If you need more info or tests, please drop me a msg

> "не удалось найти или прочитать файл" = "could not find or read file"
Comment by Xavier (shining) - Sunday, 15 May 2011, 08:07 GMT
So tell us what you did with /etc/X11/xinit/xinitrc, was it a dead symlink ?
A dead symlink is the only way I see that lstat could work but fopen return 'could not find or read file'

In any cases, this is clearly a bug as we do not check the return value of alpm_compute_md5sum
And we could handle alpm_compute_md5sum == NULL as dead symlink, ie just unlink it
Comment by Dimytch (dimytch) - Sunday, 15 May 2011, 09:37 GMT
> So tell us what you did with /etc/X11/xinit/xinitrc, was it a dead symlink ?
There have been some errors on filesystem due to power lost and some lost files in packages like xorg*** was run when power lost occurs.
And there`s no /etc/X11/xorg.conf listed by `ls` at that time.
Comment by Xavier (shining) - Sunday, 15 May 2011, 14:09 GMT
If you can reproduce now, I would like to see the output of ls -l /etc/X11/xinit/xinitrc
Comment by Dan McGee (toofishes) - Monday, 16 May 2011, 16:46 GMT
I have a set of a few patches to 1) add more symlink type stuff to pactest, 2) add a pactest for this case, 3) fix this case.

Loading...