Created attachment 860724 [details] build.log powerpc64-unknown-linux-gnu-gcc -shared -o RMagick2.so rmagick.o rmdraw.o rmenum.o rmfill.o rmilist.o rmimage.o rminfo.o rmkinfo.o rmmain.o rmmontage.o rmpixel.o rmstruct.o rmutil.o -L. -L/usr/lib64 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -lMagickCore-7.Q16 -Wl,-O1 -Wl,--as-needed -lMagickCore-7.Q16 -lruby30 -lm -lc make: Leaving directory '/var/tmp/portage/dev-ruby/rmagick-5.2.0/work/ruby30/rmagick-RMagick_5-2-0/ext/RMagick' * Running compile phase for all >>> Source compiled. >>> Test phase: dev-ruby/rmagick-5.2.0 * Running test phase for ruby30 .........<internal:ractor>:267: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. free(): invalid pointer /var/tmp/portage/dev-ruby/rmagick-5.2.0/temp/environment: line 1818: 39 Aborted (core dumped) ${RUBY} -S rspec-${version} ${rspec_params} ${files} * ERROR: dev-ruby/rmagick-5.2.0::gentoo failed (test phase): * rspec failed * ---- # emerge --info Portage 3.0.44 (python 3.10.10-final-0, default/linux/ppc64/17.0/desktop/gnome/systemd, gcc-12, glibc-2.36-r7, 5.15.80-gentoo-dist-hardened ppc64) ================================================================= System uname: Linux-5.15.80-gentoo-dist-hardened-ppc64-POWER9_-architected-,_altivec_supported-with-glibc2.36 KiB Mem: 32914172 total, 12012244 free KiB Swap: 67108860 total, 66513576 free Timestamp of repository gentoo: Mon, 24 Apr 2023 22:04:10 +0000 sh bash 5.1_p16-r2 ld GNU ld (Gentoo 2.39 p6) 2.39.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r2::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.36.0-r2::gentoo dev-lang/python: 3.9.16_p3::gentoo, 3.10.10_p3::gentoo, 3.11.2_p2::gentoo dev-lang/rust-bin: 1.66.1-r1::gentoo dev-util/cmake: 3.25.3::gentoo dev-util/meson: 1.0.1::gentoo sys-apps/baselayout: 2.13-r1::gentoo sys-apps/sandbox: 2.29::gentoo sys-apps/systemd: 252.7::gentoo sys-devel/autoconf: 2.13-r7::gentoo, 2.71-r5::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.39-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/gcc: 10.4.1_p20230302::gentoo, 11.3.1_p20230303::gentoo, 12.2.1_p20230304::gentoo sys-devel/gcc-config: 2.10::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.36-r7::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: True sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: crossdev location: /var/db/repos2/crossdev masters: gentoo volatile: True ACCEPT_KEYWORDS="ppc64" ACCEPT_LICENSE="*" CBUILD="powerpc64-unknown-linux-gnu" CFLAGS="-O2 -mcpu=power9 -pipe" CHOST="powerpc64-unknown-linux-gnu" CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.1/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.1/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="-O2 -mcpu=power9 -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--nospinner --ask-enter-invalid --jobs=8 --load-average 15 --quiet-build" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -mcpu=power9 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live clean-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync mount-sandbox multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -mcpu=power9 -pipe" GENTOO_MIRRORS="https://gentoo.osuosl.org/" LANG="C.UTF8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" LINGUAS="en" MAKEOPTS="--jobs=16 --load-average=15" PKGDIR="/var/cache/binpkgs" PORTAGE_BZIP2_COMMAND="lbzip2" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acl alsa big-endian bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups dbus dri dts dvd dvdr eds encode evo exif flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gui ibm iconv icu introspection ipv6 jpeg lcms libglvnd libnotify libsecret mad mng mp3 mp4 mpeg nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppc64 ppds pulseaudio qt5 readline sdl seccomp sound spell split-usr ssl startup-notification svg systemd test-rust tiff tracker truetype udev udisks unicode upower usb vorbis wayland wxwidgets x264 xattr xcb xft xml xv xvid zlib" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10 python3_9" RUBY_TARGETS="ruby30" USERLAND="GNU" VIDEO_CARDS="fbdev mga r128 radeon dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
/var/tmp/portage/dev-ruby/rmagick-5.2.0/work/ruby30/rmagick-RMagick_5-2-0 # ruby30 -S rspec-3 . .........<internal:ractor>:267: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. free(): invalid pointer Aborted (core dumped)
(gdb) bt #0 0x00003ffff795d89c in .__pthread_kill_implementation () at /lib64/libc.so.6 #1 0x00003ffff7900b94 in raise () at /lib64/libc.so.6 #2 0x00003ffff78e496c in abort () at /lib64/libc.so.6 #3 0x00003ffff794a570 in .__libc_message () at /lib64/libc.so.6 #4 0x00003ffff796d040 in malloc_printerr () at /lib64/libc.so.6 #5 0x00003ffff796f88c in ._int_free () at /lib64/libc.so.6 #6 0x00003ffff7972d94 in .__libc_free () at /lib64/libc.so.6 #7 0x00003ffff773ca60 in .operator delete[](void*) () at /var/tmp/portage/dev-libs/jemalloc-5.3.0-r1/work/jemalloc-5.3.0/src/jemalloc_cpp.cpp:174 #8 0x00003fffda93e088 in .tesseract::GenericVector<tesseract::IntParam*>::reserve(int) [clone .part.0] () at /usr/lib64/libgs.so.10 #9 0x00003fffda93e220 in .tesseract::IntParam::IntParam(int, char const*, char const*, bool, tesseract::ParamsVectors*) () at /usr/lib64/libgs.so.10 #10 0x00003fffda3192a4 in ._GLOBAL__sub_I_alignedblob.cpp () at /usr/lib64/libgs.so.10 #11 0x00003ffff7fa5d58 in ._dl_init () at /lib64/ld64.so.1 #12 0x00003ffff7fb6b04 in call_dl_init () at /lib64/ld64.so.1 #13 0x00003ffff7a63bcc in ._dl_catch_exception () at /lib64/libc.so.6 #14 0x00003ffff7fb6cc8 in dl_open_worker () at /lib64/ld64.so.1 #15 0x00003ffff7a63b50 in ._dl_catch_exception () at /lib64/libc.so.6 #16 0x00003ffff7fb85a0 in ._dl_open () at /lib64/ld64.so.1 #17 0x00003ffff7953fd8 in dlopen_doit () at /lib64/libc.so.6 #18 0x00003ffff7a63b50 in ._dl_catch_exception () at /lib64/libc.so.6 #19 0x00003ffff7a63c60 in ._dl_catch_error () at /lib64/libc.so.6 #20 0x00003ffff7fcc610 in ._rtld_catch_error () at /lib64/ld64.so.1 #21 0x00003ffff7953824 in ._dlerror_run () at /lib64/libc.so.6 #22 0x00003ffff7954104 in dlopen () at /lib64/libc.so.6 #23 0x00003fffe5f6a878 in vm_open () at //usr/lib64/libltdl.so.7 #24 0x00003fffe5f65364 in tryall_dlopen () at //usr/lib64/libltdl.so.7 #25 0x00003fffe5f656e8 in tryall_dlopen_module () at //usr/lib64/libltdl.so.7 #26 0x00003fffe5f683b0 in try_dlopen () at //usr/lib64/libltdl.so.7 #27 0x00003fffe5f6885c in lt_dlopenadvise () at //usr/lib64/libltdl.so.7 #28 0x00003fffe5f68bd4 in lt_dlopen () at //usr/lib64/libltdl.so.7 #29 0x00003fffe67701d0 in .OpenModule () at /usr/lib64/libMagickCore-7.Q16.so.10 #30 0x00003fffe676fae0 in .OpenModules () at /usr/lib64/libMagickCore-7.Q16.so.10 #31 0x00003fffe6766e4c in .GetMagickInfo () at /usr/lib64/libMagickCore-7.Q16.so.10 #32 0x00003fffe676755c in .GetMagickInfoList () at /usr/lib64/libMagickCore-7.Q16.so.10 #33 0x00003fffe69b6ffc in .Magick_init_formats () at /var/tmp/portage/dev-ruby/rmagick-5.2.0/work/ruby30/rmagick-RMagick_5-2-0/lib/RMagick2.so #34 0x00003ffff7dea5b4 in ractor_safe_call_cfunc_0 () at /usr/lib64/libruby30.so.3.0 #35 0x00003ffff7df692c in vm_call_cfunc_with_frame () at /usr/lib64/libruby30.so.3.0 #36 0x00003ffff7e06b08 in vm_exec_core () at /usr/lib64/libruby30.so.3.0 #37 0x00003ffff7e0bf74 in rb_vm_exec () at /usr/lib64/libruby30.so.3.0 #38 0x00003ffff7e11770 in vm_invoke_proc () at /usr/lib64/libruby30.so.3.0 #39 0x00003ffff7db7890 in thread_do_start_proc () at /usr/lib64/libruby30.so.3.0 #40 0x00003ffff7db8184 in thread_start_func_2.constprop.0.isra () at /usr/lib64/libruby30.so.3.0 #41 0x00003ffff7db8678 in thread_start_func_1 () at /usr/lib64/libruby30.so.3.0 #42 0x00003ffff795ad70 in start_thread () at /lib64/libc.so.6 #43 0x00003ffff79fdc88 in .__clone () at /lib64/libc.so.6 (gdb) so it's ghostscript?
Some questions so far: - Using app-text/ghostscript-gpl-10.0.0-r5, is this fixed upstream in 10.01.1? - If not in 10.01.1, is it fixed in git? - Why is it using jemalloc?
(In reply to Sam James from comment #3) > - Why is it using jemalloc? Ah, ruby[jemalloc] was on. That's probably why.
(Obviously not an rmagick bug, but just describing what's going on here.) I'm not going to worry about this too much for now, this feels like a mixed malloc issue.
(In reply to Sam James from comment #5) > (Obviously not an rmagick bug, but just describing what's going on here.) > > I'm not going to worry about this too much for now, this feels like a mixed > malloc issue. jemalloc has a tendency to pop up in weird ruby bugs. I'm not sure upstream ruby sees jemalloc support as a first-class feature and one solution I've been contemplating is to remove the jemalloc USE flag and simply always avoid it.
(In reply to Hans de Graaff from comment #6) > (In reply to Sam James from comment #5) > > (Obviously not an rmagick bug, but just describing what's going on here.) > > > > I'm not going to worry about this too much for now, this feels like a mixed > > malloc issue. > > jemalloc has a tendency to pop up in weird ruby bugs. I'm not sure upstream > ruby sees jemalloc support as a first-class feature and one solution I've > been contemplating is to remove the jemalloc USE flag and simply always > avoid it. Honestly, that sounds fine to me. We could maybe mask it as a compromise but I don't have any attachment to it. I felt like this bug was a waste of time enough to justify just dropping it, especially if it's come up other times.