Comments (5)
The segfault occurs during installation of docs. You can get a working toolchain if you use the minimal profile instead of the default.
The segfault during rust-docs installation goes away if I run rustup under strace
or valgrind
.gdb
crashes:
Starting program: /root/.cargo/bin/rustup default stable
warning: linux_ptrace_test_ret_to_nx: Cannot PTRACE_GETREGS: Input/output error
warning: linux_ptrace_test_ret_to_nx: PC 0x900000000 is neither near return address 0x7ffff8f1a000 nor is the return instruction 0x555555965971!
Couldn't get CS register: Input/output error.
And rr
also crashes:
root@533d5273fa2a:~# rr record rustup default stable
rr: Saving execution to trace directory `/root/.local/share/rr/rustup-0'.
[FATAL ./src/Task.cc:3207:ptrace_if_stopped() errno: EIO]
(task 4113 (rec:4113) at time 1)
-> Assertion `!errno' failed to hold. ptrace(PTRACE_GETREGS, 4113, addr=0, data=0x7ffffffc4700) failed with errno 5
Tail of trace dump:
=== Start rr backtrace:
rr(_ZN2rr13dump_rr_stackEv+0x5e)[0x555555715e2e]
rr(_ZN2rr9GdbServer15emergency_debugEPNS_4TaskE+0x161)[0x555555601b01]
rr(+0xbf416)[0x555555613416]
rr(+0xc00ec)[0x5555556140ec]
rr(_ZN2rr4Task17ptrace_if_stoppedEiNS_10remote_ptrIvEEPv+0x115)[0x5555556eb0c5]
rr(_ZN2rr4Task11did_waitpidENS_10WaitStatusE+0x58f)[0x5555556ef2cf]
rr(_ZN2rr4Task5spawnERNS_7SessionERNS_8ScopedFdEPS3_S5_PiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISC_SaISC_EESJ_i+0x830)[0x5555556f2d80]
rr(_ZN2rr13RecordSessionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EESD_RKNS_20DisableCPUIDFeaturesENS0_16SyscallBufferingEiNS_7BindCPUES8_PKNS_9TraceUuidEbb+0x2e1)[0x555555643751]
rr(_ZN2rr13RecordSession6createERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EESB_RKNS_20DisableCPUIDFeaturesENS0_16SyscallBufferingEhNS_7BindCPUERKS7_PKNS_9TraceUuidEbbbb+0xa91)[0x555555644921]
rr(_ZN2rr13RecordCommand3runERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x46f)[0x5555556372ff]
rr(main+0x166)[0x5555555a21f6]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca)[0x7fffff06f1ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b)[0x7fffff06f28b]
rr(_start+0x25)[0x5555555a3975]
=== End rr backtrace
I think this is a kernel bug. The installation of the rust-docs component uses a lot of threads banging away at the filesystem laying down a lot of small files. If I had to guess, there's a data race somewhere in the whole Docker emulation setup that is corrupting the rustup process.
I suggest you file a bug with Docker.
from rust.
Wow. Something is really messed up here. Trying to investigate in lldb and I'm already lost:
(lldb) run default stable
Process 3528 launched: '/root/.cargo/bin/rustup' (x86_64)
Process 3528 stopped
* thread #1, name = 'rustup', stop reason = signal SIGSTOP
frame #0: 0xffffffffffffffff
(lldb) c
Process 3528 resuming
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2024-05-02, rust version 1.78.0 (9b00956e5 2024-04-29)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
Process 3528 stopped
* thread #1, name = 'rustup', stop reason = signal SIGSEGV: address not mapped to object (fault address: 0x20)
frame #0: 0xffffffffffffffff
from rust.
Thanks for the analysis. I've reported the issue upstream and also learned that downgrading to Docker 4.28 works around the issue as does disabling Rosetta or reducing the cores to 1. At least one user with an M3 Max chip is unable to replicate the issue.
from rust.
The issue is rather elusive. It's intermittent and difficult to replicate. Based on the analysis above, do you have any suggestions on a more minimal reproducer that might trigger faster and possibly more reliably?
from rust.
I have the same issue, using Amazon Linux 2023, the build pass without passing the platform argument, when I pass --platform linux/amd64
it fails.
I am building on macos with m1 pro.
from rust.
Related Issues (20)
- compile fail when using async_drop HOT 2
- Compiler Error E0530 When Shadowing None with mut keyword HOT 2
- `remove_dir_all` fails removing directores (with subdirectories) on network drives (SFTP) under windows HOT 28
- Two subsequent labels and unnecessary `jmp` with `opt-level=s` HOT 3
- Can the rust/build/x86_64-unknown-linux-gnu/stage0 directory be generated without network? HOT 2
- Strange TcpStream TTL type implementation (set_ttl/ttl) HOT 8
- Lint against using `libc::c_*` types in std if they're also avaliable in `core::ffi`
- `std::process::exit` is not thread-safe HOT 88
- compiletest: `./x test <test-name>.stderr` (or existing non-`.rs` file) should warn or error
- rustc hangs / infinite loop on small example with generic_const_exprs and specialization HOT 1
- integer_decode() for float: example usage in docs doesn't make sense HOT 1
- Confusing "Mismatched types" error due to unsatisfied trait bound HOT 3
- Tracking Issue for `x86_amx_intrinsics`
- Tracking Issue for `x86_sha512_sm`
- `#[coverage(..)]` attribute should apply recursively to nested functions/methods/closures HOT 1
- Coverage spans should not overlap nested items HOT 1
- rust lang analyzer is not working in vs code.
- `debuginfo` test suite shows zero tests being executed if pre-requisites are missing
- rust_eh_personality already defined in dynamic library HOT 5
- Tracking Issue for `#![feature(externally_constructed_attr)]`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.