Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#16990 - pacman crashes while searching for a package

Attached to Project: Pacman
Opened by Martin (user23) - Tuesday, 03 November 2009, 16:59 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 04 November 2009, 00:26 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture x86_64
Severity High
Priority Normal
Reported Version 3.3.2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
I simply searched for a new application that I wanted to install and pacman crashed with a segmentation fault.
Three scenarios are listed below.

Steps to Reproduce:

command:
pacman --debug -Ss debugger

output:
error: segmentation fault
Internal pacman error: Segmentation fault.
Please submit a full bug report with --debug if appropriate.
[user23@arch ~]$ pacman --debug -Ss debugger
debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: SyncFirst: pacman
debug: config: new section 'core'
debug: setlibpaths() called
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: registering sync database 'core'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'core': ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': http://mirror.archlinux.com.ve/core/os/x86_64
debug: adding new server URL to database 'core': ftp://ftp.archlinux.org/core/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: registering sync database 'extra'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'extra': ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/extra/os/x86_64
debug: adding new server URL to database 'extra': ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/extra/os/x86_64
debug: adding new server URL to database 'extra': http://mirror.archlinux.com.ve/extra/os/x86_64
debug: adding new server URL to database 'extra': ftp://ftp.archlinux.org/extra/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: registering sync database 'community'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'community': ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/community/os/x86_64
debug: adding new server URL to database 'community': ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/community/os/x86_64
debug: adding new server URL to database 'community': http://mirror.archlinux.com.ve/community/os/x86_64
debug: adding new server URL to database 'community': ftp://ftp.archlinux.org/community/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.conf
debug: registering local database
debug: loading package cache for repository 'core'
debug: searching for target 'debugger'
debug: loading package cache for repository 'extra'
debug: searching for target 'debugger'
debug: search target 'debugger' matched 'ANSI Common Lisp interpreter, compiler and debugger'
debug: search target 'debugger' matched 'A graphical front-end for command-line debuggers such as GDB, JDB, pydb, perl debugger...'
debug: search target 'debugger' matched 'The GNU Debugger'
debug: search target 'debugger' matched 'XSLT Debugger'
debug: search target 'debugger' matched 'mono-debugger'
debug: search target 'debugger' matched 'monodevelop-debugger-gdb'
debug: search target 'debugger' matched 'monodevelop-debugger-mdb'
error: segmentation fault
Internal pacman error: Segmentation fault.
Please submit a full bug report with --debug if appropriate.

command:
pacman --debug -Ss foobar

output:
debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: SyncFirst: pacman
debug: config: new section 'core'
debug: setlibpaths() called
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: registering sync database 'core'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'core': ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': http://mirror.archlinux.com.ve/core/os/x86_64
debug: adding new server URL to database 'core': ftp://ftp.archlinux.org/core/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: registering sync database 'extra'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'extra': ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/extra/os/x86_64
debug: adding new server URL to database 'extra': ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/extra/os/x86_64
debug: adding new server URL to database 'extra': http://mirror.archlinux.com.ve/extra/os/x86_64
debug: adding new server URL to database 'extra': ftp://ftp.archlinux.org/extra/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: registering sync database 'community'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'community': ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/community/os/x86_64
debug: adding new server URL to database 'community': ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/community/os/x86_64
debug: adding new server URL to database 'community': http://mirror.archlinux.com.ve/community/os/x86_64
debug: adding new server URL to database 'community': ftp://ftp.archlinux.org/community/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.conf
debug: registering local database
debug: loading package cache for repository 'core'
debug: searching for target 'foobar'
debug: loading package cache for repository 'extra'
debug: searching for target 'foobar'
debug: loading package cache for repository 'community'
debug: searching for target 'foobar'
debug: unregistering database 'local'
debug: unregistering database 'core'
debug: freeing package cache for repository 'core'
debug: unregistering database 'extra'
debug: freeing package cache for repository 'extra'
debug: unregistering database 'community'
debug: freeing package cache for repository 'community'

command:
pacman --debug -Ss 123456jjjafskdjiw

output:
debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: SyncFirst: pacman
debug: config: new section 'core'
debug: setlibpaths() called
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: registering sync database 'core'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'core': ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': http://mirror.archlinux.com.ve/core/os/x86_64
debug: adding new server URL to database 'core': ftp://ftp.archlinux.org/core/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: registering sync database 'extra'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'extra': ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/extra/os/x86_64
debug: adding new server URL to database 'extra': ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/extra/os/x86_64
debug: adding new server URL to database 'extra': http://mirror.archlinux.com.ve/extra/os/x86_64
debug: adding new server URL to database 'extra': ftp://ftp.archlinux.org/extra/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: registering sync database 'community'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'community': ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/community/os/x86_64
debug: adding new server URL to database 'community': ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/community/os/x86_64
debug: adding new server URL to database 'community': http://mirror.archlinux.com.ve/community/os/x86_64
debug: adding new server URL to database 'community': ftp://ftp.archlinux.org/community/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.conf
debug: registering local database
debug: loading package cache for repository 'core'
debug: searching for target '123456jjjafskdjiw'
debug: loading package cache for repository 'extra'
debug: searching for target '123456jjjafskdjiw'
error: segmentation fault
Internal pacman error: Segmentation fault.
Please submit a full bug report with --debug if appropriate.


Feel free to ask for more information.

Cheers,
Martin
This task depends upon

Closed by  Dan McGee (toofishes)
Wednesday, 04 November 2009, 00:26 GMT
Reason for closing:  Works for me
Additional comments about closing:  Seems to be working now for the reporter as well.
Comment by Martin (user23) - Tuesday, 03 November 2009, 18:31 GMT
Further information:

[user23@arch ~]$ gdb pacman
GNU gdb (GDB) 7.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/pacman...(no debugging symbols found)...done.
(gdb) set args -Ss debugger
(gdb) run
Starting program: /usr/bin/pacman -Ss debugger
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff788fffe in __gconv_transform_utf8_internal () from /lib/libc.so.6
(gdb)


Martin
Comment by Martin (user23) - Tuesday, 03 November 2009, 18:45 GMT
(gdb) bt
#0 0x00007ffff788fffe in __gconv_transform_utf8_internal ()
from /lib/libc.so.6
#1 0x00007ffff78f069b in mbrtowc () from /lib/libc.so.6
#2 0x00007ffff7915d0d in build_wcs_upper_buffer () from /lib/libc.so.6
#3 0x00007ffff79163d8 in re_string_reconstruct () from /lib/libc.so.6
#4 0x00007ffff791caad in re_search_internal () from /lib/libc.so.6
#5 0x00007ffff791cc13 in regexec@@GLIBC_2.3.4 () from /lib/libc.so.6
#6 0x00007ffff7bcca37 in _alpm_db_search () from /usr/lib/libalpm.so.4
#7 0x0000000000409cf7 in ?? ()
#8 0x0000000000406e8c in ?? ()
#9 0x00007ffff788b9ed in __libc_start_main () from /lib/libc.so.6
#10 0x00000000004040b9 in ?? ()
#11 0x00007fffffffe688 in ?? ()
#12 0x000000000000001c in ?? ()
#13 0x0000000000000003 in ?? ()
#14 0x00007fffffffe9b0 in ?? ()
#15 0x00007fffffffe9c0 in ?? ()
#16 0x00007fffffffe9c4 in ?? ()
#17 0x0000000000000000 in ?? ()

Sorry for so much posts but I din't find an edit function or something like this ;-)

Martin
Comment by Xavier (shining) - Tuesday, 03 November 2009, 18:47 GMT
Does it crash in the same place (__gconv_transform_utf8_internal) with pacman --debug -Ss 123456jjjafskdjiw ?

There is not anything random in that bug, is there ? It always crashes, depending on the argument given ?

Also if you could try to recompile pacman with debug symbols, and show the output of "bt full" inside gdb.
http://wiki.archlinux.org/index.php/Debug_-_Getting_Traces#One_package_settings_only
Comment by Xavier (shining) - Tuesday, 03 November 2009, 18:54 GMT
Did this bug start happening after you upgraded glibc ? Maybe you can check your pacman log.
And try downgrading glibc to see if it solves your problem.

But if you are the only one getting the error, it is quite strange...

And which locale are you using ?
Comment by Martin (user23) - Tuesday, 03 November 2009, 19:18 GMT
Yes there's nothing random. Same input -> same error.

Here the output of the new (with -g) compiled version:

[user23@arch pacman]$ gdb pacman
GNU gdb (GDB) 7.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/pacman...done.
(gdb) set args -Ss debugger
(gdb) run
Starting program: /usr/bin/pacman -Ss debugger
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff788fffe in __gconv_transform_utf8_internal () from /lib/libc.so.6
(gdb) bt full
#0 0x00007ffff788fffe in __gconv_transform_utf8_internal () from /lib/libc.so.6
No symbol table info available.
#1 0x00007ffff78f069b in mbrtowc () from /lib/libc.so.6
No symbol table info available.
#2 0x00007ffff7915d0d in build_wcs_upper_buffer () from /lib/libc.so.6
No symbol table info available.
#3 0x00007ffff79163d8 in re_string_reconstruct () from /lib/libc.so.6
No symbol table info available.
#4 0x00007ffff791caad in re_search_internal () from /lib/libc.so.6
No symbol table info available.
#5 0x00007ffff791cc13 in regexec@@GLIBC_2.3.4 () from /lib/libc.so.6
No symbol table info available.
#6 0x00007ffff7bcca37 in _alpm_db_search (db=<value optimized out>, needles=<value optimized out>) at db.c:399
pkg = 0x70c970
matched = <value optimized out>
name = 0x70caa0 "scim-hangul"
desc = 0x89c4f0 "SCIM 한글 (hangul) input method engine for Korean language"
reg = {buffer = 0x741850 "@\031t", allocated = 224, used = 224, syntax = 4436924, fastmap = 0x741740 "", translate = 0x0, re_nsub = 0, can_be_null = 0, regs_allocated = 0,
fastmap_accurate = 1, no_sub = 1, not_bol = 0, not_eol = 0, newline_anchor = 1}
i = 0x613540
j = 0x73d760
k = <value optimized out>
ret = 0x766150
list = 0x66c540
__func__ = "_alpm_db_search"
#7 0x0000000000409cf7 in sync_search (targets=0x613540) at sync.c:288
db = 0x613d00
freelist = 1
j = 0x0
found = 0
#8 pacman_sync (targets=0x613540) at sync.c:804
sync_dbs = 0x613970
targs = <value optimized out>
ret = <value optimized out>
#9 0x0000000000406e8c in main (argc=3, argv=0x7fffffffe6d8) at pacman.c:1064
ret = <value optimized out>
new_action = {__sigaction_handler = {sa_handler = 0x406f70 <handler>, sa_sigaction = 0x406f70 <handler>}, sa_mask = {__val = {0 <repeats 16 times>}}, sa_flags = 0,
sa_restorer = 0}
old_action = {__sigaction_handler = {sa_handler = 0, sa_sigaction = 0}, sa_mask = {__val = {0, 18446726196958199808, 169066240634241346, 145258711308305416,
148647512446746768, 12294828082875204633, 140737488348880, 140737354020016, 140737351911040, 140737346247400, 140737354020032, 140733193388033, 4294967295,
140737488347232, 0, 140737488348888}}, sa_flags = 0, sa_restorer = 0x7f6a5e40cf90}
myuid = 1000

Martin
Comment by Martin (user23) - Tuesday, 03 November 2009, 19:34 GMT
I'm using en_US.utf8.
The last upgrade of glibc was on 2009-10-28 and yesterday pacman's search worked.

Quite strange...

Martin

PS: Did not downgrade because of dependencies to other libs and tools (binutils, gcc-libs). Should I try it anyway?
Comment by Xavier (shining) - Tuesday, 03 November 2009, 19:47 GMT
What did you change between yesterday and today then ? :)

I find it interesting that it crashes on a desc containing unicode characters :
desc = 0x89c4f0 "SCIM 한글 (hangul) input method engine for Korean language"

Can you confirm that it always crashes on this description ?
Comment by Martin (user23) - Tuesday, 03 November 2009, 20:12 GMT
I'm confused...

After resuming my machine from hibernation it works without segmentation faults!

Quite mysterious...

If the error occurs again I'm going to inform you.

Thank you for your time.

Martin :)
Comment by Dan McGee (toofishes) - Wednesday, 04 November 2009, 00:26 GMT
dmcgee@galway ~
$ pacSs 한
extra/scim-hangul 0.3.2-2
SCIM 한글 (hangul) input method engine for Korean language

So I can even search for the non-latin characters here at least, and things seem to work. Looks like something got wacky with the glibc/unicode stuff.

Loading...