FS#7117 - Internal pacman error: Segmentation fault

Attached to Project: Pacman
Opened by Simon Morgan (sjmorgan) - Thursday, 10 May 2007, 15:36 GMT
Last edited by Dan McGee (toofishes) - Thursday, 15 November 2007, 06:11 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Aaron Griffin (phrakture)
Dan McGee (toofishes)
Architecture All
Severity Medium
Priority Normal
Reported Version 3.0.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Pacman v3.0.3 - libalpm v1.0.0

$ sudo pacman -S antiword
resolving dependencies... done.
looking for inter-conflicts... done.

Targets: antiword-0.37-1

Total Package Size: 0.12 MB

Proceed with installation? [Y/n]
checking package integrity... done.
cleaning up... done.
(1/1) checking for file conflicts [#####################] 100%
(1/1) installing antiword [#####################] 100%
NOTES On Antiword Integration:

* If you use mozplugger, make sure to configure the
msword section like so (replacing <TERMINAL> with your
terminal of choice):
application/msword: doc, dot: Microsoft Word Document
ignore_errors exits: antiword-helper <TERMINAL> ""

* To properly use antiword in your mailcap settings:
Internal pacman error: Segmentation fault
Please submit a full bug report, with the given package if appropriate.
This task depends upon

This task blocks these from closing
 FS#8109 - Pacman 3.1 Release Roadmap 
Closed by  Dan McGee (toofishes)
Thursday, 15 November 2007, 06:11 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in GIT and will be fixed in 3.1. We should still work on logging all of this crud somewhere else.
Comment by Aaron Griffin (phrakture) - Friday, 11 May 2007, 17:28 GMT
Interesting. I wonder if the antiword scriptlet is segfaulting, or if it is pacman itself.

Can you reproduce this error? If so, can you run it with --debug on and attach the output here?
Comment by Simon Morgan (sjmorgan) - Friday, 11 May 2007, 19:13 GMT
Attached.
Comment by Aaron Griffin (phrakture) - Friday, 11 May 2007, 19:34 GMT
Yep, the segmentation fault is actually in antiword's install file (as you can see at the end, after the segfault text, pacman continues on as normal - in addition, I'll bet the segfault test is in pacman's log file too).

I will reassign this to the antiword maintainer.... oh wait, I just adopted that package 8)

I'll look into it
Comment by Andrew Fyfe (space-m0nkey) - Tuesday, 29 May 2007, 09:19 GMT
It's a pacman bug, pacman is choking on 'application/msword; antiword %s; copiousoutput', specifically %s, I'm assuming that the output from post_install is being passed through printf or something similar. Because if I change %s to %%s there's no seg fault.
Comment by Aaron Griffin (phrakture) - Tuesday, 29 May 2007, 15:04 GMT
Oh good catch Andrew. Seems like it's annoying to fix, though I could use the strreplace function I added recently to simply replace '%' with '%%' in each pipe-read line.
Comment by Roman Kyrylych (Romashka) - Friday, 31 August 2007, 07:09 GMT
status on this?
(we've got yet another bug report on this issue again: http://bugs.archlinux.org/task/7917)
Comment by Andrew Fyfe (space-m0nkey) - Friday, 31 August 2007, 13:37 GMT
Looks like Dan fixed this by accident during a cleanup :D

http://projects.archlinux.org/git/?p=pacman.git;a=commitdiff;h=ad691001e20272b794d2ed574b556f520e3555c0

Tested and pacman no longer segfaults.
Comment by Xavier (shining) - Sunday, 04 November 2007, 09:56 GMT
Indeed, the scriptlet logging was removed, so this bug was fixed, but it was not fully intentional :
http://www.archlinux.org/pipermail/pacman-dev/2007-October/009619.html
Comment by Dan McGee (toofishes) - Sunday, 04 November 2007, 17:40 GMT
http://projects.archlinux.org/git/?p=pacman.git;a=commitdiff;h=006387828cbdd11e6307879ad27e9bb9409ca193

Readded the old behavior, at least for now. It should fix this segfault bug as well. We really need to clean this up still, and have the logging of the messages go to a different file.

I would appreciate testing of this commit, I did it blindly. :)

Loading...