Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96073 - xine-ui crashes on several events (hardened issue)
Summary: xine-ui crashes on several events (hardened issue)
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-14 07:01 UTC by Attila Stehr
Modified: 2006-04-25 16:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
(part of) strace - xine (xine-ui) crashes (xine 0.99.4 crash strace,36.03 KB, application/octet-stream)
2005-07-27 18:23 UTC, Attila Stehr
Details
output of xine-0.99.4 strace as stated in comments #47 and #48 (xine.strace,525.40 KB, application/octet-stream)
2006-04-24 15:48 UTC, Attila Stehr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Stehr 2005-06-14 07:01:53 UTC
examples:
1) right-clicking twice in the video window -> crash
2) when I click on one of the items shown on first click in the video window it
crashes as well
3) in the playlist-window on using the close icon of the window manager (that
'x' top right of the window) or any other 'sub'window --> crash

Closing the control window causes no problems ... but that 'x' does not come
from the window manager. So must be something with those?!

I use xorg gdm and metacity.

Reproducible: Always
Steps to Reproduce:
see details



Expected Results:  
1) showing stuff that's shown when I click the first time 
2) dunno what - but no crash
3) closing the sub window

Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May 30 2005, 19:34:17)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.6.3, 1.5, 1.7.9-r1, 1.4_p6, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /usr/X11R6/bin/startx /etc/env.d"
CXXFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig candy ccache distlocks sandbox severe sfperms
strict test"
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
ftp://ftp.gentoo.mesh-solutions.com/gentoo/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LINGUAS="de_DE@euro"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X aac acpi alsa amd64 avi berkdb bitmap-fonts bzlib cdr crypt cups curl dga
directfb dlloader dts dvd dvdr dvdread eds emacs encode esd exif fam fbcon
ffmpeg font-server foomaticdb fortran gdbm gif gimpprint gnome gpm gstreamer gtk
gtk2 hal hardened howl imagemagick imlib ipv6 ithreads javascript jp2 jpeg lcms
libwww lzo lzw lzw-tiff mad matroska memlimit mikmod mmap mng mozdevelop mozsvg
mp3 mpeg ncurses nls nptl nvidia ogg oggvorbis openal opengl oss pam pda pdflib
perl png ppds python quicktime readline real sdl slang ssl svg tcltk tcpd test
tetex tga threads tidy tiff truetype truetype-fonts type1-fonts unicode usb
userlocales videos vorbis wmf xine xml2 xmms xpm xprint xrandr xv xvid xvmc zlib
linguas_de_DE@euro userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS, PORTDIR_OVERLAY



magic atti # emerge -pv xorg-x11 gnome gdm metacity xine-lib xine-ui

These are the packages that I would merge, in order:

Calculating dependencies                 ...done!
[ebuild   R   ] x11-base/xorg-x11-6.8.2-r1  (-3dfx) (-3dnow) +bitmap-fonts -cjk
-debug +dlloader -dmx -doc +font-server +hardened -insecure-drivers +ipv6
-minimal (-mmx) +nls +opengl +pam -sdk (-sse) -static +truetype-fonts
+type1-fonts (-uclibc) +xprint +xv 0 kB
[ebuild     U ] www-client/epiphany-1.6.0-r3 [1.4.8] -debug -doc 0 kB
[ebuild     U ] gnome-extra/evolution-webcal-2.2.0 [2.0.1] -debug 135 kB
[ebuild  NS   ] gnome-extra/libgtkhtml-3.6.1  -debug 1,325 kB
[ebuild  NS   ] gnome-extra/gal-2.4.1  -debug -doc 1,168 kB
[ebuild     U ] mail-client/evolution-2.2.1.1 [2.0.4] +crypt -debug -doc
+gstreamer +ipv6 -kerberos -ldap (-mono) -mozilla -nntp +pda -spell +ssl 13,086 kB
[ebuild     U ] gnome-base/gnome-2.10-r1 [2.8.3-r1] -accessibility +cdr +dvdr
+hal 0 kB
[ebuild   R   ] gnome-base/gdm-2.6.0.9-r2  -debug +ipv6 +pam (-selinux) +tcpd
-xinerama 0 kB
[ebuild   R   ] x11-wm/metacity-2.10.0  -debug -xinerama 0 kB
[ebuild   R   ] media-libs/xine-lib-1.0-r2  +X +aac -aalib +alsa (-altivec)
-arts -cle266 -debug +directfb +dvd -dxr3 +esd +fbcon +ffmpeg -flac +gnome -i8x0
+ipv6 -libcaca +mng +nls +nvidia +opengl +oss +png -samba +sdl -speex -theora*
-v4l -vidix +vorbis (-win32codecs) -xinerama +xv +xvmc 0 kB
[ebuild  N    ] media-video/xine-ui-0.99.3  +X -aalib +directfb -lirc +nls 0 kB

Total size of downloads: 15,716 kB
magic atti #
Comment 1 Attila Stehr 2005-06-14 07:08:43 UTC
corrected: xine-ui crashes ( not xine ... at least I think so)
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-06-14 07:31:51 UTC
can you run "strace xine" and attach a file with the last, say, 10 or 20 lines 
of the output? 
 
thanks 
Comment 3 Attila Stehr 2005-06-14 09:28:56 UTC
atti@magic ~ $ strace -c /usr/bin/xine
Dies ist xine (X11 gui) - Ein freier Video-Player v0.99.3.
(c) 2000-2004 Das xine Team.
xiTK received SIGSEGV signal, RIP.
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 34.62    0.033379          87       383           write
 18.03    0.017386          10      1740        22 read
  9.77    0.009420           6      1494      1081 open
  6.93    0.006682          18       379         1 futex
  5.65    0.005444          23       237           select
  4.01    0.003866           7       579           mmap
  3.51    0.003382         154        22           writev
  2.72    0.002620           4       671         1 ioctl
  2.53    0.002437           6       440           fstat
  1.91    0.001842           7       260           munmap
  1.45    0.001394           6       222           lseek
  1.34    0.001292           6       204           mprotect
  1.21    0.001165           8       142           brk
  1.18    0.001139           7       172        24 stat
  1.02    0.000987           2       414           close
  0.95    0.000916           7       128           shmdt
  0.77    0.000738           6       128           shmget
  0.64    0.000614           5       128           shmat
  0.22    0.000216         216         1           execve
  0.22    0.000212           2       129           shmctl
  0.22    0.000212          42         5         3 connect
  0.20    0.000191           7        29           tgkill
  0.18    0.000172          11        16           clone
  0.11    0.000103           6        16           getdents
  0.10    0.000098          25         4           readv
  0.08    0.000073           6        12         2 access
  0.06    0.000062           2        33           fcntl
  0.06    0.000056           9         6           socket
  0.05    0.000044          44         1           shutdown
  0.04    0.000036           5         8           sched_get_priority_min
  0.04    0.000034          34         1           bind
  0.03    0.000030           2        16           uname
  0.03    0.000026           2        12           rt_sigaction
  0.02    0.000024           6         4           pipe
  0.02    0.000022           2        10           clock_gettime
  0.02    0.000020          20         1           utime
  0.02    0.000015           5         3         3 mkdir
  0.01    0.000012           2         8           getuid
  0.01    0.000007           7         1           getcwd
  0.01    0.000006           2         4           rt_sigprocmask
  0.01    0.000006           6         1         1 unlink
  0.01    0.000006           2         4           getppid
  0.01    0.000005           2         3           getrlimit
  0.00    0.000004           4         1           _sysctl
  0.00    0.000003           1         3           nanosleep
  0.00    0.000003           3         1           listen
  0.00    0.000003           3         1           setreuid
  0.00    0.000003           2         2           sched_get_priority_max
  0.00    0.000002           2         1           dup2
  0.00    0.000002           2         1           setuid
  0.00    0.000002           2         1           geteuid
  0.00    0.000002           2         1           sched_getparam
  0.00    0.000002           2         1           sched_getscheduler
  0.00    0.000002           2         1           arch_prctl
  0.00    0.000002           2         1           clock_getres
  0.00    0.000001           1         1           set_tid_address
------ ----------- ----------- --------- --------- ----------------
100.00    0.096422                  8087      1138 total
Comment 4 Attila Stehr 2005-06-14 10:08:08 UTC
ups, I did -c

'strace /usr/bin/xine' gives this:
(I had to type this myself since copy was not possible - so it may contain typos
altough I checked that.)

[some xine version etc. text]
xiTK received SIGSEV signal, RIP.
/bin/sh: line 1: 22085 aborted
LD_PRELOAD=/lib64/libpcprofile.so
PCPROFILE_OUTPUT=/tmp/xtrace.hcNt7j /use/bin/xine

magic atti # file /tmp/xtrace.hcNt7j
/tmp/xtrace.hcNt7j: fifo (named pipe)
magic atti # cat /tmp/xtrace.hcNt7j
<ctrl-c>
magic atti #
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-12 11:27:21 UTC

*** This bug has been marked as a duplicate of 64818 ***
Comment 6 Attila Stehr 2005-07-12 13:29:46 UTC
This bug relates to a similar problem but _not_ the _same_!

example:
I can play video files using XINE so it's _not a duplicate of bug # 64818 !!!

hence reopened
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-12 13:40:06 UTC
Actually the stray sigsegv seems to be all the same also if they happens in 
different points afaics from the reports. 
Anyway, can you try with -r3 and alsa-driver 1.0.9a to see what happens ? 
I still can't reproduce the bug oh three systems at least. 
 
Comment 8 Attila Stehr 2005-07-12 16:11:35 UTC
-------------snip--------------------
>>> md5 src_uri ;-) alsa-driver-1.0.9b.tar.bz2
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.12-gentoo-r4
 * Checking for suitable kernel configuration options
-------------snip------------------
checking for built-in ALSA... "yes"
configure: error: You have built-in ALSA in your kernel.

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/alsa-driver-1.0.9b/work/alsa-driver-1.0.9b/config.log

!!! ERROR: media-sound/alsa-driver-1.0.9b failed.
!!! Function econf, Line 485, Exitcode 0
!!! econf failed
---------------snip-------------------

That's how I want it to be ... built-in ALSA in my kernel...
... hum ...
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-12 16:20:17 UTC
in-kernel drivers *does* have problems. Please don't use them. 
Comment 10 Attila Stehr 2005-07-12 17:19:56 UTC
Just emerging xine-lib-1.0-r3 didn't do it.

Then I build a kernel without ALSA support and emerged alsa-driver. Now I have
no sound at all *grmpf*. I can use alsa-mixer without any result.
Maybe a config probelm?! It's too late now to check that - maybe tomorrow.

In case kernel-build-in ALSA support is buggy, that sould be mentioned in the
manual!
Comment 11 Attila Stehr 2005-07-12 18:03:42 UTC
STATUS:
- sound works now (ALSA not build in kernel)
- _problem_remains_


magic linux #  emerge -pvD alsa-driver

These are the packages that I would merge, in order:

Calculating dependencies   ...done!
[ebuild     UD] media-sound/alsa-headers-1.0.8 [1.0.9b] 0 kB
[ebuild     UD] media-sound/alsa-driver-1.0.8 [1.0.9b] -doc +oss 0 kB

Total size of downloads: 0 kB

I still think, that it's not a xine but a xine-ui bug.

------------------

btw, citation from http://www.gentoo.org/doc/en/alsa-guide.xml
> 
> The two options are :
>
>   1. Use ALSA provided by your kernel. This is the preferred/recommended method.
>   2. Use Gentoo's media-sound/alsa-driver package.
>
> So...
>
> The main difference between using alsa-driver and ALSA that comes with the kernel 
> is that alsa-driver is generally more up to date than the version in the kernel. 
> Since this does not make any huge difference as such, you are encouraged to use 
> the ALSA provided by the kernel. 
Comment 12 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-13 01:07:59 UTC
I know about the ALSA guide, I already asked to update it accordly as 
alas-driver fixes more than a couple of problems. 
 
Anyway, I really though it was a xine problem as I never seen xine-ui crashing 
so badly, my fault, I'm sorry. 
 
Can you try building it with debug information (CFLAGS="-g -ggdb3 -pipe" 
FEATURES="nostrip" USE="debug") and try to get a backtrace for it? 
 
Comment 13 Attila Stehr 2005-07-13 04:11:01 UTC
okay, results:

// start in xterm

magic atti # xine
Dies ist xine (X11 gui) - Ein freier Video-Player v0.99.3.
(c) 2000-2004 Das xine Team.
xiTK received SIGSEGV signal, RIP.


// using gdb xine / xine-ui crashes instantly
// didn't find a coredump file to use with gdb either

magic atti # gdb xine
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/xine
Dies ist xine (X11 gui) - Ein freier Video-Player v0.99.3.
(c) 2000-2004 Das xine Team.

Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
(gdb) bt
No stack.
(gdb)



magic atti # strace xine
(right-clicking twice in play window)
[...]
ioctl(4, FIONREAD, [0])                 = 0
select(5, [4], NULL, NULL, {0, 33000})  = 0 (Timeout)
ioctl(4, FIONREAD, [0])                 = 0
select(5, [4], NULL, NULL, {0, 33000})  = 0 (Timeout)
ioctl(4, FIONREAD, [0])                 = 0
select(5, [4], NULL, NULL, {0, 33000})  = 1 (in [4], left {0, 23000})
ioctl(4, FIONREAD, [96])                = 0
read(4, "\n\3 \r_\4\340\2\0\0\0\0\0\0\0\0p\324\372\377\377\177\0"..., 96) = 96
ioctl(4, FIONREAD, [0])                 = 0
select(5, [4], NULL, NULL, {0, 33000})  = 1 (in [4], left {0, 33000})
ioctl(4, FIONREAD, [32])                = 0
read(4, "\4\3 \rt\331\16\0X\0\0\0]\4\340\2\0\0\0\0\264\1#\1\256"..., 32) = 32
write(4, "\3\23\2\0]\4\340\2\16@\2\0]\4\340\2", 16) = 16
read(4, 0x7fffffe9aff0, 32)             = -1 EAGAIN (Resource temporarily
unavailable)
select(5, [4], NULL, NULL, NULL)        = 1 (in [4])
read(4, "\1\0!\r\3\0\0\0!\0\0\0\1\0\0\1\377\377\377\377\0\0\0\0"..., 32) = 32
read(4, "\177\340\342\0\177\340b\0\0\0\6\0", 12) = 12
read(4, "\1\30\"\r\0\0\0\0X\0\0\0\6\0\23\0P\2\300\1\0\0b\0\260\320"..., 32) = 32
write(4, "+\23\1\0", 4)                 = 4
read(4, 0x7fffffe9b030, 32)             = -1 EAGAIN (Resource temporarily
unavailable)
select(5, [4], NULL, NULL, NULL)        = 1 (in [4])
read(4, "\1\1#\r\0\0\0\0]\4\340\2\0\0\0\0\360\331\372\377\377\177"..., 32) = 32
write(4, "\f\23\4\0]\4\340\2@\0\2\0\0\0\0\0*\2\3\0]\4\340\2\0\0\0"..., 44) = 44
read(4, 0x7fffffe95d10, 32)             = -1 EAGAIN (Resource temporarily
unavailable)
select(5, [4], NULL, NULL, NULL)        = 1 (in [4])
read(4, "\1\0&\r\3\0\0\0!\0\0\0\1\0\0\1\377\377\377\377\0\0\0\0"..., 32) = 32
read(4, "\177\340\342\0\177\340b\0\0\0\6\0", 12) = 12
read(4, "\1\30\'\r\0\0\0\0X\0\0\0L\2\350\2\10\2d\0\0\0b\0\260\320"..., 32) = 32
write(4, "&\23\2\0]\4\340\2", 8)        = 8
read(4, 0x7fffffe95d90, 32)             = -1 EAGAIN (Resource temporarily
unavailable)
select(5, [4], NULL, NULL, NULL)        = 1 (in [4])
read(4, "\1\1(\r\0\0\0\0X\0\0\0\0\0\0\0\264\1#\1\256\1\367\0\20"..., 32) = 32
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
getppid()                               = 26356
getppid()                               = 26356
write(2, "xiTK received SIGSEGV signal, RI"..., 35xiTK received SIGSEGV signal, RIP.
) = 35
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(26357, 26357, SIGABRT)           = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++


-------------------------

btw 
1) I have to run alsaconf after each boot to have sound - I'm going to use
'kernel-ALSA' if I can't fix that.

2) What's this error? (running alsaconf):

Running modules-update...
Loading driver...
 * Loading ALSA modules ...
 *   Loading: snd-card-0 ...                                                   
                                                             [ ok ] *   Loading:
snd-seq-oss ...                                                                
                                               [ ok ] *   Loading: snd-pcm-oss
...                                                                            
                                   [ ok ] *   Loading: snd-ioctl32 ...
FATAL: Error inserting snd_ioctl32
(/lib/modules/2.6.12-gentoo-r4/alsa-driver/acore/ioctl32/snd-ioctl32.ko):
Unknown symbol in module, or unknown parameter (see dmesg)                     
                                                                               
                   [ ok ] * Restoring Mixer Levels ...                         
                                                                               
      [ ok ]Setting default volumes...
Comment 14 Attila Stehr 2005-07-13 04:16:29 UTC
correction:
Right clicking once in the play window is enough to crash xine / xine-ui - doing
strace || start from xterm.
Instant crash only on gdb.

Hope z info before helps somehow. :o)
Comment 15 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-13 10:47:40 UTC
Ok this time it's something strange. 
I've just reemerged xine-ui, with no practical change, and it crashes also for 
me... i can investigate it now. 
 
Comment 16 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-20 01:45:15 UTC
Committed a patch which fixes the crashes on right click on 0.99.3-r2. 
 
Please report if the original problem is still an issue. 
 
Comment 17 Attila Stehr 2005-07-21 03:12:31 UTC
Hey Diego,

Thx for your patch. Xine-ui doesn't crash when (_first_) clicking in the player
window anymore.

Unfortunately it still does when klicking the second time (i.e. twice or first
in player window, then elsewhere and then in player window again).

Looks like:
var click = 0;
...
if( click )
{
  click++;
  if ( click > 1 )
  {
    crash();
  }
}
Just a joke, but those behaviour is strange isn't it?
Comment 18 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-27 02:19:42 UTC
Try with 0.99.4 just committed and see if that fixes the problem. 
 
Comment 19 Attila Stehr 2005-07-27 18:22:19 UTC
Nope, xine-ui still crashes (v0.99.4).

recent strace attached
Comment 20 Attila Stehr 2005-07-27 18:23:12 UTC
Created attachment 64479 [details]
(part of) strace - xine (xine-ui) crashes
Comment 21 Pat Suwalski 2005-08-01 22:20:26 UTC
I have the same problem, but only starting with the 1.1.0 version.

If I run xine, I get the xiTK SIGSEGV. If I delete my ~/.xine directory it
starts fine. The next time I start it, it crashes again. It doesn't seem to be
able to handle its own configuration file.
Comment 22 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-08-04 10:27:39 UTC
What about 0.99.4 ? 
Comment 23 Attila Stehr 2005-08-05 03:43:17 UTC
:( problem persists

FEATURES="nostrip" USE="debug" ACCEPT_KEYWORDS="~amd64" emerge xine-ui

magic atti # gdb --args xine
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/xine
Dies ist xine (X11 gui) - Ein freier Video-Player v0.99.4.
(c) 2000-2004 Das xine Team.

Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
(gdb) bt
No stack.

...dunno how to debug furter...
Comment 24 Attila Stehr 2005-08-05 04:08:01 UTC
after reemerging xine-libs with the same options as xine-ui gdb says this

-------------snip--------------
#5349 0x00002aaaaabc1fb0 in ?? ()
#5350 0x00002aaaaaaab5b8 in ?? ()
#5351 0x00002aaaaaaab754 in ?? ()
#5352 0x00002aaaaaaab2a0 in ?? ()
#5353 0x00002aaaaaefc6e8 in ?? ()
#5354 0x00002aaaaabc2368 in ?? ()
#5355 0x00000002aabc2368 in ?? ()
#5356 0x0000000000000000 in ?? ()
#5357 0x0000000000000000 in ?? ()
#5358 0x0000000000000001 in ?? ()
#5359 0x00002aaaac9c42f0 in ?? ()
#5360 0x00002aaaaaaab818 in ?? ()
#5361 0x00000000000002e8 in ?? ()
#5362 0x00007fff00000000 in ?? ()
#5363 0x00002aaaaaefc6e8 in ?? ()
#5364 0x0000000000000000 in ?? ()
#5365 0x0000000000000001 in ?? ()
#5366 0x00007ffffff4da98 in ?? ()
#5367 0x00002aaaaabc2cf0 in ?? ()
#5368 0x00002aaaaabc2368 in ?? ()
#5369 0x00002aaaaaab924b in ?? ()
#5370 0x00002aaaacbf3b40 in ?? ()
#5371 0x00000000e8b0ac89 in ?? ()
#5372 0x00007ffffff4db80 in ?? ()
#5373 0x000005c4e8b0ae5c in ?? ()
#5374 0x00002aaaaabc2980 in ?? ()
#5375 0x00002aaaaaab2c8f in ?? ()
#5376 0x00002aaaaabc2368 in ?? ()
#5377 0x00002aaaaaaad8f2 in ?? ()
#5378 0x0000000000000000 in ?? ()
#5379 0x0000000000000000 in ?? ()
#5380 0x0000000000000000 in ?? ()
#5381 0x0000000000000000 in ?? ()
#5382 0x0000000000000000 in ?? ()
#5383 0x0000000000000000 in ?? ()
#5384 0x00002aaaabae5350 in ?? ()
#5385 0x00002aaaaca7f6a0 in ?? ()
#5386 <signal handler called>
#5387 0x0000000000800000 in ?? ()
Cannot access memory at address 0x10
Comment 25 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-08-05 04:18:11 UTC
Please set your flags to "-g -ggdb3 -O1", else the backtrace is useless. 
Comment 26 Attila Stehr 2005-08-05 04:49:51 UTC
This http://www.gentoo.org/doc/en/bugzilla-howto.xml is _not_ sufficient then!
Comment 27 Attila Stehr 2005-08-05 06:44:08 UTC
magic atti # gdb -arg xine
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/xine
Dies ist xine (X11 gui) - Ein freier Video-Player v0.99.4.
(c) 2000-2004 Das xine Team.

Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
(gdb) bt
No stack.
(gdb)

----------
FEATURES="nostrip" USE="debug" ACCEPT_KEYWORDS="~amd64" emerge xine-lib
FEATURES="nostrip" USE="debug" ACCEPT_KEYWORDS="~amd64" emerge xine-ui

Portage 2.0.51.22-r2 (default-linux/amd64/2004.3/lib64, gcc-3.4.3,
glibc-2.3.5-r0, 2.6.12-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O1 -pipe -fomit-frame-pointer -g -ggdb3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /usr/X11R6/bin/startx /etc/env.d"
CXXFLAGS="-march=athlon64 -O1 -pipe -fomit-frame-pointer -g -ggdb3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy distlocks nostrip sandbox severe sfperms strict test"
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
ftp://ftp.gentoo.mesh-solutions.com/gentoo/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa amd64 audiofile avi berkdb bitmap-fonts bzlib cdr crypt
cups curl dbus debug dga directfb dlloader dmalloc dpms dts dvd dvdr dvdread eds
emacs encode esd exif fam fame fat fbcon ffmpeg firefox flac font-server
foomaticdb fortran gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 hal hardened
howl imagemagick imlib ipv6 ithreads javascript jp2 jpeg jpeg2k kde lcms
libsamplerate libwww lzo lzw lzw-tiff mad matroska memlimit mikmod mjpeg mmap
mng mozcalendar mozdevelop mozsvg mp3 mpeg mpi multilib ncurses nls nptl
nptlonly ntfs nvidia ogg oggvorbis on-the-fly-crypt openal openexr opengl oss
pam pda pdflib perl png ppds python qt quicktime readline real reiserfs sdl
slang sndfile spell ssl svg symlink tcltk tcpd test tetex tga theora threads
tidy tiff toolbar truetype truetype-fonts type1-fonts unicode usb userlocales
videos vorbis wmf xine xml2 xmms xpm xprint xrandr xtermtoolbar xv xvid xvmc
yv12 zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, PORTDIR_OVERLAY
Comment 28 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-08-19 04:33:56 UTC
Can you all try with 0.99.4-r2 ? 
Comment 29 Attila Stehr 2005-08-20 04:02:31 UTC
- nope ... same result -



magic atti # FEATURES="nostrip" USE="debug" ACCEPT_KEYWORDS="~amd64" emerge -p
xine-ui

These are the packages that I would merge, in order:

Calculating dependencies  ...done!
[ebuild   R   ] media-video/xine-ui-0.99.4-r2



magic atti # xine
Dies ist xine (X11 gui) - Ein freier Video-Player v0.99.4.
(c) 2000-2004 Das xine Team.
xiTK received SIGSEGV signal, RIP.
Abgebrochen



magic atti # gdb -arg xine
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/xine
Dies ist xine (X11 gui) - Ein freier Video-Player v0.99.4.
(c) 2000-2004 Das xine Team.

Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
(gdb) bt
No stack.
(gdb)
Comment 30 Martin Wegner 2005-08-26 08:21:48 UTC
Same error here with

% emerge -pv xine-lib xine-ui

These are the packages that I would merge, in order:

Calculating dependencies    ...done!
[ebuild   R   ] media-libs/xine-lib-1.1.0-r1  +X -a52 -aac +aalib +alsa
(-altivec) -arts -cle266 -directfb -dts +dvd -dxr3 -esd +fbcon +flac +gnome
+i8x0 +imagemagick +ipv6 -libcaca +mad -mng +nls -nvidia +opengl +oss +samba
+sdl +speex +theora -v4l -vcd -vidix +vorbis +win32codecs -xinerama +xv -xvmc 0 kB 
[ebuild     U ] media-video/xine-ui-0.99.4-r2 [0.99.4-r1] +X +aalib +curl
-libcaca -lirc +ncurses +nls +readline 0 kB


% em --oneshot "=xine-lib-1.1.0"
does the trick (i. e. it works) so that only all changes from xine-lib version
1.1.0 to 1.1.0-r1 can be the reason for this.
Comment 31 Martin Wegner 2005-08-26 08:24:01 UTC
(In reply to comment #30)
> [ebuild     U ] media-video/xine-ui-0.99.4-r2 [0.99.4-r1] +X +aalib +curl
> -libcaca -lirc +ncurses +nls +readline 0 kB

Sry. Package was already updated:

[ebuild   R   ] media-video/xine-ui-0.99.4-r2  +X +aalib +curl -libcaca -lirc
+ncurses +nls +readline 0 kB 
Comment 32 Attila Stehr 2005-08-29 18:24:48 UTC
This is a hardened issue! 
I change used gcc profile to vanilla and now there is no more trouble :)

magic atti # gcc-config -l
[1] x86_64-pc-linux-gnu-3.4.4 *
[2] x86_64-pc-linux-gnu-3.4.4-hardenednopie
[3] x86_64-pc-linux-gnu-3.4.4-hardenednopiessp
[4] x86_64-pc-linux-gnu-3.4.4-hardenednossp
[5] x86_64-pc-linux-gnu-3.4.4-vanilla
magic atti # gcc-config 5
 * Switching to x86_64-pc-linux-gnu-3.4.4-vanilla compiler ...                 
                                                             [ ok ]
 * If you intend to use the gcc from the new profile in an already
 * running shell, please remember to do:

 *   # source /etc/profile

magic atti # source /etc/profile
magic atti # ACCEPT_KEYWORDS="~amd64" emerge -vD xine-ui
[...]
>>> media-video/xine-ui-0.99.4-r2 merged.


Diego: 
Sorry for keeping you busy looking for the bug when there was an easy workaround!


Special thanks go to Mr Kevin F. Quinn who told me to try it with gcc-vanilla
profile!!!
(see bug #93862 comments #12+ for details)
Comment 33 Attila Stehr 2005-08-29 19:51:38 UTC
(In reply to comment #25)
> Please set your flags to "-g -ggdb3 -O1", else the backtrace is useless. 

As I posted, that didn't help, but I guess that's connected with the used gcc
profile as well.
Now (using vanilla gcc to build the program) I get some useful backtrace
information - even w/o setting CFLAGS="-g -ggdb3 -O1". 
Maybe having no bt could - in future bug reports - be an indicator for a
hardened problem?!
Comment 34 Martin Wegner 2005-09-14 03:26:38 UTC
I had the same error (comment #30) with no hardened gcc profile.

Now it WORKSFORME with xine-lib-1.1.0-r4 and xine-ui-0.99.4-r2 .
Comment 35 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-29 04:40:16 UTC
Seems like this was fixed in recent versions... 
Comment 36 Attila Stehr 2005-11-30 19:04:44 UTC
I'm using media-video/xine-ui-0.99.3-r1 atm and would not like to downgrade...
Should I say verified then or can this be be "resolved worksforme" fot the time
being?
Comment 37 Attila Stehr 2006-01-30 10:04:22 UTC
Recent version (0.99.4-r3) crashes when right klicking...

atti@magic ~ $ xine
Dies ist xine (X11 gui) - Ein freier Video-Player v0.99.4.
(c) 2000-2004 Das xine Team.
xiTK received SIGSEGV signal, RIP.
Abgebrochen (core dumped)
atti@magic ~ $


[ebuild   R   ] media-video/xine-ui-0.99.4-r3  +X -aalib +curl -libcaca -lirc +ncurses +nls +readline -xinerama 0 kB
Comment 38 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-17 07:29:36 UTC
Please provide backtraces from gdb of the crashes, as this bug is really really too vague to help.

To have meaningful backtraces you have to do this:

build xine-ui and xine-lib adding "-ggdb -fno-inline" to your CFLAGS, and "splitdebug" to your FEATURES (for portage 2.1, or nostrip for 2.0); remember to remove "-s" from LDFLAGS if you use it. If you're on x86, please also drop "-fomit-frame-pointer" flag from CFLAGS (enable ffmpeg useflag on xine-lib, that will as it allows you to build ffmpeg code with that flag, but the rest of xine without it).

Open a new bug for the backtraces if there's not one already for a similar backtrace.

Also make sure you're using version 1.1.2_pre20060328.
Comment 39 solar (RETIRED) gentoo-dev 2006-04-17 08:20:59 UTC
If using a hardened toolchain be sure to also use. 
-fno-pie -fno-stack-protector then paxctl -permsx /path/to/program

This site kinda has ok details on debugging with a hardened toolchain.
http://gentoo-wiki.com/SECURITY_Debugging_with_Hardened_Gentoo
Comment 40 Attila Stehr 2006-04-22 10:03:39 UTC
(In reply to comment #38)

Hi Diego.

> Please provide backtraces from gdb of the crashes, as this bug is really 
> really too vague to help.

You're right! I apologise!

--------------------------

Anyway, meanwhile I get no crash when calling the context menu.
Maybe my problem was connected with having set up UTF-8 falsely.

Sorry for wasting your time. :-\
Comment 41 Attila Stehr 2006-04-22 10:08:52 UTC
(In reply to comment #39)
> If using a hardened toolchain be sure to also use. 
> -fno-pie -fno-stack-protector
I added these. Thanks!

> then paxctl -permsx /path/to/program
paxctl doesn't exist on my system.

magic media # paxctl
bash: paxctl: command not found

> This site kinda has ok details on debugging with a hardened toolchain.
> http://gentoo-wiki.com/SECURITY_Debugging_with_Hardened_Gentoo

The page is bookmarked not in the gentoo folder. :)

Well, I do not use the HARDENED use flag. But, I get no programs to rebuild when I try this

magic media # USE="hardened" emerge -pvDN gcc glibc binutils pax
>>> --newuse implies --update... adding --update to options.

[ebuild     UD] sys-devel/patch-2.5.9 [2.5.9-r1] -build -static 0 kB
[ebuild     U ] app-misc/pax-utils-0.1.11-r1 [0.1.10] -caps 51 kB
[ebuild  NS   ] sys-kernel/gentoo-sources-2.6.15-r7  -build -doc +symlink (-ultra1) 39,123 kB
[ebuild     U ] x11-libs/cairo-1.0.4 [1.0.2] +X -doc -glitz +png 0 kB
[ebuild     UD] app-text/ghostscript-esp-7.07.1-r8 [8.15.1] +X -cjk +cups +emacs +gtk 2 kB
[ebuild  N    ] app-arch/pax-3.3.4  161 kB

Now what do I do wrong?
Comment 42 Kevin F. Quinn (RETIRED) gentoo-dev 2006-04-22 10:49:56 UTC
(In reply to comment #41)
> (In reply to comment #39)
> > If using a hardened toolchain be sure to also use. 
> > -fno-pie -fno-stack-protector
> I added these. Thanks!
> 
> > then paxctl -permsx /path/to/program
> paxctl doesn't exist on my system.
> 
> magic media # paxctl
> bash: paxctl: command not found
>
> > This site kinda has ok details on debugging with a hardened toolchain.
> > http://gentoo-wiki.com/SECURITY_Debugging_with_Hardened_Gentoo
> 
> The page is bookmarked not in the gentoo folder. :)
> 
> Well, I do not use the HARDENED use flag.

If you use the hardened compiler, it's best to switch to the hardened profile (which will automatically set the hardened use flag).

> But, I get no programs to rebuild
> when I try this

If you intend to use the hardened compiler, it's best to add the hardened use flag.  Actually it's advisable to switch to the hardened profile, as we have different package defaults.

> magic media # USE="hardened" emerge -pvDN gcc glibc binutils pax
> >>> --newuse implies --update... adding --update to options.

app-arch/pax is a red herring; it's an archiver (like zip), nothing to do with hardened stuff.  To get paxctl, emerge paxctl (!) although you only need that if you have a PaX-enabled kernel (i.e. hardened-sources).  If you don't have a PaX-enabled kernel, you don't need to worry about the paxctl steps mentioned in the FAQ and the wiki page.

> [ebuild     UD] sys-devel/patch-2.5.9 [2.5.9-r1] -build -static 0 kB
> [ebuild     U ] app-misc/pax-utils-0.1.11-r1 [0.1.10] -caps 51 kB
> [ebuild  NS   ] sys-kernel/gentoo-sources-2.6.15-r7  -build -doc +symlink
> (-ultra1) 39,123 kB
> [ebuild     U ] x11-libs/cairo-1.0.4 [1.0.2] +X -doc -glitz +png 0 kB
> [ebuild     UD] app-text/ghostscript-esp-7.07.1-r8 [8.15.1] +X -cjk +cups
> +emacs +gtk 2 kB
> [ebuild  N    ] app-arch/pax-3.3.4  161 kB
> 
> Now what do I do wrong?

Depends what you're trying to achieve :)  If you're trying to get a gdb backtrace from xine-ui, then you need to re-emerge xine-ui with the -fno-pie/-fno-stack-protector - however if the xine-ui only fails when built with the hardened compiler, switching off PIE and SSP is almost the same as building with the vanilla compiler.  It's only useful to do that if the problem occurs when xine-ui is built with the vanilla compiler.

If the problem only occurs with the hardened compiler, you could try gdb-6.3-r5 (not 6.4) as this has patches to debug PIEs - it's not perfect though.


Could you post your current emerge --info (or confirm it's the same as comment #27)?
Comment 43 Attila Stehr 2006-04-22 14:53:49 UTC
(In reply to comment #42)

Hi Kevin :)
Thanks for your reply!

> If you use the hardened compiler, it's best to switch to the hardened profile
> (which will automatically set the hardened use flag).

How do I do that? my gcc-config is (at least I think so) the hardened profile:
magic atti # gcc-config -l
 [1] x86_64-pc-linux-gnu-3.4.5 *
 [2] x86_64-pc-linux-gnu-3.4.5-hardenednopie
 [3] x86_64-pc-linux-gnu-3.4.5-hardenednopiessp
 [4] x86_64-pc-linux-gnu-3.4.5-hardenednossp
 [5] x86_64-pc-linux-gnu-3.4.5-vanilla

> If you intend to use the hardened compiler, it's best to add the hardened use
> flag.  Actually it's advisable to switch to the hardened profile, as we have
> different package defaults.
> 
> > magic media # USE="hardened" emerge -pvDN gcc glibc binutils pax
> > >>> --newuse implies --update... adding --update to options.
> 
> app-arch/pax is a red herring; it's an archiver (like zip), nothing to do with
> hardened stuff.  To get paxctl, emerge paxctl (!) although you only need that
> if you have a PaX-enabled kernel (i.e. hardened-sources).  If you don't have a
> PaX-enabled kernel, you don't need to worry about the paxctl steps mentioned in
> the FAQ and the wiki page.
ok

 
> > [ebuild     UD] sys-devel/patch-2.5.9 [2.5.9-r1] -build -static 0 kB
> > [ebuild     U ] app-misc/pax-utils-0.1.11-r1 [0.1.10] -caps 51 kB
> > [ebuild  NS   ] sys-kernel/gentoo-sources-2.6.15-r7  -build -doc +symlink
> > (-ultra1) 39,123 kB
> > [ebuild     U ] x11-libs/cairo-1.0.4 [1.0.2] +X -doc -glitz +png 0 kB
> > [ebuild     UD] app-text/ghostscript-esp-7.07.1-r8 [8.15.1] +X -cjk +cups
> > +emacs +gtk 2 kB
> > [ebuild  N    ] app-arch/pax-3.3.4  161 kB
> > 
> > Now what do I do wrong?

Relates to
> > magic media # USE="hardened" emerge -pvDN gcc glibc binutils pax
using the hardened useflag with no effect on gcc glibc and binutils --> 

magic atti # ~/scripts/useflaginfo.sh hardened
hardened - activate default security enhancements for toolchain (gcc, glibc, binutils)
 
> Depends what you're trying to achieve :)  If you're trying to get a gdb
> backtrace from xine-ui, then you need to re-emerge xine-ui with the
> -fno-pie/-fno-stack-protector - however if the xine-ui only fails when built
> with the hardened compiler, switching off PIE and SSP is almost the same as
> building with the vanilla compiler.  It's only useful to do that if the problem
> occurs when xine-ui is built with the vanilla compiler.

I tried to get an effect setting USE="hardened"
 
> Could you post your current emerge --info (or confirm it's the same as comment
> #27)?

----------------------

Refering to my comment #41:
*sigh* I emerged the most recent (~amd64) versions of xine-lib and xine-ui and the problem occurs again. So it looks like it was not the UTF-8 setting.

I will do further investigantion tomorrow (trying the vanilla compiler and using the hardened plus the debug settings Diego and 'solar' suggested).

---------------------

My recent emerge --info is

Portage 2.0.54 (default-linux/amd64/2005.1, gcc-3.4.5, glibc-2.3.5-r2, 2.6.13-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.13-gentoo-r5 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /usr/X11R6/bin/startx /etc/env.d"
CXXFLAGS="-march=athlon64 -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy distlocks sandbox severe sfperms strict test"
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LINGUAS="de"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="7zip X a52 aac acpi alsa amd64 artworkextra asf audiofile avi berkdb bitmap-fonts bzip2 bzlib cairo cdda cdio cdr cli crypt css cups curl dbus dga directfb dlloader dmalloc dnd dpms dri dts dvd dvdr dvdread dvi eds effects emacs emboss encode esd exif expat fam fame fat fbcon ffmpeg firefox foomaticdb freetype gcj gdbm ggi gif gimpprint glut gmp gnome gpm gs gstreamer gtk gtk2 gtkhtml hal hardened howl hpn idn imagemagick imlib ipv6 isdnlog ithreads javascript jpeg jpeg2k kde lcms libcaca libsamplerate libwww linuxthreads-tls lzo lzw lzw-tiff matroska mbox memlimit milter mjpeg mmap mng mozcalendar mozdevelop mozsvg mp3 mpeg mpi nautilus ncurses nls nptl nptlonly nsplugin ntfs nvidia offensive ogg oggvorbis on-the-fly-crypt openal openexr opengl pam pcre pdflib perl png ppds pppd python qt quicktime readline reflection reiserfs rle sasl sdl session slang sndfile spell spl ssl stream svg symlink tcltk tcpd test tetex tga theora threads tidy tiff toolbar truetype truetype-fonts type1-fonts udev unicode usb userlocales vcd video_cards_nvidia videos vorbis wmf xine xml xml2 xmms xorg xosd xpm xprint xtermtoolbar xv xvid xvmc yv12 zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LDFLAGS, MAKEOPTS, PORTDIR_OVERLAY
Comment 44 Kevin F. Quinn (RETIRED) gentoo-dev 2006-04-22 16:13:44 UTC
(In reply to comment #43)
> (In reply to comment #42)
> 
> > If you use the hardened compiler, it's best to switch to the hardened profile
> > (which will automatically set the hardened use flag).
> 
> How do I do that? my gcc-config is (at least I think so) the hardened profile:

The hardened compiler and the hardened profile are different things, and you're using a standard profile, not a hardened one.  To set the profile, change the softlink /etc/make.profile to point to the hardened profile:

# rm /etc/make.profile
# cd /etc
# ln -s ../usr/portage/profiles/hardened/amd64 make.profile

(it's important the link be relative like that).

> I tried to get an effect setting USE="hardened"

That'll only affect things that build differently with that flag - most packages don't.  The hardened profile, on the other hand, changes what the default settings are for things like default packages, masked packages, default use flags etc.

> I will do further investigantion tomorrow (trying the vanilla compiler and
> using the hardened plus the debug settings Diego and 'solar' suggested).

good - first thing is to confirm whether the problem occurs for you with the vanilla compiler instead of the hardened compiler.  If it works with vanilla, try building with the hardenednopie and then hardenednossp to see if it's just SSP or just PIE that cause the breakage.

Comment 45 Attila Stehr 2006-04-23 13:08:33 UTC
(In reply to comment #44)

> > I will do further investigantion tomorrow (trying the vanilla compiler and
> > using the hardened plus the debug settings Diego and 'solar' suggested).
> 
> good - first thing is to confirm whether the problem occurs for you with the
> vanilla compiler instead of the hardened compiler.  If it works with vanilla,
> try building with the hardenednopie and then hardenednossp to see if it's just
> SSP or just PIE that cause the breakage.

- no crash with vanilla and hardenednossp compiler
- crash with: hardenednopie

PLEASE go on reading!


Then I set up make.conf like this:
_hardened_ gcc
CFLAGS          ="-march=athlon64 -O1 -pipe -fomit-frame-pointer -ggdb -fno-inline -fno-pie -fno-stack-protector"
LDFLAGS         ="-Wl,-O1"
FEATURES        ="candy severe sfperms test splitdebug"
and got no crash.

So at first sight this looks like a CFLAGS problem, but I get a crash with CFLAGS="" too.

Finally I was able to isolate the CFLAG which has to be set (for hardened gcc). It's CFLAGS "-fno-stack-protector".
Now please tell me which flags you want me to activate to produce the core file.

--------------------------

config which works:

Portage 2.0.54 (default-linux/amd64/2005.1, gcc-3.4.5, glibc-2.3.5-r2, 2.6.13-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.13-gentoo-r5 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time -pipe -fomit-frame-pointer -fno-stack-protector"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /usr/X11R6/bin/startx /etc/env.d"
CXXFLAGS="-march=athlon64 -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time -pipe -fomit-frame-pointer -fno-stack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy distlocks sandbox severe sfperms strict test"
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LINGUAS="de"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="7zip X a52 aac acpi alsa amd64 artworkextra asf audiofile avi berkdb bitmap-fonts bzip2 bzlib cairo cdda cdio cdr cli crypt css cups curl dbus dga directfb dlloader dmalloc dnd dpms dri dts dvd dvdr dvdread dvi eds effects emacs emboss encode esd exif expat fam fame fat fbcon ffmpeg firefox foomaticdb freetype gcj gdbm ggi gif gimpprint glut gmp gnome gpm gs gstreamer gtk gtk2 gtkhtml hal hardened howl hpn idn imagemagick imlib ipv6 isdnlog ithreads javascript jpeg jpeg2k kde lcms libcaca libsamplerate libwww linuxthreads-tls lzo lzw lzw-tiff matroska mbox memlimit milter mjpeg mmap mng mozcalendar mozdevelop mozsvg mp3 mpeg mpi nautilus ncurses nls nptl nptlonly nsplugin ntfs nvidia offensive ogg oggvorbis on-the-fly-crypt openal openexr opengl pam pcre pdflib perl png ppds pppd python qt quicktime readline reflection reiserfs rle sasl sdl session slang sndfile spell spl ssl stream svg symlink tcltk tcpd test tetex tga theora threads tidy tiff toolbar truetype truetype-fonts type1-fonts udev unicode usb userlocales vcd video_cards_nvidia videos vorbis wmf xine xml xml2 xmms xorg xosd xpm xprint xtermtoolbar xv xvid xvmc yv12 zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LDFLAGS, MAKEOPTS, PORTDIR_OVERLAY

CFLAGS		="-ggdb -fno-inline -fno-pie -fno-stack-protector"
Comment 46 Attila Stehr 2006-04-23 13:10:52 UTC
ups! ignore the last line ^
Comment 47 Kevin F. Quinn (RETIRED) gentoo-dev 2006-04-24 02:39:42 UTC
> - no crash with vanilla and hardenednossp compiler
> - crash with: hardenednopie
>[...]
> Finally I was able to isolate the CFLAG which has to be set (for hardened gcc).
> It's CFLAGS "-fno-stack-protector".

it would be :)  the hardenednopie compiler switches off the default ssp behind the scenes - equivalent to adding '-fno-stack-protector' to hardened gcc.

for the compiler, roughly speaking:

hardenednopie => -fstack-protector -fno-pie
hardenednossp => -fno-stack-protector -fPIE
hardened => -fstack-protector -fPIE

> Now please tell me which flags you want me to activate to produce the core
> file.

Ok; to avoid problems debugging PIEs, build it with hardenednopie, so you can use gdb, and set -ggdb using level 1 optimisation:

CFLAGS="-march=athlon64 -O1 -ggdb"

Best to avoid doing too many "fancy" optimisations when debugging, as long as the fault occurs when they're switched off.  They just confuse the debugger.

To get a core dump, make sure you unlimit the core dump size (normally it's set to zero which prevents core dumps):

# ulimit -c unlimited

So in summary, use the hardenednopie compiler, set CFLAGS to "-march=athlon64 -O1 -ggdb" and do "ulimit -c unlimited" before running xine-ui from the terminal.

That should give you a core dump that should be useful.
Comment 48 Attila Stehr 2006-04-24 14:43:42 UTC
Hi.
Looks like that didn't help... :-\

atti@magic ~ $ ulimit
unlimited
atti@magic ~ $ xine
Dies ist xine (X11 gui) - Ein freier Video-Player v0.99.4.
(c) 2000-2004 Das xine Team.
xiTK received SIGSEGV signal, RIP.
Abgebrochen (core dumped)
atti@magic ~ $ ls -l co*
-rw------- 1 atti users 187M 24. Apr 23:40 core.2934
atti@magic ~ $ gdb -core core.2934
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Core was generated by `xine'.
Program terminated with signal 6, Aborted.
#0  0x00002aaaaca60bb9 in ?? ()
(gdb) bt
#0  0x00002aaaaca60bb9 in ?? ()
(gdb) q
atti@magic ~ $ emerge info

*** You are not in the portage group. You may experience cache problems
*** due to permissions preventing the creation of the on-disk cache.
*** Please add this user to the portage group if you wish to use portage.

Portage 2.0.54 (default-linux/amd64/2005.1, gcc-3.4.5-hardenednopie, glibc-2.3.5-r2, 2.6.13-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.13-gentoo-r5 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O1 -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /usr/X11R6/bin/startx /etc/env.d"
CXXFLAGS="-march=athlon64 -O1 -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy distlocks sandbox severe sfperms splitdebug strict test"
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="7zip X a52 aac acpi alsa amd64 artworkextra asf audiofile avi berkdb bitmap-fonts bzip2 bzlib cairo cdda cdio cdr cli crypt css cups curl dbus dga directfb dlloader dmalloc dnd dpms dri dts dvd dvdr dvdread dvi eds effects emacs emboss encode esd exif expat fam fame fat fbcon ffmpeg firefox foomaticdb freetype gcj gdbm ggi gif gimpprint glut gmp gnome gpm gs gstreamer gtk gtk2 gtkhtml hal hardened howl hpn idn imagemagick imlib ipv6 isdnlog ithreads javascript jpeg jpeg2k kde lcms libcaca libsamplerate libwww linuxthreads-tls lzo lzw lzw-tiff matroska mbox memlimit milter mjpeg mmap mng mozcalendar mozdevelop mozsvg mp3 mpeg mpi nautilus ncurses nls nptl nptlonly nsplugin ntfs nvidia offensive ogg oggvorbis on-the-fly-crypt openal openexr opengl pam pcre pdflib perl png ppds pppd python qt quicktime readline reflection reiserfs rle sasl sdl session slang sndfile spell spl ssl stream svg symlink tcltk tcpd test tetex tga theora threads tidy tiff toolbar truetype truetype-fonts type1-fonts udev unicode usb userlocales vcd video_cards_nvidia videos vorbis wmf xine xml xml2 xmms xorg xosd xpm xprint xtermtoolbar xv xvid xvmc yv12 zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, MAKEOPTS, PORTDIR_OVERLAY

atti@magic ~ $

I'll add the corefile nonetheless - just in case it's useful somehow.
(Of course you can remove it if it's not!)

Give me further instructions please!
Comment 49 Attila Stehr 2006-04-24 15:42:18 UTC
Okay, that didn't work ... probably trying to upload 187MB was too much for bugzilla...

In place of the core I will add an strace output.
Comment 50 Attila Stehr 2006-04-24 15:48:05 UTC
Created attachment 85388 [details]
output of xine-0.99.4 strace as stated in comments #47 and #48
Comment 51 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-24 17:54:51 UTC
(In reply to comment #38)
> Open a new bug for the backtraces if there's not one already for a similar
> backtrace.

Really this bug is too messy to handle. 

Please open a new bug reporting the full backtrace.

Note that to get a backtrace out of gdb you have to use the command

gdb `which xine` --core $nameofthecorefile

or it won't load the symbols, so the bt won't have anything useful.
Also please run "thread apply all bt full" command to get the backtrace.
Comment 52 Attila Stehr 2006-04-25 16:03:12 UTC
Ok, bug #131277 opened. :)
Now lets mark this bug resolved invalid or something more suitable.

Thanks to all!