Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 819381 - dev-lang/julia-1.6.0-r1: segfault at start
Summary: dev-lang/julia-1.6.0-r1: segfault at start
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-10-21 22:24 UTC by Oleg
Modified: 2022-01-20 09:01 UTC (History)
5 users (show)

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


Attachments
julia log (fixed FLAGS) (dev-lang:julia-1.6.0-r1:20211025-133749.log,820.48 KB, text/x-log)
2021-10-25 13:58 UTC, Maciej Barć
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg 2021-10-21 22:24:39 UTC
Julia segfaults each start. julia-bin works correctly.

Reproducible: Always

Steps to Reproduce:
1. start julia
Actual Results:  
Program received signal SIGSEGV, Segmentation fault.
0x0000555555555030 in jl_load_repl@plt ()
(gdb) bt
#0  0x0000555555555030 in jl_load_repl@plt ()
#1  0x0000555555555069 in main ()

Expected Results:  
Julia REPL appeared.

# emerge --info julia
Portage 3.0.20 (python 3.9.7-final-0, default/linux/amd64/17.1/desktop, gcc-11.2.0, glibc-2.33-r1, 5.10.61-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.10.61-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i7-6700K_CPU_@_4.00GHz-with-glibc2.33
KiB Mem:    24561588 total,   6500756 free
KiB Swap:    3889144 total,   3603316 free
Timestamp of repository gentoo: Thu, 21 Oct 2021 05:30:01 +0000
Head commit of repository gentoo: 1b3042a8da92940f68bd1317cfb143ccfb32add5
sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p0) 2.37
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.34.0-r3::gentoo
dev-lang/python:          3.9.7_p1::gentoo
dev-lang/rust:            1.53.0::gentoo, 9999::x-my
dev-util/cmake:           3.20.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.43.5-r1::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:       1.16.4::gentoo
sys-devel/binutils:       2.37_p1::gentoo
sys-devel/gcc:            11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

x-my
    location: /usr/local/portage/my
    masters: gentoo
    priority: 0

bitcoin
    location: /usr/local/portage/layman/bitcoin
    sync-type: laymansync
    sync-uri: https://gitlab.com/bitcoin/gentoo.git
    masters: gentoo
    priority: 50

booboo
    location: /usr/local/portage/layman/booboo
    sync-type: laymansync
    sync-uri: git://github.com/l29ah/booboo.git
    masters: gentoo
    priority: 50

gamerlay
    location: /usr/local/portage/layman/gamerlay
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/gamerlay.git
    masters: gentoo
    priority: 50

monero
    location: /usr/local/portage/layman/monero
    sync-type: laymansync
    sync-uri: https://github.com/gentoo-monero/gentoo-monero.git
    masters: gentoo
    priority: 50

rion
    location: /usr/local/portage/layman/rion
    sync-type: laymansync
    sync-uri: https://github.com/rion-overlay/rion-overlay.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /usr/local/portage/layman/steam-overlay
    sync-type: laymansync
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE dlj-1.1 PUEL AdobeFlash-10 AdobeFlash-10.1 skype-eula Oracle-BCLA-JavaSE AdobeFlash-10.3 skype-4.0.0.7-copyright AdobeFlash-11.x NVIDIA-CUDA OPERA-12 RAR google-chrome OPERA-2014 GDLS MPEG-4 freedist free-noncomm all-rights-reserved FAH-EULA-2014 FAH-special-permission Microsoft-vscode"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.8/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/mnt/devel/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildsyspkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-O1"
LINGUAS="ru ru_RU en en_US ja ja_JP eo uk uk_UA yi"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
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="/tmp"
USE="10bit 12bit X Xaw3d a52 aac aacplus aacs aalib abiword acl acpi alsa amd64 amr animgif anthy aptx archive aribsub ass audacious audiofile avif bash-completion bdplus bidi bluetooth bluray branding bzip2 c++0x c++11 cairo canna caps cdda cdr cg chasen cjk cli crypt css cuda cups curl cxx cyrillic dav1d dbus dga dia djvu dri dri3 dts dv dvd dvdr dvdread egl elogind emboss enca encode epub evdev exif expat faac faad fam fapi ffmpeg fftw flac fontconfig fontforge fortran freewnn fribidi ftp fuse gallium gd gdbm ggi gif gimp ginac git gl3plus glade gles gles1 gles2 gles3 glut gmp gnome-keyring gnuplot gpg gphoto2 gpm graphviz gs gsf gsm gtk gtk3 gui gzip hddtemp hdf5 heif hwaccel hwloc ibus iconv icu id3 id3tag idn ieee1394 imagemagick imap imlib inotify ipv6 irc irda jabber jadetex java7 java8 jbig jingle joystick jpeg jpeg2k kate lame latex lcdfilter lcms libass libcanberra libglvnd libmpd libnotify librtmp libsecret libtirpc libv4l libv4l2 libwww lm-sensors lz4 lzma lzo m17n-lib mad math mathml matroska mbrola mercurial midi migemo mime mmap mmx mmxext mng mozilla mp3 mp4 mpd mpeg mplayer mpris mtp mule multilib musepack musicbrainz natspec ncurses nls nntp nocd nptl nptlonly nsplugin nspluginwrapper ntfs nvidia odf ofx ogg openal opencl opencv openexr opengl opengl3 openmp openxml opus pango pch pcre pdf pgf pgo png policykit posix postscript ppds pulseaudio qrcode qt3support qt5 quicktime rar raw readline rle romio rss rtc rtmp scanner schroedinger scripts sctp sdl seccomp sensord sharedmem shorten sip skk slang smp sndfile sockets socks5 sourceview sox speex spell split-usr sqlite srt sse sse2 sse3 ssl ssse3 startup-notification subversion svg syslog system-sqlite szip taglib tcpd teletext theora threads thunar tiff timidity truetype udev udf udisks unicode upower usb v4l v4l2 vaapi vdo vdpau videos vim vim-syntax vorbis vpx vulkan webgl webkit webp wma wmf x264 x265 xa xattr xcb xetex xfce xfce4 xft xhtml xinerama xml xmss xosd xpm xscreensaver xulrunner xv xvid xvmc zip zlib zstd zvbi" ABI_X86="64" ADA_TARGET="gnat_2019" ALSA_CARDS="hda-intel" 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 proxy proxy_http" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="canon ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev joystick libinput" KERNEL="linux" L10N="ru ru_RU en en_US ja ja_JP eo uk uk_UA yi" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver scripting-javascript wiki-publisher" LLVM_TARGETS="X86 Mips NVPTX RISCV BPF AArch64 WebAssembly" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" QEMU_SOFTMMU_TARGETS="i386 x86_64 aarch64 arm or32 mips mips64 mips64el mipsel or1k riscv32 riscv64" QEMU_USER_TARGETS="i386 x86_64 aarch64 arm or32 mips mips64 mips64el mipsel mipsn32 mipsn32el or1k riscv32 riscv64" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="nvidia vesa intel i965" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS

=================================================================
                        Package Settings
=================================================================

dev-lang/julia-1.6.0-r1::gentoo was built with the following:
USE="-system-llvm" ABI_X86="(64)"

sys-devel/llvm-12.0.1::gentoo was built with the following:
USE="libffi ncurses xml -debug -doc -exegesis -gold -libedit -test -xar -z3" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AArch64 BPF Mips NVPTX RISCV WebAssembly (X86) -AMDGPU (-ARC) -ARM -AVR (-CSKY) -Hexagon -Lanai -MSP430 -PowerPC -Sparc -SystemZ (-VE) -XCore"
FEATURES="binpkg-docompress unmerge-logs strict config-protect-if-modified usersync unknown-features-warn collision-protect news assume-digests parallel-fetch preserve-libs network-sandbox usersandbox multilib-strict buildsyspkg pid-sandbox protect-owned sfperms fixlafiles binpkg-dostrip ipc-sandbox binpkg-logs merge-sync unmerge-orphans qa-unresolved-soname-deps sandbox userfetch distlocks xattr ebuild-locks userpriv"
Comment 1 Alessandro Barbieri 2021-10-21 23:40:56 UTC
Mine works but is built with gcc 10 and system-llvm
Do you have the same issue with USE="system-llvm"?
Have you tried to reproduce it with gcc 10?
Comment 2 Oleg 2021-10-22 01:56:15 UTC
(In reply to Alessandro Barbieri from comment #1)
> Mine works but is built with gcc 10 and system-llvm
> Do you have the same issue with USE="system-llvm"?
> Have you tried to reproduce it with gcc 10?

I had this issues with GCC 10 and system-llvm too https://bugs.gentoo.org/778503
Comment 3 Oleg 2021-10-22 07:06:35 UTC
I've tried to add 

override JULIA_BUILD_MODE:=debug

to Make.user but looks like install phase doesn't support it.
Comment 4 Oleg 2021-10-22 08:38:42 UTC
With system-llvm and cat /etc/portage/env/dev-lang/julia

FEATURES="splitdebug keepwork"
CFLAGS="-Og -ggdb3 -gdwarf-4 -fvar-tracking-assignments -march=native -mtune=intel -fstack-protector-all"
CXXFLAGS="-Og -ggdb3 -gdwarf-4 -fvar-tracking-assignments -march=native -mtune=intel -fstack-protector-all"
LDFLAGS="-Og"

julia works
Comment 5 Oleg 2021-10-22 10:48:15 UTC
Looks like -gdwarf-4 somehow fixes it. With next overrides for compilaton flags I got:

/etc/portage/env/dev-lang/julia:
CFLAGS=""
CXXFLAGS=""
LDFLAGS=""

CFLAGS="-Og"
CXXFLAGS="-Og"
LDFLAGS="-Og"

CFLAGS="-fvar-tracking-assignments -march=native -mtune=intel -fstack-protector-all"
CXXFLAGS="-fvar-tracking-assignments -march=native -mtune=intel -fstack-protector-all"
LDFLAGS=""

segfaults

CFLAGS="-ggdb3 -gdwarf-4 -fvar-tracking-assignments -march=native -mtune=intel -fstack-protector-all"
CXXFLAGS=" -ggdb3 -gdwarf-4 -fvar-tracking-assignments -march=native -mtune=intel -fstack-protector-all"
LDFLAGS=""

CFLAGS="-gdwarf-4 -fvar-tracking-assignments -march=native -mtune=intel -fstack-protector-all"
CXXFLAGS="-gdwarf-4 -fvar-tracking-assignments -march=native -mtune=intel -fstack-protector-all"
LDFLAGS=""

CFLAGS="-gdwarf-4"
CXXFLAGS="-gdwarf-4"
LDFLAGS=""

CFLAGS="-gdwarf-4 -O2 -march=native -pipe -fomit-frame-pointer"
CXXFLAGS="-gdwarf-4 -O2 -march=native -pipe -fomit-frame-pointer"
LDFLAGS=""

works.
Comment 6 Oleg 2021-10-22 11:21:20 UTC
-ggdb3 helps too
Comment 7 Oleg 2021-10-22 11:39:36 UTC
>>> Installing (1 of 1) dev-lang/julia-1.6.0-r1::gentoo
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
x86_64-pc-linux-gnu-objcopy: /tmp/portage/dev-lang/julia-1.6.0-r1/image/usr/lib/debug//usr/bin/julia.debug: section .bss lma 0x4038 adjusted to 0x4172
x86_64-pc-linux-gnu-objcopy: /tmp/portage/dev-lang/julia-1.6.0-r1/image/usr/lib/debug//usr/bin/julia.debug: section .interp lma 0x4178 adjusted to 0x417a
x86_64-pc-linux-gnu-objcopy: /tmp/portage/dev-lang/julia-1.6.0-r1/image/usr/bin/stjHRPaa: section .bss lma 0x4038 adjusted to 0x4172
x86_64-pc-linux-gnu-objcopy: /tmp/portage/dev-lang/julia-1.6.0-r1/image/usr/bin/stjHRPaa: section .interp lma 0x4178 adjusted to 0x417a
x86_64-pc-linux-gnu-objcopy: /tmp/portage/dev-lang/julia-1.6.0-r1/image/usr/lib64/julia/stUhcX6A: debuglink section already exists
   /usr/lib64/julia/libuv.so.2.0.0
x86_64-pc-linux-gnu-strip: /tmp/portage/dev-lang/julia-1.6.0-r1/image/usr/bin/stm2Wbsa: section .bss lma 0x4038 adjusted to 0x4172

segfaults

>>> Installing (1 of 1) dev-lang/julia-1.6.0-r1::gentoo
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   /usr/bin/julia
   /usr/lib64/julia/libccalltest.so
   /usr/lib64/libjulia.so.1.6
   /usr/lib64/julia/libccalltest.so.debug
   /usr/lib64/julia/libllvmcalltest.so
   /usr/lib64/julia/libsuitesparse_wrapper.so
   /usr/lib64/julia/libjulia-internal.so.1.6
x86_64-pc-linux-gnu-objcopy: /tmp/portage/dev-lang/julia-1.6.0-r1/image/usr/lib64/julia/stVDJ8Rf: debuglink section already exists
   /usr/lib64/julia/libuv.so.2.0.0
   /usr/lib64/julia/sys.so

works
Comment 8 Maciej Barć gentoo-dev 2021-10-25 13:56:58 UTC
I have this bug and managed to reproduce the fix Oleg had shown

My env config for julia:
```
COMMON_FLAGS="-O2 -march=native -fstack-protector-all -fvar-tracking-assignments -gdwarf-4 -ggdb3 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"

```

Thanks to Oleg for finding a way to make it work again! :D
Comment 9 Maciej Barć gentoo-dev 2021-10-25 13:58:14 UTC
Created attachment 746622 [details]
julia log (fixed FLAGS)
Comment 10 Matthias Maier gentoo-dev 2022-01-03 21:42:52 UTC
What is the situation with 1.7.0?

(Incidentally, I always build with -ggdb and have not observed segfaults).
Comment 11 Larry the Git Cow gentoo-dev 2022-01-05 11:00:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60f9d0619455f6065cfe38fdd204193e754e8de0

commit 60f9d0619455f6065cfe38fdd204193e754e8de0
Author:     Janusz Andrzejewski <janusz.andrzejewski@gmail.com>
AuthorDate: 2022-01-04 22:51:07 +0000
Commit:     Matthias Maier <tamiko@gentoo.org>
CommitDate: 2022-01-05 11:00:40 +0000

    dev-lang/julia: more LLVM 13 patches for 1.7.1
    
     - I also minimized julia-1.7.1-do_not_set_rpath.patch
    
    Bug: https://bugs.gentoo.org/819381
    Closes: https://github.com/gentoo/gentoo/pull/23652
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Janusz Andrzejewski <janusz.andrzejewski@gmail.com>
    Signed-off-by: Matthias Maier <tamiko@gentoo.org>

 dev-lang/julia/Manifest                            |   3 +
 .../julia/files/julia-1.7.1-do_not_set_rpath.patch |  11 ++
 dev-lang/julia/julia-1.7.1-r2.ebuild               | 183 +++++++++++++++++++++
 3 files changed, 197 insertions(+)
Comment 12 Oleg 2022-01-20 06:29:03 UTC
1.7.1-r2 works correctly without -ggdb flags
Comment 13 Maciej Barć gentoo-dev 2022-01-20 09:01:40 UTC
(In reply to Oleg from comment #12)
> 1.7.1-r2 works correctly without -ggdb flags

I can confirm that