Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 389529 - media-gfx/povray-3.7.0_rc3 segfaults if multiple boost versions (e.g. 1.42 and 1.46) are installed
Summary: media-gfx/povray-3.7.0_rc3 segfaults if multiple boost versions (e.g. 1.42 an...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Joe Peterson (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-04 20:21 UTC by Alex Orange
Modified: 2012-02-13 05:55 UTC (History)
5 users (show)

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


Attachments
emerge --info (emerge.info,4.61 KB, text/plain)
2011-11-04 20:22 UTC, Alex Orange
Details
fix segfault with multiple boost versions installed (povray-3.7.0_rc3-boostfix.patch,324 bytes, patch)
2011-12-12 04:40 UTC, Brian G. Olson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Orange 2011-11-04 20:21:18 UTC
I've "successfully" built povray-3.7.0-rc3. However, when I run povray it spits out the following:

povray: This is a RELEASE CANDIDATE version of POV-Ray. General distribution is discouraged.
povray: cannot open the user configuration file /home/xxxxxxx/.povray/3.7/povray.conf: No such file or directory
Segmentation fault


I then tried emerge with FEATURES="test" and, as expected, got:

povray: This is a RELEASE CANDIDATE version of POV-Ray. General distribution is discouraged.
povray: cannot open the user configuration file /var/tmp/portage/media-gfx/povray-3.7.0_rc3/homedir/.povray/3.7/povray.conf: No such file or directory
make: *** [check] Segmentation fault


Reproducible: Always

Steps to Reproduce:
1. Run 'sudo FEATURES="test" emerge -av povray'
Actual Results:  
povray: This is a RELEASE CANDIDATE version of POV-Ray. General distribution is discouraged.
povray: cannot open the user configuration file /var/tmp/portage/media-gfx/povray-3.7.0_rc3/homedir/.povray/3.7/povray.conf: No such file or directory
make: *** [check] Segmentation fault


Expected Results:  
No failure.

I haven't upgraded to libpng-1.5.x yet because I simply haven't had the time. If this is the issue, the ebuild should require >=libpng-1.5 to avoid issues like this.
Comment 1 Alex Orange 2011-11-04 20:22:05 UTC
Created attachment 291685 [details]
emerge --info
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-11-05 15:48:31 UTC
Could you provide a gdb backtrace of that?
Comment 3 Joe Peterson (RETIRED) gentoo-dev 2011-11-05 17:02:45 UTC
A backtrace will definitely help.  I am also on amd64, and I do not get a seg fault.
Comment 4 Alex Orange 2011-11-06 16:31:51 UTC
Not sure how to get symbols. I'm sure it's some feature or use or something when emerging, just not sure which. It say it crashed in libboost something something, and I have already rebuild libboost just in case that was the issue. Here's the trace:

(gdb) run
Starting program: /usr/bin/povray 
[Thread debugging using libthread_db enabled]
povray: This is a RELEASE CANDIDATE version of POV-Ray. General distribution is discouraged.
[New Thread 0x7ffff5e99700 (LWP 22032)]
povray: cannot open the user configuration file /home/alex/.povray/3.7/povray.conf: No such file or directory

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6ea7601 in boost::thread::start_thread() ()
   from /usr/lib64/libboost_thread-mt-1_42.so.1.42.0
(gdb) where
#0  0x00007ffff6ea7601 in boost::thread::start_thread() ()
   from /usr/lib64/libboost_thread-mt-1_42.so.1.42.0
#1  0x00000000004255c7 in ?? ()
#2  0x000000000041ee9c in ?? ()
#3  0x000000000043f718 in ?? ()
#4  0x00007ffff63a2d4c in __libc_start_main () from /lib64/libc.so.6
#5  0x000000000040e369 in ?? ()
#6  0x00007fffffffdba8 in ?? ()
#7  0x000000000000001c in ?? ()
#8  0x0000000000000001 in ?? ()
#9  0x00007fffffffdf32 in ?? ()
#10 0x0000000000000000 in ?? ()
Comment 5 Bjoern Olausson 2011-11-16 11:13:11 UTC
I had the same problem.

Check which version of boost you have set as default:
"eselect boost list"

Make sure you have boost-1.42 set as default when compiling povray.
As soon as I switch from boost-1.42 to boost-1.46 povray compiles but segfaulst when started:

Reading symbols from /usr/bin/povray...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/povray 
[Thread debugging using libthread_db enabled]
povray: This is a RELEASE CANDIDATE version of POV-Ray. General distribution is discouraged.
[New Thread 0x7ffff3a8c700 (LWP 23002)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff64ff94e in boost::thread::start_thread() () from /usr/lib64/libboost_thread-mt-1_42.so.1.42.0


Even thought I had boost-1.46 active, povrays seems to link against 1.42

Once you compiled Povray, you can switch back to boost-1.46 as default.

Hope this helps.

Cheers,
Bjoern
Comment 6 Joe Peterson (RETIRED) gentoo-dev 2011-11-16 14:47:31 UTC
Do you have both boost 1.42 and 1.46 installed at the same time?  If so, can you try unmerging all versions of boost on your system, then re-installing only the latest boost, and then try re-merging and running povray again?  I recall some issues with multiple versions of boost installed.
Comment 7 Alex Orange 2011-11-16 23:16:16 UTC
Well, I do seem to have two versions installed.

emerge -pvc boost   

Calculating dependencies... done!
  dev-libs/boost-1.46.1-r1 pulled in by:
    stuff

>>> Calculating removal order...

>>> These are the packages that would be unmerged:

 dev-libs/boost
    selected: 1.42.0-r2 
   protected: none 
     omitted: 1.46.1-r1 

So I'm getting rid of the unneeded version and trying again.
Comment 8 Alex Orange 2011-11-16 23:37:02 UTC
That worked, I depcleaned boost and remerged povray with FEATURES test and everything worked. I'm not marking this resolved simply because this seems like a bug with boost. I don't even see anything in the portage summary.log telling me that multiple boost versions could cause problems. I would suggest something telling people that they should depclean boost. (Perhaps there is a bug that this should be marked as a duplicate of).
Comment 9 Joe Peterson (RETIRED) gentoo-dev 2011-11-16 23:43:07 UTC
Thanks for testing the multiple boost version case.

I'm CC-ing the maintainers of boost to see if they have any advice (or if this is or can be a known issue)...
Comment 10 Bjoern Olausson 2011-11-17 07:36:09 UTC
I can confirm this behavior.

Killing boost 1.42 makes Povray play nice with boost 1.46

blub@repulsion $ ldd /usr/bin/povray | grep boost
        libboost_thread-mt-1_46.so.1.46.1 => /usr/lib64/libboost_thread-mt-1_46.so.1.46.1 (0x00007f2f5f6e5000)

Cheers,
Bjoern
Comment 11 Sebastian Luther (few) 2011-11-17 13:56:19 UTC
(In reply to comment #9)
> Thanks for testing the multiple boost version case.
> 
> I'm CC-ing the maintainers of boost to see if they have any advice (or if this
> is or can be a known issue)...

Add '--with-boost-thread=boost_thread' to the econf call.
Comment 12 Joe Peterson (RETIRED) gentoo-dev 2011-11-21 21:16:02 UTC
Can one of those who is having this issue try the above suggestion and report the results here (and if successful, please post an ebuild patch)?  If it helps while two boosts are installed, I can make the change.
Comment 13 Brian G. Olson 2011-12-12 04:40:49 UTC
Created attachment 295515 [details, diff]
fix segfault with multiple boost versions installed
Comment 14 Joe Peterson (RETIRED) gentoo-dev 2012-01-24 04:38:24 UTC
Added --with-boost-thread=boost_thread-mt to config in existing -r1 revision (see bug #394639).  Please test with this new version when it hits the tree and see if it fixes this and report back here so I can mark this as fixed).  Thanks!
Comment 15 Luis Ferreira 2012-01-24 08:10:16 UTC
$ povray 
povray: This is a RELEASE CANDIDATE version of POV-Ray. General distribution is discouraged.
povray: cannot open the user configuration file /home/luis/.povray/3.7/povray.conf: No such file or directory
No input file provided
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost::lock_error
Aborted


$ eix -s povray
[I] media-gfx/povray                                                                                                                                                                
     Available versions:  3.7.0_rc3 (~)3.7.0_rc3-r1 {X debug mkl openexr tiff}                                                                                                      
     Installed versions:  3.7.0_rc3-r1(07:51:10 24-01-2012)(X openexr tiff -debug -mkl)
     Homepage:            http://www.povray.org/
     Description:         The Persistence of Vision Raytracer

[I] dev-libs/boost
     Available versions:  
        (0)     1.35.0-r2 1.35.0-r5
        (1.37)  ~1.37.0-r1
        (1.39)  ~1.39.0
        (1.41)  1.41.0-r3
        (1.42)  ~1.42.0 ~1.42.0-r1 1.42.0-r2
        (1.45)  ~1.45.0
        (1.46)  1.46.1-r1
        (1.47)  ~1.47.0 ~1.47.0-r1
        (1.48)  [M]~1.48.0-r1
        {debug doc +eselect expat icu mpi python static-libs test tools}
     Installed versions:  1.46.1-r1(1.46)(06:23:59 17-10-2011)(eselect icu mpi python -debug -doc -static-libs -test -tools)
     Homepage:            http://www.boost.org/
     Description:         Boost Libraries for C++




 emerge --info
Portage 2.1.10.41 (default/linux/amd64/10.0/no-multilib, gcc-4.4.5, glibc-2.13-r4, 3.1.6-gentoo x86_64)
=================================================================
System uname: Linux-3.1.6-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.0.3
Timestamp of tree: Tue, 24 Jan 2012 07:15:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.6-r2, 2.7.2-r3, 3.1.4-r3
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.4_p6-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.5, 4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo betelgeuse zugaina betagarden drizzt-overlay sunrise g-ctan x-layman
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://cesium.di.uminho.pt/pub/gentoo  ftp://ftp.di.fc.ul.pt/pub/linux/gentoo/  http://cesium.di.uminho.pt/pub/gentoo http://ftp.dei.uc.pt/pub/linux/gentoo/ ftp://gentoo.imj.fr/pub/gentoo/ http://130.59.10.35/ftp/mirror/gentoo/"
LANG="pt_PT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="pt en"
MAKEOPTS="-j -l9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/betelgeuse /var/lib/layman/zugaina /var/lib/layman/betagarden /var/lib/layman/drizzt-overlay /var/lib/layman/sunrise /usr/local/portage /var/lib/layman"
SYNC="rsync://ftp.rnl.ist.utl.pt/gentoo-portage"
USE="R X a52 aac aacplus aalib acl acpi addressbook adns adplug aften akonadi alsa amd64 amr apbs apng archive ares arpack aspell ass atmo attica autotrace avcodec avformat avx bash-completion berkdb bluetooth bs2b bzip2 cairo cdda cddax cddb cdio cleartype cli clucene consolekit context corefonts cover cpudetection cracklib crypt cue cups curl cxx dbus dc1394 declarative detex device-mapper dirac djvu double-precision dri dts dv dvd dvi2tty dvipdfm ebook embedded enca encode exif expat extra faac faad facedetect fam fame ffmpeg fftw fits flac flash fluidsynth fontconfig fortran fpx frei0r ftp fuse games gcj gd gdbm geoip geolocation gif gimp gmxmopac7 gnuplot gnutls gpac gphoto2 gpm graphics graphite gs gsl gstreamer gtk guile hdri hpcups humanities hunspell hwdb iconv icu id3tag idn ieee1394 imagemagick indi inkjar inotify ipod ipv6 jack jadetex java javascript jbig jpeg jpeg2k kate kde kipi kpathsea ladspa lame lapack lash lastfm latex latex3 lcms lensfun libass libcaca libnl libnotify libsamplerate libssh2 libsysfs libtiger libv4l libv4l2 libvisual lm_sensors lua luatex lyrics lzma lzo mad matroska melt midi mjpeg mms mmx mng modplug modules mopac7 mp3 mp3tunes mp4 mpeg mpg123 mpi mpqc mpris mtp mudflap multimedia musepack music musicbrainz mysql ncurses network networking nls nptl nptlonly nsplugin numpy nuv ocr octave ogg okular omega opal openal openbabel openexr opengl openipmi openmp pam pango pcre pdf pdfannotextractor pdfimport perl pgf plasma plotutils png policykit portaudio postproc ppds pppd pstricks publishers python qt3support qt4 quicktime rar raw readline redeyes romio rtmp rtsp ruby sasl scale0tilt scanner schroedinger science scrobbler sdl sdl-image semantic-desktop session shaders shine smime smp smtp sndfile snmp soundtouch sox speex spell sql sqlite sse sse2 sse3 sse4 sse4a ssl ssse3 subtitles subversion svg swig symlink sysfs taglib tcpd tesseract tex4ht theora thin-splines threads thumbnail tidy tiff tk toolame truetype twolame type3 udev unicode usb v4l v4l2 vaapi vamp vcdinfo vdpau video vmd vorbis vpx wavpack webkit wma wma-fixed wmf wxwidgets x264 xcomposite xetex xindy xine xml xmp xorg xpm xvid xvmc yaz zeroconf zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="sony_dscf55" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev wacom keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pt en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 16 Thomas 2012-02-05 16:57:38 UTC
(In reply to comment #14)
> Added --with-boost-thread=boost_thread-mt to config in existing -r1 revision
> (see bug #394639).  Please test with this new version when it hits the tree and
> see if it fixes this and report back here so I can mark this as fixed). 
> Thanks!

povray-3.7.0-rc3 was not compiling at all (because of my boost collection?) so I unmasked the 3.7.0rc3-r1 ebuild... and it compiled!

eselect boost list
Available boost versions:
  [1]   boost-1.35/default
  [2]   boost-1.41/default
  [3]   boost-1.42/default
  [4]   boost-1.46/default *



$ povray                                                        
povray: This is a RELEASE CANDIDATE version of POV-Ray. General distribution is 
discouraged.                                                                    
povray: cannot open the user configuration file /home/x/.povray/3.7/povray.
conf: No such file or directory                                                 
No input file provided


-r1 confirmed - fix is working. 

Cheers
Comment 17 Joe Peterson (RETIRED) gentoo-dev 2012-02-13 05:55:45 UTC
(In reply to comment #16)
> povray-3.7.0-rc3 was not compiling at all (because of my boost collection?) so
> I unmasked the 3.7.0rc3-r1 ebuild... and it compiled!

Thanks for the report!  Marking this as fixed.  If the problem still exists, please reopen with details of the problem, or if a different problem, please open a new bug.