all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: Rust 1.19 fails to build on i686 on ‘staging’
Date: Tue, 5 Feb 2019 12:28:39 +0100	[thread overview]
Message-ID: <20190205122839.06b482db@scratchpost.org> (raw)
In-Reply-To: <20190130185900.7f3d30a9@scratchpost.org>


[-- Attachment #1.1: Type: text/plain, Size: 8497 bytes --]

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 data.
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=/tmp/x86_64
(4) ~/.guix-profile/bin/gdb --args /gnu/store/pv5280j9fqzchccc37jj4n7yjsv2x4w6-mrustc-0.8.0/bin/mrustc src/tools/cargo/src/crates-io/lib.rs --crate-name 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 --extern curl=output/cargo-build/libcurl-0_4_6.hir --extern error_chain=output/cargo-build/liberror_chain-0_10_0.hir --extern serde=output/cargo-build/libserde-1_0_6.hir --extern serde_derive=output/cargo-build/libserde_derive-1_0_6.hir --extern serde_json=output/cargo-build/libserde_json-1_0_2.hir --extern url=output/cargo-build/liburl-1_4_0.hir -L output -L /gnu/store/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<String,>,pub
                                                             max_version:String,}

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=...)
    at output/libstd.hir.o.c:69557
#2  0x000000000044c1fc in _ZN3std3env7_var_os (arg0=...)
    at output/libstd.hir.o.c:56318
#3  0x000000000048789e in _ZN3std3env6var_os$aL$Rs_str$aR (arg0=...)
    at output/libproc_macro.hir.o.c:5682
#4  0x000000000048967b in _ZN10proc_macro4main (arg0=...)
    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=arg0@entry=0x439c10 <_ZN3std9panicking3$H37do_call$aLfn_0_$T0$C$T0$aR>, arg1=arg1@entry=0x7fffffffc130 "\340@@", arg2=arg2@entry=0x7fffffffc120, 
    arg3=arg3@entry=0x7fffffffc128) at output/libpanic_abort.hir.o.c:105
#7  0x000000000044d1e6 in _ZN3std9panicking3try$aL$T0$Cfn_0_$T0$aR (
    arg0=arg0@entry=0x4040e0 <_ZN19serde_derive$$1_0_612proc_macro$H4main>)
    at output/libstd.hir.o.c:63637
#8  0x00000000004510e5 in _ZN3std2rt10lang_start (
    arg0=arg0@entry=0x4040e0 <_ZN19serde_derive$$1_0_612proc_macro$H4main>, 
    arg1=2, arg2=0x7fffffffc328) at output/libstd.hir.o.c:64414
#9  0x0000000000402c14 in main (argc=<optimized out>, argv=<optimized out>)
    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/libserde_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/qk8irm5yp2khq4dj7zcpcaa1g87pfyvw-glibc-2.28/lib/libc.so.6
#4  0xf7e36bbd in malloc_printerr () from /gnu/store/qk8irm5yp2khq4dj7zcpcaa1g87pfyvw-glibc-2.28/lib/libc.so.6
#5  0xf7e3713b in munmap_chunk () from /gnu/store/qk8irm5yp2khq4dj7zcpcaa1g87pfyvw-glibc-2.28/lib/libc.so.6
#6  0x0804e63e in _ZRK$aL_ZN5alloc7raw_vec6RawVec$aLu8$aR_as__ZN4core3ops4Drop$aR4drop (arg0=0x815c300) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:61640
#7  _ZRI$aL_ZN5alloc7raw_vec6RawVec$aLu8$aR$aR11$Hdrop_glue (rv=0x815c300) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:175
#8  _ZRI$aL_ZN11collections3vec3Vec$aLu8$aR$aR11$Hdrop_glue (rv=0x815c300) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:185
#9  _ZRI$aL_ZN11collections6string6String$aR11$Hdrop_glue (rv=0x815c300) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:192
#10 _ZRI$aL_ZN12syn$$0_11_115ident5Ident$aR11$Hdrop_glue (rv=0x815c300) at 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=0x815c300) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:2304
#12 _ZRI$aL_ZN4core6option6Option$aL_ZN12syn$$0_11_115ident5Ident$aR$aR11$Hdrop_glue (rv=0x815c300) 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 (rv=0x815c300) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:2350
#14 _ZRK$aL_ZN11collections3vec3Vec$aL_ZN30serde_derive_internals$$0_15_03ast5Field$aR_as__ZN4core3ops4Drop$aR4drop (arg0=0xffffc47c, arg0@entry=0xffffc558) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:64862
#15 _ZRI$aL_ZN11collections3vec3Vec$aL_ZN30serde_derive_internals$$0_15_03ast5Field$aR$aR11$Hdrop_glue (rv=rv@entry=0xffffc47c) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:1843
#16 0x0804e758 in _ZRI$aL_ZN30serde_derive_internals$$0_15_03ast12Body$HStruct$aR11$Hdrop_glue (rv=0xffffc478) 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=0xffffc478) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:1868
#18 _ZRI$aL_ZN30serde_derive_internals$$0_15_03ast9Container$aR11$Hdrop_glue (rv=rv@entry=0xffffc3a0) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:1882
#19 0x08070393 in _ZN19serde_derive$$1_0_62de25expand_derive_deserialize (arg0=0xffffc57c) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:34299
#20 0x080708a1 in _ZN19serde_derive$$1_0_618derive_deserialize (arg0=...) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:35190
#21 0x080eeb83 in _ZN10proc_macro4main (arg0=...) 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=0x80bcb20 <_ZN3std9panicking3$H37do_call$aLfn_0_$T0$C$T0$aR>, arg1=0xffffc7b4 "", arg2=0xffffc7ac, arg3=0xffffc7b0) at output/libpanic_abort.hir.o.c:142
#24 0x080d052a in _ZN3std9panicking3try$aL$T0$Cfn_0_$T0$aR (arg0=0x804b100 <_ZN19serde_derive$$1_0_612proc_macro$H4main>) at output/libstd.hir.o.c:63801
#25 0x080d44f3 in _ZN3std2rt10lang_start (arg0=0x804b100 <_ZN19serde_derive$$1_0_612proc_macro$H4main>, arg1=2, arg2=0xffffc904) at output/libstd.hir.o.c:64578
#26 0x08049bc0 in main (argc=2, argv=0xffffc904) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:86165

#6  0x0804e63e in _ZRK$aL_ZN5alloc7raw_vec6RawVec$aLu8$aR_as__ZN4core3ops4Drop$aR4drop (arg0=0x815c300) at output/cargo-build/libserde_derive-1_0_6.hir-plugin.c:61640
warning: Source file is more recent than executable.
61640           var1 = true;    // Local(1) = Constant(true)

(gdb) l 61640
61635           tUNIT var2;     // ()
61636           struct s__ZN5alloc7raw_vec6RawVec$aL_ZN30serde_derive_internals$$0_15_03ast7Variant$aR *var3;   // &::"alloc"::raw_vec::RawVec<::"serde_derive_internals-0_15_0"::ast::Variant/*S*/,>/*S*/
61637           uint8_t *var4;  // *mut u8
61638           struct s__ZN30serde_derive_internals$$0_15_03ast7Variant *var5; // *mut ::"serde_derive_internals-0_15_0"::ast::Variant/*S*/
61639           var0 = 0x70ull; // Local(0) = Constant(112 usize)
61640  !!       var1 = true;    // Local(1) = Constant(true)
61641           var1 = arg0->_1 != 0x0ull;      // Local(1) = BinOp(Field(1, Deref(Argument(0))) NE 0 usize)
61642           if(var1) goto bb1; else goto bb2;
61643           // ^ If( Local(1) : 1, 2)
61644   bb1:

[-- Attachment #1.2: i686 --]
[-- Type: application/octet-stream, Size: 129 bytes --]

[-- Attachment #1.3: x86_64 --]
[-- Type: application/octet-stream, Size: 129 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-02-05 11:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28 14:39 Rust 1.19 fails to build on i686 on ‘staging’ Ludovic Courtès
2019-01-28 15:22 ` Danny Milosavljevic
2019-01-28 15:27 ` Danny Milosavljevic
2019-01-28 15:35   ` Danny Milosavljevic
2019-01-29  8:36   ` Ludovic Courtès
2019-01-30 17:59     ` Danny Milosavljevic
2019-02-05 11:28       ` Danny Milosavljevic [this message]
2019-02-05 11:35         ` Danny Milosavljevic
2019-02-11 21:34           ` Danny Milosavljevic
2019-02-12 11:47             ` Chris Marusich
2019-02-12 12:06               ` Danny Milosavljevic
2019-02-13  2:59                 ` Chris Marusich
2019-02-13  5:49                   ` Chris Marusich
2019-02-14  4:35                     ` Chris Marusich
2019-02-14 17:14                       ` Danny Milosavljevic
2019-02-15  9:11                         ` Chris Marusich
2019-02-15 10:51                           ` Danny Milosavljevic
2019-02-16 10:53                             ` Chris Marusich
2019-02-18 14:38                               ` Danny Milosavljevic
2019-05-24 13:55                                 ` Danny Milosavljevic
2019-07-19  5:53                                   ` Chris Marusich
2019-07-21 17:53                                     ` Ricardo Wurmus
2019-01-28 15:50 ` Danny Milosavljevic
2019-01-28 18:41   ` Ricardo Wurmus
2019-01-28 20:25     ` Danny Milosavljevic
2019-01-31  5:51 ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190205122839.06b482db@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.