Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyo3 crashes with ICE in gcc #57176

Closed
konstin opened this issue Dec 28, 2018 · 8 comments
Closed

pyo3 crashes with ICE in gcc #57176

konstin opened this issue Dec 28, 2018 · 8 comments

Comments

@konstin
Copy link

konstin commented Dec 28, 2018

Reproducing

git clone https://github.com/pyo3/pyo3
cd pyo3
git checkout c9d9e80acb56ba9faa9c401a0261dfee9385081c # Recent, but fixed commit
cargo test

Output (truncated)

    Running `/home/konsti/pyo3/target/debug/build/pyo3-53380a358800146e/build-script-build`
[pyo3 0.5.0] cargo:rustc-link-lib=static=python3.7m
[pyo3 0.5.0] cargo:rustc-link-search=native=/home/konsti/anaconda3/lib
[pyo3 0.5.0] cargo:rustc-cfg=Py_3_5
[pyo3 0.5.0] cargo:rustc-cfg=Py_3_6
[pyo3 0.5.0] cargo:rustc-cfg=Py_3_7
[pyo3 0.5.0] cargo:rustc-cfg=Py_3
[pyo3 0.5.0] cargo:rustc-cfg=py_sys_config="WITH_THREAD"
[pyo3 0.5.0] cargo:python_flags=FLAG_WITH_THREAD=1,CFG_Py_3_5,CFG_Py_3_6,CFG_Py_3_7
[pyo3 0.5.0] cargo:rerun-if-env-changed=LD_LIBRARY_PATH
[pyo3 0.5.0] cargo:rerun-if-env-changed=PATH
[pyo3 0.5.0] cargo:rerun-if-env-changed=PYTHON_SYS_EXECUTABLE
[pyo3 0.5.0] cargo:rerun-if-env-changed=LIB
       Fresh indoc v0.3.1
       Fresh docmatic v0.1.2
     Running `rustc --crate-name pyo3 src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' -C metadata=ca17f4f292815384 -C extra-filename=-ca17f4f292815384 --out-dir /home/konsti/pyo3/target/debug/deps -C incremental=/home/konsti/pyo3/target/debug/incremental -L dependency=/home/konsti/pyo3/target/debug/deps --extern libc=/home/konsti/pyo3/target/debug/deps/liblibc-ca9f745daab36c9e.rlib --extern mashup=/home/konsti/pyo3/target/debug/deps/libmashup-a1832bdf10f215e2.rlib --extern num_traits=/home/konsti/pyo3/target/debug/deps/libnum_traits-e04d604f90ef8389.rlib --extern pyo3cls=/home/konsti/pyo3/target/debug/deps/libpyo3cls-801112180bfcf63e.so --extern spin=/home/konsti/pyo3/target/debug/deps/libspin-728b528678c133e3.rlib -L native=/home/konsti/anaconda3/lib --cfg Py_3_5 --cfg Py_3_6 --cfg Py_3_7 --cfg Py_3 --cfg 'py_sys_config="WITH_THREAD"' -l static=python3.7m`
     Running `rustc --crate-name pyo3 src/lib.rs --color always --emit=dep-info,link -C debuginfo=2 --test --cfg 'feature="default"' -C metadata=bae1525a6fbc17b7 -C extra-filename=-bae1525a6fbc17b7 --out-dir /home/konsti/pyo3/target/debug/deps -C incremental=/home/konsti/pyo3/target/debug/incremental -L dependency=/home/konsti/pyo3/target/debug/deps --extern assert_approx_eq=/home/konsti/pyo3/target/debug/deps/libassert_approx_eq-b605b57e803e5854.rlib --extern docmatic=/home/konsti/pyo3/target/debug/deps/libdocmatic-e5b6b77d0d99ca4e.rlib --extern indoc=/home/konsti/pyo3/target/debug/deps/libindoc-d665d6e1e6dfca19.rlib --extern libc=/home/konsti/pyo3/target/debug/deps/liblibc-ca9f745daab36c9e.rlib --extern mashup=/home/konsti/pyo3/target/debug/deps/libmashup-a1832bdf10f215e2.rlib --extern num_traits=/home/konsti/pyo3/target/debug/deps/libnum_traits-e04d604f90ef8389.rlib --extern pyo3cls=/home/konsti/pyo3/target/debug/deps/libpyo3cls-801112180bfcf63e.so --extern spin=/home/konsti/pyo3/target/debug/deps/libspin-728b528678c133e3.rlib -L native=/home/konsti/anaconda3/lib --cfg Py_3_5 --cfg Py_3_6 --cfg Py_3_7 --cfg Py_3 --cfg 'py_sys_config="WITH_THREAD"' -l static=python3.7m -L native=/home/konsti/pyo3/target/debug/build/backtrace-sys-733eb10c973cccf0/out`
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.10tvxqfime33lcre.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.11ny00kb3e8ncuj8.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1273esp5f19a73zp.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.129moeie6dprdymq.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.12lzf6vohr0aqkds.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.12mirphp3kiphb47.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.12wxc5kd785y3u86.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.13cxs2pz39u9emim.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.154a9ob60fjbwtjb.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1564xrljqizitxdp.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.15b8ci187wic0ghj.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.15w5av8b17qr6plk.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.15yzrnzdbqrhywhg.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.16vtk25ugia3anjb.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.185l3as0f5gtom0l.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.18jaw6uzxryhie1z.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.18k6elk9jc38qgqu.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.18wb0jjbinqvwvlw.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.19oqw7xqtakmawh5.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1ba7s3zuuzo9awwy.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1befec14a7523sk4.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1c6w7x8ihc16k41m.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1drpyegabdt3eql.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1eukgekoi24jq25l.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1f0ci33x7x5kg305.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1fo5pb54h4xxonat.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1ga3m5koxyegwq06.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1hgmvrjd3xyhwym0.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1i6xhdbzgs43y0m8.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1iv0m64asrg6mpj9.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1jg9gj79jn3qim6i.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1k7el1sy7xjdubuq.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1ky8izqjyaiaaygs.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1mlh77nv3p9io2un.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1ncc3ht6lxqijo8a.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1oaig0foccziede6.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1p1u3j6g0yt17mt6.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1p763ec5b0ykt1ov.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1pnsarjp1h7xtza1.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1ruizc1zhos2fwmk.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1spfg6fsak6j1nq7.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1ukyyminq1jqrzhz.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1urrbofir2ga4dhw.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1vpjrlcc4hxeg194.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1w659lwqbzdut7n7.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1wisg4zacctby65d.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.1zy8zhtgj4zopvja.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2065h6znjq6k0rmc.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.20ps6i6y7w52z1bt.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.21gxb627h9ucjjfm.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.22na18p0fx6rezmh.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.23paer19brd8alxi.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.24ls84mpudx7tlcs.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2505yqj8otuc05hm.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.25m4nvpi8flzgri4.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.27gjy2onc79390zt.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.282l25dv4kn81pws.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.287ucye327qfbmaf.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.29hodn7fa7kqij6x.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2bp1ztv4jmk5ledo.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2crnc0zhqtov7psr.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2gd4j0xpiw425r8r.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2jfiv81jy70sfpht.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2lffg5jjnymettkn.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2lit39ut2jsvab18.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2mfn4mje99r1doko.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2siivm9l656lfxhy.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2tr342k4u9s5oqs6.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2uztljmp4rx9mzpa.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2vsrqtlut2mxto7a.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2w2s9mmoxbgx49xu.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2wc6de2jxznmfhas.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2xzm2nfgxk6lpw26.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2yc1rrtftfda0jt5.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.2zbj4gfcmz33jsxf.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.30ctckrv5tyg5fae.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.31yw615l632hoqdr.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.32tfr0vf03k2f8u6.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.32whl23yim7tjpxi.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.33ud2uri7d9ih5fg.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.341m5ykpcagvbwyf.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.35g7514immup6ma1.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.35o0tqdg2tsvs4j1.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.36qih2ealgrjkqz6.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.374ozsb1m2u2e587.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3780mehgpg2e93ge.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.37di33c2ir2ot6c2.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.39xl6zf9bsgjvkqb.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.39zyrdcy422gyd6y.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3clm7rlxdnsk1ch3.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3d8jw2nrf68wch8m.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3e99hml3uosoj1id.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3f9ig4e7fiin6bsz.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3god3d5jvyvtl8ch.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3gvaeem51z0nwzpo.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3gynvcqxut190yco.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3k6811q1wc4zc8gy.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3l95m02y7iggyyd0.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3mkoftwtf16fav72.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3n3c4fd8e25jonx1.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3oifgy6zgdt86gf7.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3sg1svr1bviofxxp.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3sxjhmq596xgbo9m.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3wok0cv2c7gemsdm.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3xlyg328gb66cvdo.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3xt3236lan91c673.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3xxmghuzuxxhge30.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.3y4ysbac1mmprcpx.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.403ye3t0dzzomru1.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.40oeh5qit7ekqwa0.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.41lp7a78tbkwucl4.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4277qujcgn2t49lb.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.42eh258k3c1e2zx8.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.42rpmwngkv08j3p6.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.44p2o4par9iun99r.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.45013nn8h3jl7a1c.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.45bxieglqdktyo67.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.46jt94o9baduu64n.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.47nnzxqrbgy7m0vq.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.48he926gpt82i3us.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.48t1vztizninile.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4aqkhhnwxr3bmgfn.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4bpclby1845pcsga.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4c5xgpr77x1ed0s.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4ckm08ybxntos6xp.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4csid8a2e11r7ykk.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4exog9rj12hx9nha.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4fi7yqe6y7p2214d.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4fmhpx88to1kkrn5.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4gbswpgkc4prx37c.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4j5gwfp1ib1f99fg.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4ll80y1odtz9qqne.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4lpcrxve7uchk9da.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4lt1kbz2ehsqy3wm.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4luc4sjnwy1vy6n8.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4nj3c4cqinqxb90s.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4nmwrlxgdcopl2jq.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4o6bilhr133rski7.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4pyvpnliuq77x2j2.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4qm9nfh8st9ctiuf.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4qn0jvkxfyzdyf1v.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4rl18eeeufmyq8rm.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4s8jiwmrokyukq9y.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4say6m2myr75lcit.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4sayy3mj6yelinab.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4vprmcpe8xq67j1z.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4w0cgxrhulcbaj9n.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4x4i2ehdygc43orn.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.4ybsvhu3alr0nsri.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.51au621ty2u0i5xg.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.51thdhwriqvimlhk.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.5302h5clugbd2bnw.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.573qajcjb66go7qt.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.57pt0yz182lk0sgs.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.583adrydjzu27l1p.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.5913fujfjh63fwqd.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.59drk3ak7p3qfs5i.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.59okfhdvykmg54p4.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.59wlkdfavox8h0cn.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.5agpm8q3kmfvhs79.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.5bjffex7ab414y0w.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.5c4gzyr00m3e0xod.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.5cglyhcpwhqw1d7z.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.5e3gxcefm5lsae0x.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.5fb5c0ephouhp32a.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.5g6agfcxjx6kk5ic.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.5ub2o5hebg97pmb.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.7dhi11ehwbf3l4l.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.7f9b33yzahh0ulq.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.7lqqy2ynh9491pr.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.7x7bxvzk6p7ov8x.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.8ge24jijc3fdwq0.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.8p05yenfst7tbfb.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.9gfw7fa5t6yjl1u.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.a47fhzfr4zt60m1.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.b890mjk35g5opdm.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.ct0wvp9nkfix71v.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.d3igdvvd0oyf7oi.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.djynqf8kgdofxka.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.e8wkjgr3r4njt24.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.fnc9nsixtv2pi69.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.g4kqv3ea8qqmw5d.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.gaoqwvbp4vee6b2.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.gi88srgl0sld16m.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.hq4okigq2zjr77e.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.kl1q6qjwvyykzoa.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.kwjg8a6gkdhxdmk.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.lfzo2d4qet8uy0o.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.lg6lj42xhf285zl.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.mlspe976ub6u7jz.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.mqx2nv7a33lzyiy.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.n98taxpzy2lktvs.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.noo6tc2txew3pil.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.nwp3wxkjusjy8nl.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.s00zkxcsbm1kny2.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.s0p7v31elki5jox.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.suivq7kk0fqnktg.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.t7r672qve3exgqc.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.tggyu3rws0ms0zt.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.tltzd16fiq27ch2.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.u86qlatmgfclman.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.vplnj91i6jxwk9k.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.wfkvcllxk72orao.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.y8xh9tskz4fjjai.rcgu.o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.zocusuf3jz1x8fi.rcgu.o" "-o" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7" "/home/konsti/pyo3/target/debug/deps/pyo3-bae1525a6fbc17b7.wox94oy1m15oj2m.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/konsti/pyo3/target/debug/deps" "-L" "/home/konsti/anaconda3/lib" "-L" "/home/konsti/pyo3/target/debug/build/backtrace-sys-733eb10c973cccf0/out" "-L" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "-lpython3.7m" "-Wl,--no-whole-archive" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-4a947439dc4c8b53.rlib" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libterm-fa764ef9610a3cbf.rlib" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgetopts-59f116094d00e165.rlib" "/home/konsti/pyo3/target/debug/deps/libnum_traits-e04d604f90ef8389.rlib" "/home/konsti/pyo3/target/debug/deps/libspin-728b528678c133e3.rlib" "/home/konsti/pyo3/target/debug/deps/libmashup-a1832bdf10f215e2.rlib" "/home/konsti/pyo3/target/debug/deps/libproc_macro_hack-040761577468f757.rlib" "/home/konsti/pyo3/target/debug/deps/liblibc-ca9f745daab36c9e.rlib" "/home/konsti/pyo3/target/debug/deps/libindoc-d665d6e1e6dfca19.rlib" "/home/konsti/pyo3/target/debug/deps/libassert_approx_eq-b605b57e803e5854.rlib" "-Wl,--start-group" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-9d173ecf3c210bd4.rlib" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-db1279aaf57f17d7.rlib" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-abb2dedfec31f0ab.rlib" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-7fb4abca6ff2540b.rlib" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-de4f711cd780f3f5.rlib" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-9ba2d7a99d567fb8.rlib" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-b86488ab87b804ac.rlib" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-91868a13e010b791.rlib" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-780efaef6fa0c1c1.rlib" "-Wl,--end-group" "/home/konsti/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-9727038e24535667.rlib" "-Wl,-Bdynamic" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: lto1: internal compiler error: in lto_tag_to_tree_code, at lto-streamer.h:1005
          Please submit a full bug report,
          with preprocessed source if appropriate.
          See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
          lto-wrapper: fatal error: cc returned 1 exit status
          compilation terminated.
          /usr/bin/ld: error: lto-wrapper failed
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: Could not compile `pyo3`.

Caused by:
  process didn't exit successfully: `rustc --crate-name pyo3 src/lib.rs --color always --emit=dep-info,link -C debuginfo=2 --test --cfg 'feature="default"' -C metadata=bae1525a6fbc17b7 -C extra-filename=-bae1525a6fbc17b7 --out-dir /home/konsti/pyo3/target/debug/deps -C incremental=/home/konsti/pyo3/target/debug/incremental -L dependency=/home/konsti/pyo3/target/debug/deps --extern assert_approx_eq=/home/konsti/pyo3/target/debug/deps/libassert_approx_eq-b605b57e803e5854.rlib --extern docmatic=/home/konsti/pyo3/target/debug/deps/libdocmatic-e5b6b77d0d99ca4e.rlib --extern indoc=/home/konsti/pyo3/target/debug/deps/libindoc-d665d6e1e6dfca19.rlib --extern libc=/home/konsti/pyo3/target/debug/deps/liblibc-ca9f745daab36c9e.rlib --extern mashup=/home/konsti/pyo3/target/debug/deps/libmashup-a1832bdf10f215e2.rlib --extern num_traits=/home/konsti/pyo3/target/debug/deps/libnum_traits-e04d604f90ef8389.rlib --extern pyo3cls=/home/konsti/pyo3/target/debug/deps/libpyo3cls-801112180bfcf63e.so --extern spin=/home/konsti/pyo3/target/debug/deps/libspin-728b528678c133e3.rlib -L native=/home/konsti/anaconda3/lib --cfg Py_3_5 --cfg Py_3_6 --cfg Py_3_7 --cfg Py_3 --cfg 'py_sys_config="WITH_THREAD"' -l static=python3.7m -L native=/home/konsti/pyo3/target/debug/build/backtrace-sys-733eb10c973cccf0/out` (exit code: 1)

Versions

  • rustc -V: rustc 1.33.0-nightly (a7be40c65 2018-12-26)
  • cargo -V: cargo 1.33.0-nightly (2cf1f5dda 2018-12-11)
  • gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
@sfackler
Copy link
Member

This seems like a bug in gcc rather than rust?

@konstin
Copy link
Author

konstin commented Dec 28, 2018

This seems indeed to be a gcc bug. However, pyo3 fails to compile even if it does never invoke gcc itself, which imo shouldn't happen to a rust crate.

@konstin konstin changed the title Recent nightly crashes with ICE in gcc for pyo3 pyo3 crashes with ICE in gcc Dec 28, 2018
@nagisa
Copy link
Member

nagisa commented Dec 28, 2018

However, pyo3 fails to compile even if it does never invoke gcc itself, which imo shouldn't happen to a rust crate.

How?

@Centril Centril added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Dec 29, 2018
@konstin
Copy link
Author

konstin commented Dec 29, 2018

As far as I've understood it, rustc invokes cc/ld, which are part of gcc, to create the final binary or cdylib. That's also why it only fails with test and not with build, as build for a lib crate afaik doesn't need to use a linker.

@nagisa
Copy link
Member

nagisa commented Dec 30, 2018

You said it fails to compile before invoking the linker. That would more likely to be a rustc issue, but you haven’t said how it fails. Citing:

However, pyo3 fails to compile even if it does never invoke gcc itself, which imo shouldn't happen to a rust crate.

Your last elaboration circles back to invocation of the native toolchain which is what then fails and not explanation of what fails before linking. ICE in linking is a bug in your toolchain and there is a little value in tracking that. From the error it appears that it could be circumvented by disabling LTO, perhaps.

Looking at the reports, similar to the originally reported lto1 ICE, in other projects, all of them seem to be related to python in one way or another, which suggests the issue is caused by the python source rather than anything rust.

@konstin
Copy link
Author

konstin commented Jan 4, 2019

You said it fails to compile before invoking the linker. That would more likely to be a rustc issue, but you haven’t said how it fails.

No, the linker is what fails, and I can't see that I've said otherwise.

I've looked into how this is related to python and found that the error only happens with python installed through anaconda. Below is a Dockerfile that reproduces the error.

FROM ubuntu:18.04

# Copied from continuumio/anaconda3 to get an anaconda python

ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH

RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \
    libglib2.0-0 libxext6 libsm6 libxrender1 \
    git mercurial subversion

RUN wget --quiet https://repo.anaconda.com/archive/Anaconda3-5.3.0-Linux-x86_64.sh -O ~/anaconda.sh && \
    /bin/bash ~/anaconda.sh -b -p /opt/conda && \
    rm ~/anaconda.sh && \
    ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
    echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
    echo "conda activate base" >> ~/.bashrc

RUN apt-get install -y curl grep sed dpkg && \
    TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \
    curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \
    dpkg -i tini.deb && \
    rm tini.deb && \
    apt-get clean

# The rust part

RUN apt-get install build-essential -y
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=nightly
ENV PATH /root/.cargo/bin:$PATH

RUN git clone https://github.com/pyo3/pyo3

WORKDIR pyo3

RUN cargo build -vvv
RUN cargo test -vvv

I still think that something like this shouldn't cause an ICE, but I can understand if you don't want to track errors in the system linker.

@nagisa nagisa removed the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 4, 2019
@nagisa
Copy link
Member

nagisa commented Jan 4, 2019

No, the linker is what fails, and I can't see that I've said otherwise.

Sorry, I assumed that it was the case based on the sentence about gcc not being invoked at all. My bad.

I still think that something like this shouldn't cause an ICE, but I can understand if you don't want to track errors in the system linker.

Since the ICE is in a component that is not part of the Rust project and the root cause is a library that is not built by rustc, there is hardly anything we can do on Rust side to solve this. Tracking issues like these as a bug in rustc is hardly useful.

We can help you to find workarounds that could perhaps help. Here’s a few things that you could try:

  • Perhaps disabling LTO helps (-Clto=no)?
  • Upgrading or downgrading your gcc/ld toolchain may help;
  • Switching to lld (via -Clinker) would almost certainly help...

@konstin
Copy link
Author

konstin commented Jan 8, 2019

Thanks for the suggestions. Disabling lto didn't help and switching to lld caused some error: unable to find library errors. While gcc 8 is installable on ubuntu 18.04, it seems anaconda isn't (fatal error: bytecode stream in file ‘/opt/conda/lib/libpython3.7m.a’ generated with LTO version 6.0 instead of the expected 7.0). I'm going to close this since it won't help tracking this in rustc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants