You are not logged in.
Hello,
I'm trying to debug a problem with nautilus. So I ran "gdb nautilus" "r" and did the steps which reproduce the bug every single time.
Output:
GNU gdb (GDB) 7.7
Copyright (C) 2014 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from nautilus...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/nautilus
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
warning: File "/usr/lib/libstdc++.so.6.0.19-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /usr/lib/libstdc++.so.6.0.19-gdb.py
line to your configuration file "/home/tim/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/tim/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
[New Thread 0x7fffe8d0f700 (LWP 7407)]
[New Thread 0x7fffe23b8700 (LWP 7408)]
[New Thread 0x7fffe19ab700 (LWP 7409)]
Initializing nautilus-dropbox 1.6.1
[New Thread 0x7fffdab21700 (LWP 7410)]
[New Thread 0x7fffda320700 (LWP 7411)]
[New Thread 0x7fffd96f6700 (LWP 7413)]
[New Thread 0x7fffd8882700 (LWP 7415)]
[Thread 0x7fffd96f6700 (LWP 7413) exited]
[Thread 0x7fffe23b8700 (LWP 7408) exited]
[New Thread 0x7fffe23b8700 (LWP 7520)]
[Thread 0x7fffe23b8700 (LWP 7520) exited]
[New Thread 0x7fffe23b8700 (LWP 7547)]
[Thread 0x7fffe23b8700 (LWP 7547) exited]
[New Thread 0x7fffe23b8700 (LWP 7574)]
[New Thread 0x7fffe0117700 (LWP 7575)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe0117700 (LWP 7575)]
0x00007ffff12f2a0c in ?? () from /usr/lib/libfreetype.so.6
I followed the Debug - Getting Traces Wiki and tracked down the owner of libfreetype.so.6, which in my case is "freetype2-infinality". I grabbed the tar archive for freetype2-infinality from the AUR and added options=(debug !strip) to the PKGBUILD and built it with "makepkg -si". I let pacman reinstall the newly created package. I rebooted for good measure and tried to debug it again with the same steps, but it still says "0x00007ffff12f2a0c in ?? () from /usr/lib/libfreetype.so.6" when nautilus segfaults. I thought the debug info in the freetype2 package would reveal now what ?? actually is. I rebuilt nautilus with ABS with a modified PKGBUILD similar to what the "Step_By_Step_Debugging_Guide" wiki says (added options=(!strip debug) instead of only (!strip) like the wiki says). I exported the "-O0 -fbuiltin -g" CXFLAGS/CXXFLAGS at the beginning ouf the build() routine and rebuild and installed the new package. Still I don't get any more debug information than with the regular packages from the repo.
I ran "gdb" and:
(gdb) file nautilus
Reading symbols from nautilus...(no debugging symbols found)...done.
Where are they? What did I do wrong? In retrospect adding options=(debug) when rebuilding was probably redundant, since it adds the "-g" CFLAG, right? I also executed "ulimit -c unlimited" and started nautilus from terminal while in my home directory but it did not create a coredump file in ~. systemd-coredumpctl also doesn't list any coredumps.
Thanks in advance,
blackout23
Last edited by blackout23 (2014-02-28 12:18:00)
Offline
using the debug option creates a second package that has the debugging symbols in it. Did you install both?
Offline
It only created one freetype2-infinality pkg.tar.xz in the PKGBUILD directory and two packages for nautilus (libnautilus-extension and nautilus), but both are also created when no debug options are set when building. I don't see an extra -dbg package or something like that.
Offline
Did you add it at the top and options got redefined? Looking at the nautilus PKGBUILD, it already uses an options array, so you need to add 'debug' to it. Note that adding '!strip' with that is nonsense, as 'debug' implies 'strip'.
Offline
Can you please post the PKGBUILDs you used?
Offline
I overlooked that both already had an options arrary, but mine was the first one. I merged them. My PKGBUILDs now look like this.
# $Id: PKGBUILD 198800 2013-11-04 16:55:53Z heftig $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgbase=nautilus
pkgname=(nautilus libnautilus-extension)
pkgver=3.10.1
pkgrel=1
pkgdesc="GNOME file manager"
arch=(i686 x86_64)
license=(GPL)
options=('!strip' '!emptydirs')
depends=(libexif gnome-desktop exempi gvfs desktop-file-utils gnome-icon-theme dconf
libtracker-sparql libnotify nautilus-sendto)
makedepends=(intltool gobject-introspection python)
url="http://www.gnome.org"
source=(http://download.gnome.org/sources/$pkgbase/${pkgver%.*}/$pkgbase-$pkgver.tar.xz)
sha256sums=('f6a532a170907d116e8ce55847c5c6cd4e03819f5f818087554f2ec2556fc727')
build() {
export CFLAGS="$CFLAGS -O0 -fbuiltin -g"
export CXXFLAGS="$CXXFLAGS -O0 -fbuiltin -g"
cd $pkgbase-$pkgver
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --disable-static \
--libexecdir=/usr/lib/nautilus \
--disable-update-mimedb \
--disable-packagekit \
--disable-schemas-compile
make
}
package_nautilus() {
depends+=(libnautilus-extension)
groups=(gnome)
install=nautilus.install
cd $pkgbase-$pkgver
make DESTDIR="$pkgdir" install
### Split libnautilus-extension
cd ..
mkdir -p n-e/usr/{lib,share}
mv "$pkgdir"/usr/include n-e/usr
mv "$pkgdir"/usr/lib/{girepository-1.0,pkgconfig} n-e/usr/lib
mv "$pkgdir"/usr/lib/libnautilus-extension.so* n-e/usr/lib
mv "$pkgdir"/usr/share/{gir-1.0,gtk-doc} n-e/usr/share
}
package_libnautilus-extension() {
pkgdesc="Library for extending the $pkgdesc"
depends=(gtk3)
mv n-e/* "$pkgdir"
}
# Maintainer: Shanto <shanto@hotmail.com>
# Contributor: JIN Xiao-Yong <jinxiaoyong@gmail.com>
# Contributor: Andre Fettouhi <A.Fettouhi@gmail.com>
pkgname=freetype2-infinality
pkgver=2.4.12
pkgrel=3
_pkgdate=20130514
_pkgrel=01
pkgdesc="TrueType font rendering library with infinality patch"
arch=(i686 x86_64)
license=('GPL')
url="http://www.infinality.net/blog/infinality-freetype-patches/"
depends=('zlib' 'bzip2' 'sh')
optdepends=(
'fontconfig-infinality: Infinality package for fontconfig (required)'
)
conflicts=('freetype2')
provides=("freetype2=$pkgver")
options=('!libtool' 'debug' '!strip')
install='install.sh'
backup=('etc/profile.d/infinality-settings.sh')
source=(
"http://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.bz2"
"http://www.infinality.net/fedora/linux/zips/freetype-infinality-${pkgver}-${_pkgdate}_${_pkgrel}-x86_64.tar.bz2"
"freetype-2.2.1-enable-valid.patch::https://projects.archlinux.org/svntogit/packages.git/plain/trunk/freetype-2.2.1-enable-valid.patch?h=packages/freetype2"
)
build() {
rm -rf "${srcdir}/freetype-${pkgver}-build"
cp -a "${srcdir}/freetype-${pkgver}" "${srcdir}/freetype-${pkgver}-build"
cd "${srcdir}/freetype-${pkgver}-build"
cat "$srcdir/"{freetype-2.2.1-enable-valid.patch,freetype-entire-infinality-patchset-20130514-01.patch} | patch -Np1
./configure --prefix=/usr
make
}
package() {
cd "${srcdir}/freetype-${pkgver}-build"
make DESTDIR="${pkgdir}" install
install -D -T "${srcdir}/infinality-settings.sh" "${pkgdir}/etc/profile.d/infinality-settings.sh"
}
md5sums=('3463102764315eb86c0d3c2e1f3ffb7d'
'4f5ff3fd3e3e56310953e25eade4a2d3'
'214119610444c9b02766ccee5e220680')
I rebuild them all with "makepkg -sif" so that I would not simply try to install the existing old pkg in my directory.
Still there is no debug package as it seems.
tim@archbox ~/Projekte/ABS/extra/nautilus % ls
pkg/ PKGBUILD src/ nautilus.install libnautilus-extension-3.10.1-1-x86_64.pkg.tar.xz nautilus-3.10.1-1-x86_64.pkg.tar.xz nautilus-3.10.1.tar.xz
tim@archbox ~/Downloads/freetype2-infinality % ls
pkg/ PKGBUILD src/ freetype-2.4.12.tar.bz2 freetype-infinality-2.4.12-20130514_01-x86_64.tar.bz2 freetype-2.2.1-enable-valid.patch install.sh freetype2-infinality-2.4.12-3-x86_64.pkg.tar.xz
Offline
If yours was the first one, it was meaningless.
In the nautilus PKGBUILD, you just added '!strip' , not 'debug', so it will create unstripped binaries in the actual package instead of creating a separate debug package. Nothing wrong with this, the debug symbols are there as part of the normal package.
In the freetype2-infinality PKGBUILD, you added both 'debug' and '!strip', which, as I said, is nonsense. I have no idea what the actual behavior would be when doing this.
Offline
So the information here is incorrect?
https://wiki.archlinux.org/index.php/De … tings_only
I omitted 'debug' for nautilus, because I think it will just add the -g flag if I'm not mistaken. I set the -g flag in build() as suggested here:
https://wiki.archlinux.org/index.php/St … gdb_output
EDIT: I just ran gdb again and now don't have ?? anymore for libfreetype.
Last edited by blackout23 (2014-02-27 16:49:52)
Offline
Yes, that information is incorrect. Editing.
Ah, I see, they define that behavior in that wiki entry. As it says, it will generate the debug symbols then not strip them into a separate package. That works, too, and would generate a single package like you're seeing.
Last edited by Scimmia (2014-02-27 16:49:14)
Offline
In the freetype2-infinality PKGBUILD, you added both 'debug' and '!strip', which, as I said, is nonsense. I have no idea what the actual behavior would be when doing this.
https://bugs.archlinux.org/task/37161#comment114906
you can always just add !strip to the options array along with debug, that way the symbols will stay in the files themselves instead of being stripped out into separate files.
Offline
Scimmia wrote:In the freetype2-infinality PKGBUILD, you added both 'debug' and '!strip', which, as I said, is nonsense. I have no idea what the actual behavior would be when doing this.
https://bugs.archlinux.org/task/37161#comment114906
Scimmia wrote:you can always just add !strip to the options array along with debug, that way the symbols will stay in the files themselves instead of being stripped out into separate files.
Yeah, my fault. I knew this at one point and obviously forgot in the last few months.
Offline
It looks like mergeing the options arrays fixed it. I have both packages built from the PKGBUILDs above and gdb now gives me more output. I only checked if it would create an extra debug package, but did not test if I can debug with the new packages untill now.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe004b700 (LWP 10883)]
_lcd_stem_align (bitmap=bitmap@entry=0x7fffb406ca88, mode=mode@entry=FT_RENDER_MODE_LCD, slot=slot@entry=0x7fffb406c9f0, translate_value=translate_value@entry=0x7fffe00464e8, scale_value=scale_value@entry=0x7fffe004649c, alignment_strength=100, fitting_strength=100, embolden_value=embolden_value@entry=0x7fffe00464dc)
at /home/tim/Downloads/freetype2-infinality/src/freetype-2.4.12-build/src/smooth/ftsmooth.c:1689
1689 char *cur_width_env = getenv( "CUR_WIDTH" );
bt full now also looks more useful.
(gdb) bt full
#0 _lcd_stem_align (bitmap=bitmap@entry=0x7fffb406ca88, mode=mode@entry=FT_RENDER_MODE_LCD, slot=slot@entry=0x7fffb406c9f0, translate_value=translate_value@entry=0x7fffe00464e8, scale_value=scale_value@entry=0x7fffe004649c, alignment_strength=100, fitting_strength=100,
embolden_value=embolden_value@entry=0x7fffe00464dc) at /home/tim/Downloads/freetype2-infinality/src/freetype-2.4.12-build/src/smooth/ftsmooth.c:1689
width = 63
height = 21
segments = <optimized out>
leftmost_segment = <optimized out>
rightmost_segment = <optimized out>
leftmost_segment_not_extrema = <optimized out>
rightmost_segment_not_extrema = <optimized out>
stems = <optimized out>
possible_stems = <optimized out>
known_stem_values = <optimized out>
centers = <optimized out>
leftmost_point = 16128
rightmost_point = 0
leftmost_point_not_extrema = 16128
rightmost_point_not_extrema = 0
num_segments = 0
num_centers = 0
stem_centers = 0x7fffe00269f0
h = <optimized out>
valid_stems = 0
valid_possible_stems = 0
center = <optimized out>
stem_matches = <optimized out>
stem_matches_ledge = <optimized out>
stem_matches_redge = <optimized out>
next_center = <optimized out>
last_matching_center = <optimized out>
last_matching_ledge = <optimized out>
last_matching_redge = <optimized out>
this_center = <optimized out>
max_strength = <optimized out>
line = 0x7fffb4050320 ""
current_value = 0
xx = <optimized out>
linearHoriAdvance = 1569
m_horiBearingX = 128
m_horiAdvance = 1600
m_width = 1344
strategy_use_m_control = 0 '\000'
strategy_also_use_edge_detection_for_stems = 0 '\000'
strategy_bearing_correction = 1 '\001'
---Type <return> to continue, or q <return> to quit---
ppem = 0
checked_use_known_settings_on_selected_fonts_env = 0 '\000'
use_known_settings_on_selected_fonts = 0 '\000'
cur_width = 32767
cur_width_env = <optimized out>
#1 0x00007ffff12f6f3c in ft_smooth_render_generic (render=0xd5f0d0, slot=slot@entry=0x7fffb406c9f0, mode=FT_RENDER_MODE_LCD, origin=0x0, required_mode=required_mode@entry=FT_RENDER_MODE_LCD) at /home/tim/Downloads/freetype2-infinality/src/freetype-2.4.12-build/src/smooth/ftsmooth.c:3895
error = 0
outline = 0x7fffb406cab8
cbox = {xMin = 320, yMin = -1472, xMax = 1536, yMax = -128}
width = 63
height = <optimized out>
pitch = <optimized out>
bitmap = 0x7fffb406ca88
memory = 0x8a82b0
hmul = <optimized out>
vmul = <optimized out>
x_shift = 256
y_shift = -1472
y_top = <optimized out>
params = {target = 0x7fffb406ca88, source = 0x7fffb406cab8, flags = 1, gray_spans = 0x7fffe0046640, black_spans = 0x7fffe0046644, bit_test = 0x7fffe0046648, bit_set = 0x9, user = 0x7ffff41df9d7 <__add_to_environ+967>, clip_box = {xMin = 6072058837212484931, yMin = 140737239467763, xMax = 0,
yMax = 140736214137232}}
have_translated_origin = 0 '\000'
have_outline_shifted = 1 '\001'
have_buffer = 1 '\001'
scaleMat = {xx = 0, xy = 14016496, yx = 140737488344112, yy = 1}
translate_value = 0
scale_value = 1
align_called = <optimized out>
chromeos_style_sharpening_strength = 0
checked_chromeos_style_sharpening_strength = 1
alignment_strength = 100
fitting_strength = 100
checked_alignment_strength = 1
checked_fitting_strength = 1
checked_fringe_filter_strength = 1
fringe_filter_strength = 0
checked_grayscale_filter_strength = 1
grayscale_filter_strength = 0
checked_autohint_horizontal_stem_darken_strength = 1
autohint_horizontal_stem_darken_strength = 10
checked_autohint_vertical_stem_darken_strength = 1
autohint_vertical_stem_darken_strength = 25
windows_style_sharpening_strength = 5
---Type <return> to continue, or q <return> to quit---
checked_windows_style_sharpening_strength = 1
gamma_correction_value = 1
gamma_correction_lt = 0
checked_gamma_correction_value = 1
brightness_value = 0
checked_brightness_value = 1
contrast_value = 0
checked_contrast_value = 1
snapping_sliding_scale_value = 40
checked_snapping_sliding_scale_value = 1
global_embolden_x_value = 0
checked_global_embolden_x_value = 1
global_embolden_y_value = 0
checked_global_embolden_y_value = 1
bold_embolden_x_value = 0
checked_bold_embolden_x_value = 1
bold_embolden_y_value = 0
checked_bold_embolden_y_value = 1
chromeos_cutoff = <optimized out>
chromeos_gamma_value = <optimized out>
embolden_value = 0
autohinted = 0 '\000'
autohint_minimum_stem_height = 0
checked_autohint_minimum_stem_height = 1
checked_use_various_tweaks_env = 1
use_various_tweaks = <optimized out>
cur_width = 0
cur_width_env = <optimized out>
checked_use_known_settings_on_selected_fonts_env = 1
use_known_settings_on_selected_fonts = <optimized out>
#2 0x00007ffff12f859f in ft_smooth_render_lcd (render=<optimized out>, slot=0x7fffb406c9f0, mode=<optimized out>, origin=<optimized out>) at /home/tim/Downloads/freetype2-infinality/src/freetype-2.4.12-build/src/smooth/ftsmooth.c:4152
error = 1600
#3 0x00007ffff12a8313 in FT_Render_Glyph_Internal (library=0xd5dff0, slot=0x7fffb406c9f0, render_mode=FT_RENDER_MODE_LCD) at /home/tim/Downloads/freetype2-infinality/src/freetype-2.4.12-build/src/base/ftobjs.c:4120
node = 0xd5f160
update = 0 '\000'
error = 7
renderer = 0xd5f0d0
#4 0x00007ffff62d2de3 in ?? () from /usr/lib/libcairo.so.2
No symbol table info available.
#5 0x00007ffff6274be8 in ?? () from /usr/lib/libcairo.so.2
No symbol table info available.
[...]
Last edited by blackout23 (2014-02-27 16:58:23)
Offline