From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: Rust 1.19 fails to build on i686 on =?UTF-8?Q?=E2=80=98stagin?= =?UTF-8?Q?g=E2=80=99?= Date: Tue, 5 Feb 2019 12:28:39 +0100 Message-ID: <20190205122839.06b482db@scratchpost.org> References: <87k1ioq21m.fsf@gnu.org> <20190128162705.052961e4@scratchpost.org> <877eenrhbj.fsf@gnu.org> <20190130185900.7f3d30a9@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/5peFoZOB83eaoL2bGdBeEMD"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:50114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqyuM-00056d-UZ for guix-devel@gnu.org; Tue, 05 Feb 2019 06:28:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqyuL-0002QI-Iq for guix-devel@gnu.org; Tue, 05 Feb 2019 06:28:54 -0500 In-Reply-To: <20190130185900.7f3d30a9@scratchpost.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Cc: Guix-devel --Sig_/5peFoZOB83eaoL2bGdBeEMD Content-Type: multipart/mixed; boundary="MP_/88TDRRl1+d909Vf0vw1H/+U" --MP_/88TDRRl1+d909Vf0vw1H/+U Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Chris and I compared what gets sent by the parent on i686 (where it breaks) vs on x86_64 (where it doesn't break): There are no differences. The next step will be to find out what the child process does with the dat= a. I suspect that the child processes' input deserializer is broken. For reference, there are multiple invocations of the child process, so the debugging process is as follows: (1) ~/src/guix-staging/guix/pre-inst-env guix environment --pure rust@1.19.= 0 --ad-hoc gdb less nano (2) source /tmp/guix-build-rust-1.19.0.drv-0/environment (3) cd /tmp/guix-build-rust-1.19.0.drv-0/rustc-1.19.0-src (4) export MRUSTC_DUMP_PROCMACRO=3D/tmp/x86_64 (4) ~/.guix-profile/bin/gdb --args /gnu/store/pv5280j9fqzchccc37jj4n7yjsv2x= 4w6-mrustc-0.8.0/bin/mrustc src/tools/cargo/src/crates-io/lib.rs --crate-na= me crates_io --crate-type rlib --crate-tag 0_9_0 -g --cfg debug_assertions = -O -o output/cargo-build/libcrates_io-0_9_0.hir -L output/cargo-build --ext= ern curl=3Doutput/cargo-build/libcurl-0_4_6.hir --extern error_chain=3Doutp= ut/cargo-build/liberror_chain-0_10_0.hir --extern serde=3Doutput/cargo-buil= d/libserde-1_0_6.hir --extern serde_derive=3Doutput/cargo-build/libserde_de= rive-1_0_6.hir --extern serde_json=3Doutput/cargo-build/libserde_json-1_0_2= .hir --extern url=3Doutput/cargo-build/liburl-1_4_0.hir -L output -L /gnu/s= tore/pv5280j9fqzchccc37jj4n7yjsv2x4w6-mrustc-0.8.0/lib/mrust (5) Set a breakpoint on "getenv" (6) Run (7) Continue program 4 times at the breakpoint (8) Inspect /tmp/x86_64 The readable part without the special characters is: structCrate{pubname:String,pub description:Option,pub max_version:St= ring,} The child process is: output/cargo-build/libserde_derive-1_0_6.hir-plugin derive#Deserialize The backtrace after x86_64's startup is: #0 0x00007ffff7e178f0 in getenv () from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/libc.so.6 #1 0x000000000044a7df in _ZN3std3sys3imp2os6getenv (arg0=3D...) at output/libstd.hir.o.c:69557 #2 0x000000000044c1fc in _ZN3std3env7_var_os (arg0=3D...) at output/libstd.hir.o.c:56318 #3 0x000000000048789e in _ZN3std3env6var_os$aL$Rs_str$aR (arg0=3D...) at output/libproc_macro.hir.o.c:5682 #4 0x000000000048967b in _ZN10proc_macro4main (arg0=3D...) at output/libproc_macro.hir.o.c:5110 #5 0x00000000004040f3 in _ZN19serde_derive$$1_0_612proc_macro$H4main () at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:35218 #6 0x00000000004af2ec in __rust_maybe_catch_panic ( arg0=3Darg0@entry=3D0x439c10 <_ZN3std9panicking3$H37do_call$aLfn_0_$T0$= C$T0$aR>, arg1=3Darg1@entry=3D0x7fffffffc130 "\340@@", arg2=3Darg2@entry=3D= 0x7fffffffc120,=20 arg3=3Darg3@entry=3D0x7fffffffc128) at output/libpanic_abort.hir.o.c:105 #7 0x000000000044d1e6 in _ZN3std9panicking3try$aL$T0$Cfn_0_$T0$aR ( arg0=3Darg0@entry=3D0x4040e0 <_ZN19serde_derive$$1_0_612proc_macro$H4ma= in>) at output/libstd.hir.o.c:63637 #8 0x00000000004510e5 in _ZN3std2rt10lang_start ( arg0=3Darg0@entry=3D0x4040e0 <_ZN19serde_derive$$1_0_612proc_macro$H4ma= in>,=20 arg1=3D2, arg2=3D0x7fffffffc328) at output/libstd.hir.o.c:64414 #9 0x0000000000402c14 in main (argc=3D, argv=3D) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:86019 The crash is reproducible on i686 by just doing: /tmp/guix-build-rust-1.19.0.drv-5/rustc-1.19.0-src/output/cargo-build/libse= rde_derive-1_0_6.hir-plugin 'derive#Deserialize' <~/i686 ... without any guix environment or other preparation. Backtrace on i686 on the crash: #1 0xf7defa60 in raise () from /gnu/store/qk8irm5yp2khq4dj7zcpcaa1g87pfyvw= -glibc-2.28/lib/libc.so.6 #2 0xf7df0bd7 in abort () from /gnu/store/qk8irm5yp2khq4dj7zcpcaa1g87pfyvw= -glibc-2.28/lib/libc.so.6 #3 0xf7e2ff56 in __libc_message () from /gnu/store/qk8irm5yp2khq4dj7zcpcaa= 1g87pfyvw-glibc-2.28/lib/libc.so.6 #4 0xf7e36bbd in malloc_printerr () from /gnu/store/qk8irm5yp2khq4dj7zcpca= a1g87pfyvw-glibc-2.28/lib/libc.so.6 #5 0xf7e3713b in munmap_chunk () from /gnu/store/qk8irm5yp2khq4dj7zcpcaa1g= 87pfyvw-glibc-2.28/lib/libc.so.6 #6 0x0804e63e in _ZRK$aL_ZN5alloc7raw_vec6RawVec$aLu8$aR_as__ZN4core3ops4D= rop$aR4drop (arg0=3D0x815c300) at output/cargo-build/libserde_derive-1_0_6.= hir-plugin.c:61640 #7 _ZRI$aL_ZN5alloc7raw_vec6RawVec$aLu8$aR$aR11$Hdrop_glue (rv=3D0x815c300= ) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:175 #8 _ZRI$aL_ZN11collections3vec3Vec$aLu8$aR$aR11$Hdrop_glue (rv=3D0x815c300= ) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:185 #9 _ZRI$aL_ZN11collections6string6String$aR11$Hdrop_glue (rv=3D0x815c300) = at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:192 #10 _ZRI$aL_ZN12syn$$0_11_115ident5Ident$aR11$Hdrop_glue (rv=3D0x815c300) a= t output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:199 #11 _ZRI$aL_ZN4core6option12Option$HSome$aL_ZN12syn$$0_11_115ident5Ident$aR= $aR11$Hdrop_glue (rv=3D0x815c300) at output/cargo-build/libserde_derive-1_0= _6.hir-plugin.c:2304 #12 _ZRI$aL_ZN4core6option6Option$aL_ZN12syn$$0_11_115ident5Ident$aR$aR11$H= drop_glue (rv=3D0x815c300) at output/cargo-build/libserde_derive-1_0_6.hir-= plugin.c:2313 #13 _ZRI$aL_ZN30serde_derive_internals$$0_15_03ast5Field$aR11$Hdrop_glue (r= v=3D0x815c300) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:2350 #14 _ZRK$aL_ZN11collections3vec3Vec$aL_ZN30serde_derive_internals$$0_15_03a= st5Field$aR_as__ZN4core3ops4Drop$aR4drop (arg0=3D0xffffc47c, arg0@entry=3D0= xffffc558) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:64862 #15 _ZRI$aL_ZN11collections3vec3Vec$aL_ZN30serde_derive_internals$$0_15_03a= st5Field$aR$aR11$Hdrop_glue (rv=3Drv@entry=3D0xffffc47c) at output/cargo-bu= ild/libserde_derive-1_0_6.hir-plugin.c:1843 #16 0x0804e758 in _ZRI$aL_ZN30serde_derive_internals$$0_15_03ast12Body$HStr= uct$aR11$Hdrop_glue (rv=3D0xffffc478) at output/cargo-build/libserde_derive= -1_0_6.hir-plugin.c:1852 #17 _ZRI$aL_ZN30serde_derive_internals$$0_15_03ast4Body$aR11$Hdrop_glue (rv= =3D0xffffc478) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:1868 #18 _ZRI$aL_ZN30serde_derive_internals$$0_15_03ast9Container$aR11$Hdrop_glu= e (rv=3Drv@entry=3D0xffffc3a0) at output/cargo-build/libserde_derive-1_0_6.= hir-plugin.c:1882 #19 0x08070393 in _ZN19serde_derive$$1_0_62de25expand_derive_deserialize (a= rg0=3D0xffffc57c) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:= 34299 #20 0x080708a1 in _ZN19serde_derive$$1_0_618derive_deserialize (arg0=3D...)= at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:35190 #21 0x080eeb83 in _ZN10proc_macro4main (arg0=3D...) at output/libproc_macro= .hir.o.c:5239 #22 0x0804b114 in _ZN19serde_derive$$1_0_612proc_macro$H4main () at output/= cargo-build/libserde_derive-1_0_6.hir-plugin.c:35286 #23 0x080eb1fb in __rust_maybe_catch_panic (arg0=3D0x80bcb20 <_ZN3std9panic= king3$H37do_call$aLfn_0_$T0$C$T0$aR>, arg1=3D0xffffc7b4 "", arg2=3D0xffffc7= ac, arg3=3D0xffffc7b0) at output/libpanic_abort.hir.o.c:142 #24 0x080d052a in _ZN3std9panicking3try$aL$T0$Cfn_0_$T0$aR (arg0=3D0x804b10= 0 <_ZN19serde_derive$$1_0_612proc_macro$H4main>) at output/libstd.hir.o.c:6= 3801 #25 0x080d44f3 in _ZN3std2rt10lang_start (arg0=3D0x804b100 <_ZN19serde_deri= ve$$1_0_612proc_macro$H4main>, arg1=3D2, arg2=3D0xffffc904) at output/libst= d.hir.o.c:64578 #26 0x08049bc0 in main (argc=3D2, argv=3D0xffffc904) at output/cargo-build/= libserde_derive-1_0_6.hir-plugin.c:86165 #6 0x0804e63e in _ZRK$aL_ZN5alloc7raw_vec6RawVec$aLu8$aR_as__ZN4core3ops4D= rop$aR4drop (arg0=3D0x815c300) at output/cargo-build/libserde_derive-1_0_6.= hir-plugin.c:61640 warning: Source file is more recent than executable. 61640 var1 =3D true; // Local(1) =3D Constant(true) (gdb) l 61640 61635 tUNIT var2; // () 61636 struct s__ZN5alloc7raw_vec6RawVec$aL_ZN30serde_derive_inter= nals$$0_15_03ast7Variant$aR *var3; // &::"alloc"::raw_vec::RawVec<::"serd= e_derive_internals-0_15_0"::ast::Variant/*S*/,>/*S*/ 61637 uint8_t *var4; // *mut u8 61638 struct s__ZN30serde_derive_internals$$0_15_03ast7Variant *v= ar5; // *mut ::"serde_derive_internals-0_15_0"::ast::Variant/*S*/ 61639 var0 =3D 0x70ull; // Local(0) =3D Constant(112 usize) 61640 !! var1 =3D true; // Local(1) =3D Constant(true) 61641 var1 =3D arg0->_1 !=3D 0x0ull; // Local(1) =3D BinOp(F= ield(1, Deref(Argument(0))) NE 0 usize) 61642 if(var1) goto bb1; else goto bb2; 61643 // ^ If( Local(1) : 1, 2) 61644 bb1: --MP_/88TDRRl1+d909Vf0vw1H/+U Content-Type: application/octet-stream; name=i686 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=i686 AQZzdHJ1Y3QBBUNyYXRlAAF7AQNwdWIBBG5hbWUAAToBBlN0cmluZwABLAEDcHViAQtkZXNjcmlw dGlvbgABOgEGT3B0aW9uAAE8AQZTdHJpbmcAASwAAT4AASwBA3B1YgELbWF4X3ZlcnNpb24AAToB BlN0cmluZwABLAABfQAA --MP_/88TDRRl1+d909Vf0vw1H/+U Content-Type: application/octet-stream; name=x86_64 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=x86_64 AQZzdHJ1Y3QBBUNyYXRlAAF7AQNwdWIBBG5hbWUAAToBBlN0cmluZwABLAEDcHViAQtkZXNjcmlw dGlvbgABOgEGT3B0aW9uAAE8AQZTdHJpbmcAASwAAT4AASwBA3B1YgELbWF4X3ZlcnNpb24AAToB BlN0cmluZwABLAABfQAA --MP_/88TDRRl1+d909Vf0vw1H/+U-- --Sig_/5peFoZOB83eaoL2bGdBeEMD Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlxZc2cACgkQ5xo1VCww uqUyPAf/ZnlU6oAr/byB+eitSXf9IxzzqbO58TPdLj34kYsVuBGUMi4FYfgsnKyo mHr7uV9eVrhtnKOrRnui3/QZJ4iz60K5y2Kaeh5WUjMyTpZ5eW0rA2Ox1rFaNHCX UckrVwkQG2ERaDFIcR3TJT7sVwjrMfqb/Zwe/VT5gyGTZ7NnEO2Sn/nXSsC8ym2U 4f2yzmU41YnEnmoxORGD2qvgRDrD11R7pNJ3YoNjzQb1QiYCJ5FpAe6Efht97t5I SDl3cRE7GqSHcJkGvLg3sbgW0uaqh6kXNaEy546bxrnoDwCl2rNg6ix4AOtDL/Jf PZO2HmmsQr0Gqf/cIRmyj5WhAkuJ4Q== =kvpB -----END PGP SIGNATURE----- --Sig_/5peFoZOB83eaoL2bGdBeEMD--