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

Overhaul of the AllocRef trait to match allocator-wg's latest consens #69889

Closed
wants to merge 1 commit into from

Conversation

TimDiekmann
Copy link
Member

@TimDiekmann TimDiekmann commented Mar 10, 2020

This is a major overhaul of the AllocRef trait. This PR is split into three parts:

  1. Rewrite of AllocRef
  2. Adjustments for Box and RawVec
  3. Split of core::alloc into multiple, private submodules

The new AllocRef trait:

  • AllocRef was changed to only have four methods: alloc/dealloc as required methods and grow/shrink as provided methods. Growing and shrinking are mostly combined into realloc (like in C) but are actually 2 very different operations.
  • Every allocating method (alloc, grow, shrink) now return a pointer and the actual allocation size like in the previously removed _excess-API to support "overallocating".
  • Two new enumerations where introduced to change the behavior of allocationg:
Click here for a code outline

(slightly stripped)

/// A desired initial state for allocated memory.
pub enum AllocInit {
    /// The new memory is not initialized to any particular value.
    ///
    /// Remember that reading uninitialized memory is Undefined Behavior.
    Uninitialized,
    /// The new memory is guaranteed to be zeroed.
    Zeroed,
}

/// A reallocation constraint.
pub enum ReallocPlacement {
    /// The new address of the memory can be any valid location.
    ///
    /// If the allocation _does_ move, it's the responsibility of the allocator
    /// to also move the data from the previous location to the new location.
    Unspecified,
    /// The address of the new memory must not change.
    ///
    /// If the allocation would have to be moved to a new location to fit, the
    /// reallocation request will fail.
    InPlace,
}

/// An implementation of `AllocRef` can allocate, grow, shrink, and deallocate arbitrary blocks of
/// data described via `Layout`.
///
/// `AllocRef` is designed to be implemented on ZSTs, references, or smart pointers because having
/// an allocator like `MyAlloc([u8; N])` cannot be moved, without updating the pointers to the
/// allocated memory.
///
/// Unlike `GlobalAlloc`, zero-sized allocations are allowed in `AllocRef`. If an underlying
/// allocator does not support this (like jemalloc) or return a null pointer (such as
/// `libc::malloc`), this case must be caught. `Layout::dangling()` then can be used to create
/// an aligned `NonNull<u8>`.
///
///
/// ### Currently allocated memory
///
/// Some of the methods require that a memory block be *currently allocated* via an allocator. This
/// means that:
///
/// * the starting address for that memory block was previously returned by `alloc`, `grow`, or
///   `shrink`, and
/// * the memory block has not been subsequently deallocated, where blocks are either deallocated
///   directly by being passed to `dealloc` or were changed by being passed to `grow` or
///   `shrink` that returns `Ok`. If `grow` or `shrink` have returned `Err`, the passed pointer
///   remains valid.
///
/// ### Memory fitting
///
/// Some of the methods require that a layout *fit* a memory block. What it means for a layout to
/// "fit" a memory block means (or equivalently, for a memory block to "fit" a layout) is that the
/// following conditions must hold:
///
/// * The block's starting address must be aligned to `layout.align()`, and
/// * The block's size must fall in the range `use_min ..= use_max`, where:
///    - `use_min` is [`layout.size()`], and
///    - `use_max` is the allocation size that was returned.
///
/// ### Notes
///
///  * the size of the layout most recently used to allocate the block is guaranteed to be in the
///    range `use_min ..= use_max`,
///  * if a layout `k` fits a memory block (denoted by `ptr`) currently allocated via an allocator
///    `a`, then it is legal to use that layout to deallocate it, i.e.,
///    `a.dealloc(ptr, k);`, and
///  * if an allocator does not support overallocating, it is fine to simply return
///    `layout.size()` as the allocated size, such as `use_min == use_max`.
///
/// # Safety
///
/// * Pointers returned from an allocator must point to valid memory and retain their validity until
///   the instance and all of its clones are dropped,
/// * cloning or moving the allocator must not invalidate pointers returned from this allocator.
///   A cloned allocator must behave like the same allocator, and
/// * any pointer to a memory block which is *currently allocated* may be passed to any other
///   method of the allocator.
pub unsafe trait AllocRef {
    /// On success, returns a pointer meeting the size and alignment guarantees of `layout` and the
    /// actual size of the allocated block, which is greater than or equal to `layout.size()`.
    ///
    /// If this method returns an `Ok(addr)`, then the `addr` returned will be non-null address
    /// pointing to a block of storage suitable for holding an instance of `layout`.
    ///
    /// The returned block of storage is initialized like specified by `init`.
    ///
    /// # Errors
    ///
    /// Returning `Err` indicates that either memory is exhausted or `layout` does not meet
    /// allocator's size or alignment constraints.
    fn alloc(&mut self, layout: Layout, init: AllocInit) -> Result<(NonNull<u8>, usize), AllocErr>;

    /// Deallocate the memory referenced by `ptr`.
    ///
    /// # Safety
    ///
    /// * `ptr` must denote a block of memory *currently allocated* via this allocator,
    /// * `layout` must *fit* that block of memory, and
    /// * the alignment of the `layout` must match the alignment used to allocate that block of
    ///   memory.
    unsafe fn dealloc(&mut self, ptr: NonNull<u8>, layout: Layout);

    /// Returns a pointer and the actual size of the allocated block. The pointer is suitable for
    /// holding data described by a new layout with `layout`’s alignment and a size given by
    /// `new_size`. To accomplish this, the allocator may extend the allocation referenced by `ptr`
    /// to fit the new layout.
    ///
    /// If this returns `Ok`, then ownership of the memory block referenced by `ptr` has been
    /// transferred to this allocator. The memory may or may not have been freed, and should be
    /// considered unusable (unless of course it was transferred back to the caller again via the
    /// return value of this method).
    ///
    /// If this method returns `Err`, then ownership of the memory block has not been transferred to
    /// this allocator, and the contents of the memory block are unaltered.
    ///
    /// The behavior on how the allocator tries to shrink the memory can be specified by
    /// `placement`. The returned block of storage is initialized like specified by `init`.
    ///
    /// # Safety
    ///
    /// * `ptr` must be *currently allocated* via this allocator,
    /// * `layout` must *fit* the `ptr`. (The `new_size` argument need not fit it.)
    /// * `new_size` must be greater than or equal to `layout.size()`
    /// * `new_size`, when rounded up to the nearest multiple of `layout.align()`, must not overflow
    ///   (i.e., the rounded value must be less than `usize::MAX`).
    ///
    /// # Errors
    ///
    /// Returns `Err` only if the new layout does not meet the allocator's size and alignment
    /// constraints of the allocator, or if growing otherwise fails.
    unsafe fn grow(
        &mut self,
        ptr: NonNull<u8>,
        layout: Layout,
        new_size: usize,
        placement: ReallocPlacement,
        init: AllocInit,
    ) -> Result<(NonNull<u8>, usize), AllocErr> { ... }

    /// Returns a pointer and the actual size of the allocated block. The pointer is suitable for
    /// holding data described by a new layout with `layout`’s alignment and a size given by
    /// `new_size`. To accomplish this, the allocator may shrink the allocation referenced by `ptr`
    /// to fit the new layout.
    ///
    /// The behavior on how the allocator tries to shrink the memory can be specified by
    /// `placement`.
    ///
    /// If this returns `Ok`, then ownership of the memory block referenced by `ptr` has been
    /// transferred to this allocator. The memory may or may not have been freed, and should be
    /// considered unusable (unless of course it was transferred back to the caller again via the
    /// return value of this method).
    ///
    /// If this method returns `Err`, then ownership of the memory block has not been transferred to
    /// this allocator, and the contents of the memory block are unaltered.
    ///
    /// # Safety
    ///
    /// * `ptr` must be *currently allocated* via this allocator,
    /// * `layout` must *fit* the `ptr`. (The `new_size` argument need not fit it.)
    /// * `new_size` must be smaller than or equal to `layout.size()`
    ///
    /// # Errors
    ///
    /// Returns `Err` only if the new layout does not meet the allocator's size and alignment
    /// constraints of the allocator, or if shrinking otherwise fails.
    unsafe fn shrink(
        &mut self,
        ptr: NonNull<u8>,
        layout: Layout,
        new_size: usize,
        placement: ReallocPlacement,
    ) -> Result<(NonNull<u8>, usize), AllocErr> { ... }
}

Guide for reviewing

There are four commits in this PR:

Any further commits will probably fixes and small adjustments only. I will only force-push to rebase to keep things clean.


r? @Amanieu

cc @Lokathor @Wodann

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 10, 2020
@TimDiekmann TimDiekmann marked this pull request as ready for review March 10, 2020 13:19
@TimDiekmann TimDiekmann changed the title Overhaul of the AllocRef trait to match allocator-wg's last consens Overhaul of the AllocRef trait to match allocator-wg's latest consens Mar 10, 2020
@Amanieu
Copy link
Member

Amanieu commented Mar 10, 2020

Continuing the discussion from #69824:

AFAICT we don't have that runtime check. Let's take Vec<T> as an example:

  1. calls RawVec<T, Global>::allocate_in/grow/shrink. So far we know T.

  2. calls <Global as AllocRef>::alloc/realloc/grow/shrink. Here there is still no dynamic linking envolved, so the compiler still know the layout of T. In the AllocRef implementation of Global we calculate/lookup layout.size() (and maybe use AllocPlacement/AllocInit).

  3. We end up with calling the global alloc(_zeroed)/dealloc/realloc, which calls the dynamically linked #[global_allocator]. In the linked implementation there are no checks which has to be branched.

We basically just move the checks one layer down the road. When using AllocRef::grow/shrink, we could still try to optimize the path with intrinsics::assume(old_size < new_size).

If we decide to make #[global_allocator] use AllocRef directly then this will no longer hold (rust-lang/wg-allocators#21). The link-level interface will be that of AllocRef, which means the global allocator will not know at compile time whether an allocation is a ZST.

@TimDiekmann
Copy link
Member Author

TimDiekmann commented Mar 10, 2020

Yes, that's true, but that's basically what we have seen in rust-lang/wg-allocators#38 (comment). While you have evaluated the measurments, you basically asked the same question:

[W]ith a global allocator that doesn't support ZSTs (i.e. jemalloc), what is the overhead of including two additional zero-check (one in alloc, one in dealloc)?

You made the following conclusion:

From the results it seems like the cost of the branch is insignificant compared to the allocation itself.

As such, I would like to reiterate my previous position: there should be just one method (alloc) which must be able to handle both ZSTs and non-ZSTs. If the underlying allocator doesn't support ZSTs (i.e. jemalloc, GlobalAllocator) then the implementation must handle ZSTs specially in alloc and dealloc.

@Wodann added to the discussion, that

[t]he bump allocator merely served as an edge case for allocators that have low overhead. It can indeed trivially implement allocation of ZSTs.

We can conclude, that the current change should not have any performance disadvantages now but simplifies the API of AllocRef a lot.

If we should really manage to implement #[global_alloc] on AllocRef (I'm still unsure about that because of &mut self, but that's may be fixed with rust-lang/wg-allocators#37), we should take another look at the timing at that point. As we are currently in nightly-only-land we could still add the methods using NonZeroLayout proposed in rust-lang/wg-allocators#38 first without worring too much about compatibility. AFAICT this could even be added without sacrificing compatibility at all. With this PR we have managed to reduce the trait size a lot, so adding a few methods again shouldn't be a that big deal, especially, if they can be default-implemented.


Edit: Please also note that growing/shrinking is usually in the cold path. For performance you will either alloc a memory block, which is large enough, beforehand, or you use a fast allocator like Bump anyway.

@TimDiekmann
Copy link
Member Author

I could also imagine, that we could eventually add parameters to #[global_alloc(...)] to specify, if zero-sized allocations are supported or not. If not, those cases could be catched beforehand just like in impl AllocRef for Global to guarantee, that #[global_alloc] will never be called with zero-sized layouts.

@Dylan-DPC-zz
Copy link

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Mar 11, 2020

⌛ Trying commit d4bcad283d39b6a821d68cd10f440b88d207eb81 with merge 34dcc17a44e3eb0718a3877c453516843a8abb13...

@bors
Copy link
Contributor

bors commented Mar 11, 2020

☀️ Try build successful - checks-azure
Build commit: 34dcc17a44e3eb0718a3877c453516843a8abb13 (34dcc17a44e3eb0718a3877c453516843a8abb13)

@rust-timer
Copy link
Collaborator

Queued 34dcc17a44e3eb0718a3877c453516843a8abb13 with parent 1581278, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 34dcc17a44e3eb0718a3877c453516843a8abb13, comparison URL.

src/libcore/alloc/layout.rs Outdated Show resolved Hide resolved
src/libcore/alloc/layout.rs Outdated Show resolved Hide resolved
src/libcore/alloc/mod.rs Show resolved Hide resolved
src/libcore/alloc/mod.rs Outdated Show resolved Hide resolved
src/libcore/alloc/mod.rs Outdated Show resolved Hide resolved
src/libcore/alloc/mod.rs Outdated Show resolved Hide resolved
src/libstd/alloc.rs Outdated Show resolved Hide resolved
src/libstd/alloc.rs Outdated Show resolved Hide resolved
src/liballoc/alloc.rs Outdated Show resolved Hide resolved
src/liballoc/alloc.rs Outdated Show resolved Hide resolved
@Wodann
Copy link

Wodann commented Mar 11, 2020

Regarding the benchmark results, it makes sense to me that compilation would be slower as a result of these changes. We introduced an additional code path in alloc that can often be optimized by the compiler - depending on what constant AllocInit value is provided.

I am however not sure whether that change would account for the total difference in time. Only more invasive benchmarking would be able to tell..

@TimDiekmann
Copy link
Member Author

I have also expected a slight regression in compile times, but I did expected more regression in opt-builds than in debug builds.

@CAD97
Copy link
Contributor

CAD97 commented Mar 11, 2020

Quick caution that I just realized:

Box guarantees no allocation for ZSTs, and that Box::<ZST>::from_raw(layout.dangling()) is safe. If we change Box to use an arbitrary zero-size-allocation-aware AllocRef impl, then we lose this guarantee.

I still strongly believe that a zero-sized-allocation-aware AllocRef trait is the better state to end up in. However, for Box specifically, it might require always using an AllocRef that is known to no-op zero-sized allocation layouts.

@Lokathor
Copy link
Contributor

I don't see where using Box::from_raw like that is actually guaranteed to be sound. Could you quote the spot or walk me through the steps?

@TimDiekmann
Copy link
Member Author

TimDiekmann commented Mar 11, 2020

Box guarantees no allocation for ZSTs, and that Box::<ZST>::from_raw(layout.dangling()) is safe. If we change Box to use an arbitrary zero-size-allocation-aware AllocRef impl, then we lose this guarantee.

This is working, as box x calls exchange_malloc, which checks for size == 0 and returns a dangling pointer, however I can't find this in the documentation, that this is guaranteed. It uses box_free to drop the content of the Box. box_free also checks for size == 0 and doing nothing then. Both function got changed, too.

@CAD97
Copy link
Contributor

CAD97 commented Mar 11, 2020

Could you quote the spot or walk me through the steps?

Ok, I can't actually find wording to back myself up here. I do know I've seen code somewhere that assumed that's how Box deals with ZSTs, however. If we don't have this guarantee (and might break it), it's probably worth clarifying the guarantee in the docs where it currently says

Box<T> values will always be fully aligned, non-null pointers. Moreover, the destructor for Box<T> will attempt to free the value with the global allocator. In general, the best practice is to only use Box<T> for pointers that originated from the global allocator.

to be very explicit that only pointers allocated via the global allocator are ok, and not dangling pointers, even though that's how the current implementation works. In fact, given the wording of this (having just gone over it again), I'd argue Box definitely should call the dynamic allocator for zero sized allocations, unlike...

Vec is also an interesting case. It definitely does guarantee Vec::new does not allocate, that shrink_to_fit on an empty vector deallocates, and a vector of ZSTs does not allocate:

However, the pointer may not actually point to allocated memory. In particular, if you construct a Vec with capacity 0 via Vec::new, vec![], Vec::with_capacity(0), or by calling shrink_to_fit on an empty Vec, it will not allocate memory. Similarly, if you store zero-sized types inside a Vec, it will not allocate space for them. Note that in this case the Vec may not report a capacity of 0. Vec will allocate if and only if mem::size_of::<T>() * capacity() > 0. [emphasis in source]

So (Raw)Vec need to maintain the behavior of not calling into the dynamic allocator for the mem::size_of::<T>() * capacity() > 0 case.

@TimDiekmann
Copy link
Member Author

TimDiekmann commented Mar 11, 2020

Box values will always be fully aligned, non-null pointers. Moreover, the destructor for Box will attempt to free the value with the global allocator. In general, the best practice is to only use Box for pointers that originated from the global allocator.

I don't think there is anything to add there. It's still working for any T and the returned pointer is always fully aligned and non-null.

Vec is also an interesting case.

Everything listed still holds:
RawVec::new(_in) are const and initialized to Unique::empty(). For everything else, those cases are catched in RawVec, which calls <Global as AllocRef>. impl AllocRef for Global forwards to std::alloc::{alloc, realloc, alloc_zeroed, dealloc} and everything is handled as before, the checks for zero sized allocation only have moved a bit (from RawVec::grow to AllocRef::alloc/grow/shrink)

@gereeter
Copy link
Contributor

I'm happy with the resolution of my comments; thanks! The implementation looks good overall to me.


Quick caution that I just realized

Whatever the eventual guarantees are, I think we're safe for now if for no other reason than the fact that Vec and Box are not generic over their allocator yet. The documentation seems to be written with the global allocator in mind; for example, Vec promises that it "is and always will be a (pointer, capacity, length) triplet. No more, no less." However, adding an allocator parameter requires making it a (pointer, capacity, length, allocator) quartet. Since the global allocator handle is and always will be zero-sized, I don't see this claim as being wrong or misleading, merely talking about a Vec<T> not a Vec<T, A: AllocRef>. In the same vein, as long as the global allocator never allocates anything when given a zero size, I think there aren't any broken promises.

That said, this could be a problem given eventual unification of GlobalAlloc and AllocRef.

@TimDiekmann
Copy link
Member Author

The implementation looks good overall to me.

Thanks! I didn't expect that few code change requests with so many LoC changed.

@CAD97
Copy link
Contributor

CAD97 commented Mar 12, 2020

Yes, I agree that the allocation behavior is not changed by this PR. I just want to make sure the hazzard of eventually allowing the global allocator to be specified in terms of AllocRef rather than GlobalAlloc is noted. When that switch is made, we need to make sure we thoroughly re-audit the allocation promises that we're making when the global allocator can allocate zero sized regions. At this point I'll migrate the concern back to wg-alloc though.

@TimDiekmann
Copy link
Member Author

No, used_bytes has to be smaller than layout.size() (I'd add it as safety constraint). This results in three areas of memory in one allocation:

  1. from ptr to ptr + used_bytes
  2. from ptr + used_bytes to ptr + layout.size()
  3. from ptr + layout.size() to ptr + new_size

The first area is copied (non_overlapping), the third will be zeroed, but it's not clear what happens to the second region. Zeroing it may be useful, but not necessarily faster.

@bjorn3
Copy link
Member

bjorn3 commented Mar 16, 2020

calloc requests already zeroed pages from the kernel, right?

@TimDiekmann
Copy link
Member Author

Yes, but AllocRef isn't only a wrapper around libc::{malloc, calloc, realloc, dealloc} but a general purpose trait in the standard library of Rust.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-16T11:13:25.4838777Z ========================== Starting Command Output ===========================
2020-03-16T11:13:25.4840725Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/8022a83f-4d4c-43a1-a894-2cd8594ce8f3.sh
2020-03-16T11:13:25.4840949Z 
2020-03-16T11:13:25.4844161Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-16T11:13:25.4863994Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-16T11:13:25.4867052Z Task         : Get sources
2020-03-16T11:13:25.4867338Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-16T11:13:25.4867615Z Version      : 1.0.0
2020-03-16T11:13:25.4867799Z Author       : Microsoft
---
2020-03-16T11:13:26.4804269Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-16T11:13:26.4809034Z ##[command]git config gc.auto 0
2020-03-16T11:13:26.4812284Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-16T11:13:26.4815323Z ##[command]git config --get-all http.proxy
2020-03-16T11:13:26.4819833Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69889/merge:refs/remotes/pull/69889/merge
---
2020-03-16T12:06:37.1835810Z .................................................................................................... 1700/9774
2020-03-16T12:06:41.2814805Z .................................................................................................... 1800/9774
2020-03-16T12:06:52.1047200Z ......................................................................i............................. 1900/9774
2020-03-16T12:06:57.8746554Z .................................................................................................... 2000/9774
2020-03-16T12:07:11.3063490Z ............................................................iiiii................................... 2100/9774
2020-03-16T12:07:20.5731544Z .................................................................................................... 2300/9774
2020-03-16T12:07:22.5265859Z .................................................................................................... 2400/9774
2020-03-16T12:07:25.1246386Z .................................................................................................... 2500/9774
2020-03-16T12:07:42.6910513Z .................................................................................................... 2600/9774
---
2020-03-16T12:10:03.6571890Z ................................i...............i................................................... 5000/9774
2020-03-16T12:10:11.9587293Z .................................................................................................... 5100/9774
2020-03-16T12:10:17.5871711Z ...........................................................................i........................ 5200/9774
2020-03-16T12:10:22.6998810Z .................................................................................................... 5300/9774
2020-03-16T12:10:31.6023496Z ........................................................ii.ii........i...i.......................... 5400/9774
2020-03-16T12:10:39.4133471Z .................................................................................................... 5600/9774
2020-03-16T12:10:48.2638050Z .................................................................................................... 5700/9774
2020-03-16T12:10:54.2396185Z ................................................i................................................... 5800/9774
2020-03-16T12:11:00.5196987Z .................................................................................................... 5900/9774
2020-03-16T12:11:00.5196987Z .................................................................................................... 5900/9774
2020-03-16T12:11:10.0582590Z .................................................................................................... 6000/9774
2020-03-16T12:11:16.1295971Z ..........................................ii...i..ii...........i.................................... 6100/9774
2020-03-16T12:11:34.6872455Z .................................................................................................... 6300/9774
2020-03-16T12:11:38.0892782Z .................................................................................................... 6400/9774
2020-03-16T12:11:38.0892782Z .................................................................................................... 6400/9774
2020-03-16T12:11:42.6767398Z ........................................................................i..ii....................... 6500/9774
2020-03-16T12:12:02.6039601Z .................................................................................................... 6700/9774
2020-03-16T12:12:11.0148681Z ......................................................................i............................. 6800/9774
2020-03-16T12:12:12.8396638Z .................................................................................................... 6900/9774
2020-03-16T12:12:14.7825080Z .................................................................................................... 7000/9774
---
2020-03-16T12:13:44.2136226Z .................................................................................................... 7800/9774
2020-03-16T12:13:49.3473961Z .................................................................................................... 7900/9774
2020-03-16T12:13:54.4593952Z ......................................................i............................................. 8000/9774
2020-03-16T12:14:03.7758606Z .................................................................................................... 8100/9774
2020-03-16T12:14:08.5860294Z ...iiiiiiiiii.i..................................................................................... 8200/9774
2020-03-16T12:14:20.3373984Z .................................................................................................... 8400/9774
2020-03-16T12:14:29.6122175Z .................................................................................................... 8500/9774
2020-03-16T12:14:41.0096864Z .................................................................................................... 8600/9774
2020-03-16T12:14:46.4136483Z .................................................................................................... 8700/9774
---
2020-03-16T12:16:50.0363765Z  finished in 7.068
2020-03-16T12:16:50.0531275Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T12:16:50.1911700Z 
2020-03-16T12:16:50.1912117Z running 183 tests
2020-03-16T12:16:52.7468996Z iiii......i............ii.i..iiii....i....i...........i............i..i..................i....i..... 100/183
2020-03-16T12:16:55.0306364Z .......i.i.i...iii..iiiiiiiiiiiiiiii.......................iii.............ii......
2020-03-16T12:16:55.0311085Z 
2020-03-16T12:16:55.0311632Z  finished in 4.978
2020-03-16T12:16:55.0481046Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T12:16:55.1791468Z 
---
2020-03-16T12:16:56.9647131Z  finished in 1.916
2020-03-16T12:16:56.9824107Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T12:16:57.1113177Z 
2020-03-16T12:16:57.1113547Z running 9 tests
2020-03-16T12:16:57.1114600Z iiiiiiiii
2020-03-16T12:16:57.1115572Z 
2020-03-16T12:16:57.1119138Z  finished in 0.129
2020-03-16T12:16:57.1294583Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T12:16:57.2676206Z 
---
2020-03-16T12:17:16.0272218Z  finished in 18.896
2020-03-16T12:17:16.0446040Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T12:17:16.1798008Z 
2020-03-16T12:17:16.1798465Z running 115 tests
2020-03-16T12:17:28.2160792Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
2020-03-16T12:17:29.6218544Z ...iiii.....ii.
2020-03-16T12:17:29.6220084Z 
2020-03-16T12:17:29.6226612Z  finished in 13.578
2020-03-16T12:17:29.6273645Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T12:17:29.6274355Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-03-16T12:28:18.4571473Z 
2020-03-16T12:28:18.4573308Z    Doc-tests core
2020-03-16T12:28:22.3474808Z 
2020-03-16T12:28:22.3480665Z running 2481 tests
2020-03-16T12:28:30.2416779Z ......iiiii......................................................................................... 100/2481
2020-03-16T12:28:38.1342128Z .....................................................................................ii............. 200/2481
2020-03-16T12:28:55.8787744Z ....................i............................................................................... 400/2481
2020-03-16T12:28:55.8787744Z ....................i............................................................................... 400/2481
2020-03-16T12:29:04.3625360Z .........................................................................i..i..................iiii. 500/2481
2020-03-16T12:29:18.2814766Z .................................................................................................... 700/2481
2020-03-16T12:29:25.5379029Z .................................................................................................... 800/2481
2020-03-16T12:29:33.0713219Z .................................................................................................... 900/2481
2020-03-16T12:29:40.5143886Z .................................................................................................... 1000/2481
---
2020-03-16T12:32:48.2097674Z 
2020-03-16T12:32:48.2097998Z running 1010 tests
2020-03-16T12:33:03.4375389Z i................................................................................................... 100/1010
2020-03-16T12:33:12.2792537Z .................................................................................................... 200/1010
2020-03-16T12:33:18.5213760Z ..................iii......i......i...i......i...................................................... 300/1010
2020-03-16T12:33:22.9639199Z .................................................................................................... 400/1010
2020-03-16T12:33:28.9807571Z ............................................i..i......................................ii............ 500/1010
2020-03-16T12:33:39.7365468Z .................................................................................................... 700/1010
2020-03-16T12:33:39.7365468Z .................................................................................................... 700/1010
2020-03-16T12:33:45.5372383Z ....................................iiii............................................................ 800/1010
2020-03-16T12:33:57.5428994Z .................................................................................................... 900/1010
2020-03-16T12:34:03.3111281Z ..........................................................iiii...................................... 1000/1010
2020-03-16T12:34:03.7079012Z test result: ok. 990 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-03-16T12:34:03.7081073Z 
2020-03-16T12:34:03.7193778Z  finished in 144.864
2020-03-16T12:34:03.7207000Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-03-16T12:47:53.2384074Z     Checking rustc-std-workspace-core v1.99.0 (/checkout/src/tools/rustc-std-workspace-core)
2020-03-16T12:47:54.2529304Z  Documenting alloc v0.0.0 (/checkout/src/liballoc)
2020-03-16T12:47:56.7106047Z     Finished release [optimized] target(s) in 20.63s
2020-03-16T12:47:56.9928578Z  Documenting core v0.0.0 (/checkout/src/libcore)
2020-03-16T12:48:07.4822987Z error: `[Self::initialize_offset]` cannot be resolved, ignoring it.
2020-03-16T12:48:07.4824855Z    |
2020-03-16T12:48:07.4824855Z    |
2020-03-16T12:48:07.4825725Z 49 |     /// [off]: Self::initialize_offset
2020-03-16T12:48:07.4827468Z    |
2020-03-16T12:48:07.4828290Z note: the lint level is defined here
2020-03-16T12:48:07.4829002Z   --> src/libcore/lib.rs:64:9
2020-03-16T12:48:07.4829616Z    |
2020-03-16T12:48:07.4829616Z    |
2020-03-16T12:48:07.4830470Z 64 | #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
2020-03-16T12:48:07.4832331Z    = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2020-03-16T12:48:07.4832835Z 
2020-03-16T12:48:07.8621122Z error: aborting due to previous error
2020-03-16T12:48:07.8621946Z 
2020-03-16T12:48:07.8621946Z 
2020-03-16T12:48:07.8937294Z error: Could not document `core`.
2020-03-16T12:48:07.8938231Z 
2020-03-16T12:48:07.8939965Z Caused by:
2020-03-16T12:48:07.8942292Z   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustdoc --edition=2018 --crate-type lib --crate-name core src/libcore/lib.rs --target x86_64-unknown-linux-gnu -o /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/doc --error-format=json --json=diagnostic-rendered-ansi --markdown-css rust.css --markdown-no-toc --generate-redirect-pages --resource-suffix 1.43.0 --index-page /checkout/src/doc/index.md -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/deps` (exit code: 1)
2020-03-16T12:48:07.8962709Z 
2020-03-16T12:48:07.8962709Z 
2020-03-16T12:48:07.8966047Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustdoc" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/src/libtest/Cargo.toml" "-Z" "unstable-options" "-p" "core" "--" "--markdown-css" "rust.css" "--markdown-no-toc" "--generate-redirect-pages" "--resource-suffix" "1.43.0" "--index-page" "/checkout/src/doc/index.md"
2020-03-16T12:48:07.8967756Z 
2020-03-16T12:48:07.8967903Z 
2020-03-16T12:48:07.8976770Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-03-16T12:48:07.8977141Z Build completed unsuccessfully in 1:28:22
2020-03-16T12:48:07.8977141Z Build completed unsuccessfully in 1:28:22
2020-03-16T12:48:07.9036695Z == clock drift check ==
2020-03-16T12:48:07.9055715Z   local time: Mon Mar 16 12:48:07 UTC 2020
2020-03-16T12:48:08.0805482Z   network time: Mon, 16 Mar 2020 12:48:08 GMT
2020-03-16T12:48:08.0807863Z == end clock drift check ==
2020-03-16T12:48:09.2781196Z 
2020-03-16T12:48:09.2851636Z ##[error]Bash exited with code '1'.
2020-03-16T12:48:09.2863281Z ##[section]Finishing: Run build
2020-03-16T12:48:09.2911506Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-16T12:48:09.2918026Z Task         : Get sources
2020-03-16T12:48:09.2918315Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-16T12:48:09.2918569Z Version      : 1.0.0
2020-03-16T12:48:09.2918754Z Author       : Microsoft
2020-03-16T12:48:09.2918754Z Author       : Microsoft
2020-03-16T12:48:09.2919053Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-16T12:48:09.2919377Z ==============================================================================
2020-03-16T12:48:09.5809117Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-16T12:48:09.5854264Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-16T12:48:09.5931101Z Cleaning up task key
2020-03-16T12:48:09.5932304Z Start cleaning up orphan processes.
2020-03-16T12:48:09.6102356Z Terminate orphan process: pid (4251) (python)
2020-03-16T12:48:09.6335518Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-16T12:59:42.9236845Z ========================== Starting Command Output ===========================
2020-03-16T12:59:42.9241255Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/20203faf-8852-4eb9-98c9-e3eff21e54f5.sh
2020-03-16T12:59:42.9241710Z 
2020-03-16T12:59:42.9246344Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-16T12:59:42.9264810Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-16T12:59:42.9268010Z Task         : Get sources
2020-03-16T12:59:42.9268302Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-16T12:59:42.9268585Z Version      : 1.0.0
2020-03-16T12:59:42.9268780Z Author       : Microsoft
---
2020-03-16T12:59:44.1383556Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-16T12:59:44.1391894Z ##[command]git config gc.auto 0
2020-03-16T12:59:44.1398998Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-16T12:59:44.1405452Z ##[command]git config --get-all http.proxy
2020-03-16T12:59:44.1417412Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69889/merge:refs/remotes/pull/69889/merge
---
2020-03-16T14:01:59.6115908Z .................................................................................................... 1700/9774
2020-03-16T14:02:04.2167013Z .................................................................................................... 1800/9774
2020-03-16T14:02:15.9909555Z ......................................................................i............................. 1900/9774
2020-03-16T14:02:22.5301000Z .................................................................................................... 2000/9774
2020-03-16T14:02:37.5802289Z ............................................................iiiii................................... 2100/9774
2020-03-16T14:02:48.5964693Z .................................................................................................... 2300/9774
2020-03-16T14:02:50.8208347Z .................................................................................................... 2400/9774
2020-03-16T14:02:53.7683179Z .................................................................................................... 2500/9774
2020-03-16T14:03:14.1479711Z .................................................................................................... 2600/9774
---
2020-03-16T14:05:53.6972025Z ................................i...............i................................................... 5000/9774
2020-03-16T14:06:03.0672788Z .................................................................................................... 5100/9774
2020-03-16T14:06:09.6590454Z ...........................................................................i........................ 5200/9774
2020-03-16T14:06:15.2286776Z .................................................................................................... 5300/9774
2020-03-16T14:06:25.5587728Z ........................................................ii.ii........i...i.......................... 5400/9774
2020-03-16T14:06:33.9352014Z .................................................................................................... 5600/9774
2020-03-16T14:06:43.5794970Z .................................................................................................... 5700/9774
2020-03-16T14:06:49.7545419Z ................................................i................................................... 5800/9774
2020-03-16T14:06:56.2358464Z .................................................................................................... 5900/9774
2020-03-16T14:06:56.2358464Z .................................................................................................... 5900/9774
2020-03-16T14:07:06.4408681Z .................................................................................................... 6000/9774
2020-03-16T14:07:12.4607764Z ..........................................ii...i..ii...........i.................................... 6100/9774
2020-03-16T14:07:32.5343537Z .................................................................................................... 6300/9774
2020-03-16T14:07:39.4680969Z .................................................................................................... 6400/9774
2020-03-16T14:07:39.4680969Z .................................................................................................... 6400/9774
2020-03-16T14:07:48.4510881Z ........................................................................i..ii....................... 6500/9774
2020-03-16T14:08:11.9539140Z .................................................................................................... 6700/9774
2020-03-16T14:08:21.1302354Z ......................................................................i............................. 6800/9774
2020-03-16T14:08:23.1432928Z .................................................................................................... 6900/9774
2020-03-16T14:08:25.3132593Z .................................................................................................... 7000/9774
---
2020-03-16T14:10:09.4900979Z .................................................................................................... 7800/9774
2020-03-16T14:10:15.4308517Z .................................................................................................... 7900/9774
2020-03-16T14:10:21.2355439Z ......................................................i............................................. 8000/9774
2020-03-16T14:10:31.5351754Z .................................................................................................... 8100/9774
2020-03-16T14:10:37.0146998Z ...iiiiiiiiii.i..................................................................................... 8200/9774
2020-03-16T14:10:50.6874320Z .................................................................................................... 8400/9774
2020-03-16T14:11:01.3594594Z .................................................................................................... 8500/9774
2020-03-16T14:11:14.4564642Z .................................................................................................... 8600/9774
2020-03-16T14:11:20.5534620Z .................................................................................................... 8700/9774
---
2020-03-16T14:13:39.5491262Z  finished in 7.224
2020-03-16T14:13:39.5492170Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:13:39.5492443Z 
2020-03-16T14:13:39.5492587Z running 183 tests
2020-03-16T14:13:42.5408461Z iiii......i............ii.i..iiii....i....i...........i............i..i..................i....i..... 100/183
2020-03-16T14:13:44.1284614Z .......i.i.i...iii..iiiiiiiiiiiiiiii.......................iii.............ii......
2020-03-16T14:13:44.1290103Z 
2020-03-16T14:13:44.1293585Z  finished in 5.296
2020-03-16T14:13:44.1470825Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:13:44.3008872Z 
---
2020-03-16T14:13:46.1714395Z  finished in 2.024
2020-03-16T14:13:46.1899677Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:13:46.3454557Z 
2020-03-16T14:13:46.3455171Z running 9 tests
2020-03-16T14:13:46.3456223Z iiiiiiiii
2020-03-16T14:13:46.3457461Z 
2020-03-16T14:13:46.3458398Z  finished in 0.155
2020-03-16T14:13:46.3637218Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:13:46.5174740Z 
---
2020-03-16T14:14:05.4810719Z  finished in 19.117
2020-03-16T14:14:05.4973261Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:14:05.6355542Z 
2020-03-16T14:14:05.6356049Z running 115 tests
2020-03-16T14:14:17.9161530Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
2020-03-16T14:14:19.5866341Z ...iiii.....ii.
2020-03-16T14:14:19.5868179Z 
2020-03-16T14:14:19.5926026Z  finished in 14.090
2020-03-16T14:14:19.5926899Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:14:19.5927861Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-03-16T14:27:25.7100121Z 
2020-03-16T14:27:25.7101234Z    Doc-tests core
2020-03-16T14:27:30.5404289Z 
2020-03-16T14:27:30.5405266Z running 2481 tests
2020-03-16T14:27:40.0120198Z ......iiiii......................................................................................... 100/2481
2020-03-16T14:27:48.9605429Z .....................................................................................ii............. 200/2481
2020-03-16T14:28:09.7627935Z ....................i............................................................................... 400/2481
2020-03-16T14:28:09.7627935Z ....................i............................................................................... 400/2481
2020-03-16T14:28:19.5982038Z .........................................................................i..i..................iiii. 500/2481
2020-03-16T14:28:35.6610340Z .................................................................................................... 700/2481
2020-03-16T14:28:44.0466366Z .................................................................................................... 800/2481
2020-03-16T14:28:52.3564157Z .................................................................................................... 900/2481
2020-03-16T14:29:00.5520506Z .................................................................................................... 1000/2481
---
2020-03-16T14:32:37.0678308Z 
2020-03-16T14:32:37.0678697Z running 1010 tests
2020-03-16T14:32:54.6511839Z i................................................................................................... 100/1010
2020-03-16T14:33:05.0697348Z .................................................................................................... 200/1010
2020-03-16T14:33:12.3053320Z ..................iii......i......i...i......i...................................................... 300/1010
2020-03-16T14:33:17.5047384Z .................................................................................................... 400/1010
2020-03-16T14:33:24.6614215Z ............................................i..i......................................ii............ 500/1010
2020-03-16T14:33:37.8597504Z .................................................................................................... 700/1010
2020-03-16T14:33:37.8597504Z .................................................................................................... 700/1010
2020-03-16T14:33:45.0474782Z ....................................iiii............................................................ 800/1010
2020-03-16T14:33:59.2200399Z .................................................................................................... 900/1010
2020-03-16T14:34:05.8613527Z ..........................................................iiii...................................... 1000/1010
2020-03-16T14:34:06.3424149Z test result: ok. 990 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-03-16T14:34:06.3424444Z 
2020-03-16T14:34:06.3534362Z  finished in 166.010
2020-03-16T14:34:06.3549337Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-03-16T14:51:39.3653593Z Rustbook (x86_64-unknown-linux-gnu) - edition-guide
2020-03-16T14:51:39.7384727Z Building stage0 tool linkchecker (x86_64-unknown-linux-gnu)
2020-03-16T14:51:39.9092569Z    Compiling linkchecker v0.1.0 (/checkout/src/tools/linkchecker)
2020-03-16T14:51:41.4470629Z     Finished release [optimized] target(s) in 1.70s
2020-03-16T14:51:41.7538326Z core/alloc/enum.AllocInit.html:13: broken link fragment `#memory-fitting` pointing to `core/alloc/enum.AllocInit.html`
2020-03-16T14:51:41.7539791Z core/alloc/enum.AllocInit.html:19: broken link fragment `#memory-fitting` pointing to `core/alloc/enum.AllocInit.html`
2020-03-16T14:51:44.1599295Z std/alloc/enum.AllocInit.html:13: broken link fragment `#memory-fitting` pointing to `std/alloc/enum.AllocInit.html`
2020-03-16T14:51:44.1600645Z std/alloc/enum.AllocInit.html:19: broken link fragment `#memory-fitting` pointing to `std/alloc/enum.AllocInit.html`
2020-03-16T14:51:46.4424730Z alloc/alloc/enum.AllocInit.html:13: broken link fragment `#memory-fitting` pointing to `alloc/alloc/enum.AllocInit.html`
2020-03-16T14:51:46.4426149Z alloc/alloc/enum.AllocInit.html:19: broken link fragment `#memory-fitting` pointing to `alloc/alloc/enum.AllocInit.html`
2020-03-16T14:51:48.8918358Z thread 'main' panicked at 'found some broken links', src/tools/linkchecker/main.rs:43:9
2020-03-16T14:51:48.8948165Z 
2020-03-16T14:51:48.8948482Z 
2020-03-16T14:51:48.8949409Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/linkchecker" "/checkout/obj/build/x86_64-unknown-linux-gnu/doc"
2020-03-16T14:51:48.8951741Z expected success, got: exit code: 101
---
2020-03-16T14:51:48.9040605Z   local time: Mon Mar 16 14:51:48 UTC 2020
2020-03-16T14:51:49.1978792Z   network time: Mon, 16 Mar 2020 14:51:49 GMT
2020-03-16T14:51:49.1982344Z == end clock drift check ==
2020-03-16T14:51:50.7526563Z 
2020-03-16T14:51:50.7610803Z ##[error]Bash exited with code '1'.
2020-03-16T14:51:50.7625575Z ##[section]Finishing: Run build
2020-03-16T14:51:50.7682021Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-16T14:51:50.7688212Z Task         : Get sources
2020-03-16T14:51:50.7688561Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-16T14:51:50.7689007Z Version      : 1.0.0
2020-03-16T14:51:50.7689225Z Author       : Microsoft
2020-03-16T14:51:50.7689225Z Author       : Microsoft
2020-03-16T14:51:50.7689804Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-16T14:51:50.7690455Z ==============================================================================
2020-03-16T14:51:51.1470944Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-16T14:51:51.1478842Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-16T14:51:51.1564527Z Cleaning up task key
2020-03-16T14:51:51.1565907Z Start cleaning up orphan processes.
2020-03-16T14:51:51.1756605Z Terminate orphan process: pid (3722) (python)
2020-03-16T14:51:51.2007983Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-16T12:59:46.0147371Z ========================== Starting Command Output ===========================
2020-03-16T12:59:46.0150483Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/38c81623-95f6-42e3-b72b-5ef0e85be4bc.sh
2020-03-16T12:59:46.0150736Z 
2020-03-16T12:59:46.0155445Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-16T12:59:46.0174013Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-16T12:59:46.0177598Z Task         : Get sources
2020-03-16T12:59:46.0177927Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-16T12:59:46.0178190Z Version      : 1.0.0
2020-03-16T12:59:46.0178369Z Author       : Microsoft
---
2020-03-16T12:59:48.1782695Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-16T12:59:48.1792469Z ##[command]git config gc.auto 0
2020-03-16T12:59:48.1797294Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-16T12:59:48.1810796Z ##[command]git config --get-all http.proxy
2020-03-16T12:59:48.1821415Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69889/merge:refs/remotes/pull/69889/merge
---
2020-03-16T14:05:25.9716113Z .................................................................................................... 1700/9774
2020-03-16T14:05:30.6677645Z .................................................................................................... 1800/9774
2020-03-16T14:05:43.1250225Z ......................................................................i............................. 1900/9774
2020-03-16T14:05:50.0160809Z .................................................................................................... 2000/9774
2020-03-16T14:06:06.0171489Z ............................................................iiiii................................... 2100/9774
2020-03-16T14:06:17.4570040Z .................................................................................................... 2300/9774
2020-03-16T14:06:19.8002530Z .................................................................................................... 2400/9774
2020-03-16T14:06:22.9335792Z .................................................................................................... 2500/9774
2020-03-16T14:06:44.6614837Z .................................................................................................... 2600/9774
---
2020-03-16T14:09:34.9335942Z ................................i...............i................................................... 5000/9774
2020-03-16T14:09:44.6314434Z .................................................................................................... 5100/9774
2020-03-16T14:09:51.1961408Z ...........................................................................i........................ 5200/9774
2020-03-16T14:09:56.8628765Z .................................................................................................... 5300/9774
2020-03-16T14:10:07.0336366Z ........................................................ii.ii........i...i.......................... 5400/9774
2020-03-16T14:10:15.5801265Z .................................................................................................... 5600/9774
2020-03-16T14:10:25.8949044Z .................................................................................................... 5700/9774
2020-03-16T14:10:32.4219745Z ................................................i................................................... 5800/9774
2020-03-16T14:10:39.5334875Z .................................................................................................... 5900/9774
2020-03-16T14:10:39.5334875Z .................................................................................................... 5900/9774
2020-03-16T14:10:50.3484099Z .................................................................................................... 6000/9774
2020-03-16T14:10:56.7609911Z ..........................................ii...i..ii...........i.................................... 6100/9774
2020-03-16T14:11:18.8689562Z .................................................................................................... 6300/9774
2020-03-16T14:11:26.5545521Z .................................................................................................... 6400/9774
2020-03-16T14:11:26.5545521Z .................................................................................................... 6400/9774
2020-03-16T14:11:36.3087657Z ........................................................................i..ii....................... 6500/9774
2020-03-16T14:11:59.9379663Z .................................................................................................... 6700/9774
2020-03-16T14:12:09.7893248Z ......................................................................i............................. 6800/9774
2020-03-16T14:12:11.9680945Z .................................................................................................... 6900/9774
2020-03-16T14:12:14.3128268Z .................................................................................................... 7000/9774
---
2020-03-16T14:14:07.8823895Z .................................................................................................... 7800/9774
2020-03-16T14:14:14.5221259Z .................................................................................................... 7900/9774
2020-03-16T14:14:21.1095464Z ......................................................i............................................. 8000/9774
2020-03-16T14:14:32.7416223Z .................................................................................................... 8100/9774
2020-03-16T14:14:38.8831062Z ...iiiiiiiiii.i..................................................................................... 8200/9774
2020-03-16T14:14:54.1223914Z .................................................................................................... 8400/9774
2020-03-16T14:15:06.1259665Z .................................................................................................... 8500/9774
2020-03-16T14:15:20.4681383Z .................................................................................................... 8600/9774
2020-03-16T14:15:27.0654760Z .................................................................................................... 8700/9774
---
2020-03-16T14:17:55.9571660Z  finished in 7.798
2020-03-16T14:17:55.9768403Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:17:56.1396540Z 
2020-03-16T14:17:56.1397083Z running 183 tests
2020-03-16T14:17:59.0191150Z iiii......i............ii.i..iiii....i....i...........i............i..i..................i....i..... 100/183
2020-03-16T14:18:01.7238778Z .......i.i.i...iii..iiiiiiiiiiiiiiii.......................iii.............ii......
2020-03-16T14:18:01.7244721Z 
2020-03-16T14:18:01.7248308Z  finished in 5.748
2020-03-16T14:18:01.7439935Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:18:01.9016437Z 
---
2020-03-16T14:18:03.9886002Z  finished in 2.244
2020-03-16T14:18:04.0082253Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:18:04.1655982Z 
2020-03-16T14:18:04.1656725Z running 9 tests
2020-03-16T14:18:04.1658575Z iiiiiiiii
2020-03-16T14:18:04.1659714Z 
2020-03-16T14:18:04.1661711Z  finished in 0.157
2020-03-16T14:18:04.1871600Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:18:04.3576929Z 
---
2020-03-16T14:18:25.8888238Z  finished in 21.701
2020-03-16T14:18:25.9162507Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:18:26.0989059Z 
2020-03-16T14:18:26.0989952Z running 115 tests
2020-03-16T14:18:40.3635509Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
2020-03-16T14:18:42.0166168Z ...iiii.....ii.
2020-03-16T14:18:42.0170245Z 
2020-03-16T14:18:42.0174613Z  finished in 16.101
2020-03-16T14:18:42.0181308Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-16T14:18:42.0182242Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-03-16T14:32:41.0496317Z 
2020-03-16T14:32:41.0497980Z    Doc-tests core
2020-03-16T14:32:46.0858171Z 
2020-03-16T14:32:46.0858889Z running 2481 tests
2020-03-16T14:32:55.8646912Z ......iiiii......................................................................................... 100/2481
2020-03-16T14:33:05.5255554Z .....................................................................................ii............. 200/2481
2020-03-16T14:33:27.7996614Z ....................i............................................................................... 400/2481
2020-03-16T14:33:27.7996614Z ....................i............................................................................... 400/2481
2020-03-16T14:33:38.2913174Z .........................................................................i..i..................iiii. 500/2481
2020-03-16T14:33:55.7245913Z .................................................................................................... 700/2481
2020-03-16T14:34:04.8658249Z .................................................................................................... 800/2481
2020-03-16T14:34:13.8865353Z .................................................................................................... 900/2481
2020-03-16T14:34:22.8986878Z .................................................................................................... 1000/2481
---
2020-03-16T14:38:05.1974912Z .................................................................................................... 500/760
2020-03-16T14:38:05.2227106Z .................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2741:22
2020-03-16T14:38:05.2248771Z ....thread '<unnamed>thread '' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2778:21
2020-03-16T14:38:05.2254240Z <unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libstd/sync/mpsc/mod.rs:2766:17
2020-03-16T14:38:05.2288809Z .......thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', ...src/libstd/sync/mpsc/mod.rs:2645:13
2020-03-16T14:38:05.4461916Z ........................................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1997:22
2020-03-16T14:38:05.4475801Z ....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2034:21
2020-03-16T14:38:05.4504486Z ......thread '<unnamed>' panicked at '.called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1916:13
2020-03-16T14:38:07.4840926Z ...................thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:633:13
2020-03-16T14:38:07.4842119Z thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:587:13
2020-03-16T14:38:07.4843057Z thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:563:13
2020-03-16T14:38:07.4843836Z ......thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:694:13
---
2020-03-16T14:38:16.5394132Z 
2020-03-16T14:38:16.5394473Z running 1010 tests
2020-03-16T14:38:35.7693809Z i................................................................................................... 100/1010
2020-03-16T14:38:47.0522724Z .................................................................................................... 200/1010
2020-03-16T14:38:54.3393867Z ..................iii......i......i...i......i...................................................... 300/1010
2020-03-16T14:38:59.6555381Z .................................................................................................... 400/1010
2020-03-16T14:39:07.4836449Z ............................................i..i......................................ii............ 500/1010
2020-03-16T14:39:20.7481712Z .................................................................................................... 700/1010
2020-03-16T14:39:20.7481712Z .................................................................................................... 700/1010
2020-03-16T14:39:27.9072064Z ....................................iiii............................................................ 800/1010
2020-03-16T14:39:42.2804180Z .................................................................................................... 900/1010
2020-03-16T14:39:49.4678188Z ..........................................................iiii...................................... 1000/1010
2020-03-16T14:39:49.9192563Z test result: ok. 990 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-03-16T14:39:49.9193009Z 
2020-03-16T14:39:49.9302708Z  finished in 176.090
2020-03-16T14:39:49.9314991Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-03-16T14:58:31.7748302Z Rustbook (x86_64-unknown-linux-gnu) - edition-guide
2020-03-16T14:58:32.2001425Z Building stage0 tool linkchecker (x86_64-unknown-linux-gnu)
2020-03-16T14:58:32.3716075Z    Compiling linkchecker v0.1.0 (/checkout/src/tools/linkchecker)
2020-03-16T14:58:33.9694682Z     Finished release [optimized] target(s) in 1.76s
2020-03-16T14:58:34.3112587Z core/alloc/enum.AllocInit.html:13: broken link fragment `#memory-fitting` pointing to `core/alloc/enum.AllocInit.html`
2020-03-16T14:58:34.3113552Z core/alloc/enum.AllocInit.html:19: broken link fragment `#memory-fitting` pointing to `core/alloc/enum.AllocInit.html`
2020-03-16T14:58:36.8116806Z std/alloc/enum.AllocInit.html:13: broken link fragment `#memory-fitting` pointing to `std/alloc/enum.AllocInit.html`
2020-03-16T14:58:36.8117939Z std/alloc/enum.AllocInit.html:19: broken link fragment `#memory-fitting` pointing to `std/alloc/enum.AllocInit.html`
2020-03-16T14:58:39.0926878Z alloc/alloc/enum.AllocInit.html:13: broken link fragment `#memory-fitting` pointing to `alloc/alloc/enum.AllocInit.html`
2020-03-16T14:58:39.0928325Z alloc/alloc/enum.AllocInit.html:19: broken link fragment `#memory-fitting` pointing to `alloc/alloc/enum.AllocInit.html`
2020-03-16T14:58:41.8841525Z thread 'main' panicked at 'found some broken links', src/tools/linkchecker/main.rs:43:9
2020-03-16T14:58:41.8842984Z 
2020-03-16T14:58:41.8849714Z 
2020-03-16T14:58:41.8850686Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/linkchecker" "/checkout/obj/build/x86_64-unknown-linux-gnu/doc"
2020-03-16T14:58:41.8851199Z expected success, got: exit code: 101
---
2020-03-16T14:58:41.8852580Z   local time: Mon Mar 16 14:58:41 UTC 2020
2020-03-16T14:58:42.2083655Z   network time: Mon, 16 Mar 2020 14:58:42 GMT
2020-03-16T14:58:42.2086526Z == end clock drift check ==
2020-03-16T14:58:43.8858052Z 
2020-03-16T14:58:43.8934141Z ##[error]Bash exited with code '1'.
2020-03-16T14:58:43.8951102Z ##[section]Finishing: Run build
2020-03-16T14:58:43.9000751Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-16T14:58:43.9005474Z Task         : Get sources
2020-03-16T14:58:43.9005803Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-16T14:58:43.9006088Z Version      : 1.0.0
2020-03-16T14:58:43.9006284Z Author       : Microsoft
2020-03-16T14:58:43.9006284Z Author       : Microsoft
2020-03-16T14:58:43.9006643Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-16T14:58:43.9007010Z ==============================================================================
2020-03-16T14:58:44.2829110Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-16T14:58:44.2879068Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-16T14:58:44.2978009Z Cleaning up task key
2020-03-16T14:58:44.2979285Z Start cleaning up orphan processes.
2020-03-16T14:58:44.3182122Z Terminate orphan process: pid (3642) (python)
2020-03-16T14:58:44.3516732Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-16T16:21:16.5485284Z ========================== Starting Command Output ===========================
2020-03-16T16:21:16.5487716Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/72ea3851-0776-464c-869a-bcee57c3dc97.sh
2020-03-16T16:21:16.5488005Z 
2020-03-16T16:21:16.5491774Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-16T16:21:16.5510836Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-16T16:21:16.5514020Z Task         : Get sources
2020-03-16T16:21:16.5514328Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-16T16:21:16.5514627Z Version      : 1.0.0
2020-03-16T16:21:16.5514843Z Author       : Microsoft
---
2020-03-16T16:21:17.5433945Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-16T16:21:17.5439249Z ##[command]git config gc.auto 0
2020-03-16T16:21:17.5443061Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-16T16:21:17.5446299Z ##[command]git config --get-all http.proxy
2020-03-16T16:21:17.5452607Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69889/merge:refs/remotes/pull/69889/merge

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@TimDiekmann
Copy link
Member Author

TimDiekmann commented Mar 16, 2020

Retriggered CI (https://status.crates.io/incidents/ty016p23y1v1):

2020-03-16T16:25:31.5974890Z Updating crates.io index
2020-03-16T16:25:49.2285466Z Downloading crates ...
2020-03-16T16:25:49.4583352Z warning: spurious network error (2 tries remaining): failed to get 200 response from https://crates.io/api/v1/crates/cc/1.0.50/download, got 502
2020-03-16T16:25:49.4640873Z warning: spurious network error (2 tries remaining): failed to get 200 response from https://crates.io/api/v1/crates/serde/1.0.99/download, got 502
2020-03-16T16:25:49.4770588Z warning: spurious network error (1 tries remaining): failed to get 200 response from https://crates.io/api/v1/crates/cc/1.0.50/download, got 502
2020-03-16T16:25:49.5103586Z warning: spurious network error (1 tries remaining): failed to get 200 response from https://crates.io/api/v1/crates/serde/1.0.99/download, got 502
2020-03-16T16:25:49.5746668Z error: failed to download from https://crates.io/api/v1/crates/cc/1.0.50/download
2020-03-16T16:25:49.5747010Z
2020-03-16T16:25:49.5747183Z Caused by:
2020-03-16T16:25:49.5747504Z failed to get 200 response from https://crates.io/api/v1/crates/cc/1.0.50/download, got 502
2020-03-16T16:25:49.5782224Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml
2020-03-16T16:25:49.5782685Z Build completed unsuccessfully in 0:00:37

@TimDiekmann
Copy link
Member Author

Squashed and rebased onto master.

Copy link
Member

@Amanieu Amanieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished reviewing the RawVec changes. I am pretty happy with the reorganization around grow and shrink, but I would prefer if the special casing for ZSTs was kept. Since size_of::<T>() is a compile-time constant, this special casing has no runtime overhead.

src/liballoc/raw_vec.rs Outdated Show resolved Hide resolved
src/liballoc/raw_vec.rs Show resolved Hide resolved
src/liballoc/raw_vec.rs Show resolved Hide resolved
src/liballoc/raw_vec.rs Show resolved Hide resolved
/// `Box<[T]>`, since `capacity()` won't yield the length. However, `with_capacity`,
/// `shrink_to_fit`, and `from_box` will actually set `RawVec`'s private capacity
/// field. This allows zero-sized types to not be special-cased by consumers of
/// this type.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am hesistant to change the guarantees provided by the RawVec type. I would prefer if we only changed the internals without affecting the API guarantees.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this still holds, the internal capacity field are set with with_capacity, shrink_to_fit, and from_box. I'll re-add this.

Copy link
Member Author

@TimDiekmann TimDiekmann Mar 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/// * Uses the excess returned from the allocator to use the largest available capacity.
/// ...
/// Note that the excess of a zero-sized types is always infinite, so `capacity()` always returns 
/// `usize::MAX`. This means that you need to be careful when round-tripping this type with a 
/// `Box<[T]>`, since `capacity()` won't yield the length. However, `with_capacity`, 
/// `shrink_to_fit`, and `from_box` will actually set `RawVec`'s private capacity field. This allows 
/// zero-sized types to not be special-cased by consumers of this type.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, into_box should return Box<[MaybeUninit<T>]> instead of Box<T>.

@Amanieu
Copy link
Member

Amanieu commented Mar 18, 2020

I am also concerned about the performance impact of this change: link

We should re-run the perf test after the changes, but I would like any performance issues to be resolved before this is merged.

@TimDiekmann
Copy link
Member Author

I have a few things in mind how we could reduce the performance regression. I will give updates as soon as I tested them out. This may need another restructuring of AllocRef and may split this PR up. I will probably test it at the alloc-wg crate first so this may take a bit longer than I expected initially.

@Amanieu
Copy link
Member

Amanieu commented Mar 18, 2020

Have you made measurements to see exactly what is causing the regressions?

@TimDiekmann
Copy link
Member Author

I compared this branch with the current nightly. The performance of allocators are only affected, if the layout isn't statically created. Passing a layout constructed from T is optimized away, so RawVec and Box don't have penalties.

Regarding the compile-time regression: on average, we have a performance regression of 1.15% (mean value of all listed average tests), which is IMO accaptable. This is caused by the slightly more complicated logic. In debug builds, this is probably caused by more code to be generated and in opt-builds by more things to be optimized.

I suggest, that I'll fix your listed change request, then we merge this. Further, I'll try to optimize AllocRef and implementors.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-18T13:34:36.0308655Z ========================== Starting Command Output ===========================
2020-03-18T13:34:36.0311598Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/a6a74630-8eb6-4e56-8c2c-1ac9604da4c4.sh
2020-03-18T13:34:36.0311818Z 
2020-03-18T13:34:36.0315840Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-18T13:34:36.0334633Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-18T13:34:36.0393227Z Task         : Get sources
2020-03-18T13:34:36.0393773Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-18T13:34:36.0394019Z Version      : 1.0.0
2020-03-18T13:34:36.0394180Z Author       : Microsoft
---
2020-03-18T13:34:37.0274369Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-18T13:34:37.0283072Z ##[command]git config gc.auto 0
2020-03-18T13:34:37.0292170Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-18T13:34:37.0295500Z ##[command]git config --get-all http.proxy
2020-03-18T13:34:37.0302848Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69889/merge:refs/remotes/pull/69889/merge
---
2020-03-18T13:38:15.0494631Z Successfully built 3a1ada84719d
2020-03-18T13:38:15.0537554Z Successfully tagged rust-ci:latest
2020-03-18T13:38:15.1959601Z Built container sha256:3a1ada84719d21a07237ee2f8450b765d585471e6835560280e24f42240c6cfa
2020-03-18T13:38:15.1975752Z Uploading finished image to https://rust-lang-ci-sccache2.s3.amazonaws.com/docker/fc0b9a6e3051d635da7d94215f84d5e9794477aa0cb68449a3fa307fcd796c24419e8a5e04fb3ebd554f2f8d17623f528e7a0f3c6d8c2a3324e25c8632491b33
2020-03-18T13:38:56.7931285Z upload failed: - to s3://rust-lang-ci-sccache2/docker/fc0b9a6e3051d635da7d94215f84d5e9794477aa0cb68449a3fa307fcd796c24419e8a5e04fb3ebd554f2f8d17623f528e7a0f3c6d8c2a3324e25c8632491b33 An error occurred (InvalidAccessKeyId) when calling the CreateMultipartUpload operation: The AWS Access Key Id you provided does not exist in our records.
2020-03-18T13:38:57.3304318Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-03-18T13:38:57.3330756Z == clock drift check ==
2020-03-18T13:38:57.3335684Z   local time: Wed Mar 18 13:38:57 UTC 2020
2020-03-18T13:38:57.6244900Z   network time: Wed, 18 Mar 2020 13:38:57 GMT
---
2020-03-18T14:33:06.3843698Z .................................................................................................... 1700/9796
2020-03-18T14:33:10.4255038Z .................................................................................................... 1800/9796
2020-03-18T14:33:21.4131953Z ..........................................................................i......................... 1900/9796
2020-03-18T14:33:27.4665831Z .................................................................................................... 2000/9796
2020-03-18T14:33:35.2209282Z ................................................................iiiii............................... 2100/9796
2020-03-18T14:33:52.1910242Z .................................................................................................... 2300/9796
2020-03-18T14:33:54.4093680Z .................................................................................................... 2400/9796
2020-03-18T14:33:57.2915691Z .................................................................................................... 2500/9796
2020-03-18T14:34:16.7559913Z .................................................................................................... 2600/9796
---
2020-03-18T14:36:50.6652083Z ....................................i...............i............................................... 5000/9796
2020-03-18T14:36:59.8651619Z .................................................................................................... 5100/9796
2020-03-18T14:37:06.2526852Z ...............................................................................i.................... 5200/9796
2020-03-18T14:37:11.6996143Z .................................................................................................... 5300/9796
2020-03-18T14:37:21.8051595Z ............................................................ii.ii........i...i...................... 5400/9796
2020-03-18T14:37:25.9600836Z ...................................................................................................i 5500/9796
2020-03-18T14:37:39.1682308Z .................................................................................................... 5700/9796
2020-03-18T14:37:45.2844283Z .....................................................i.............................................. 5800/9796
2020-03-18T14:37:51.6188345Z .................................................................................................... 5900/9796
2020-03-18T14:38:01.6372036Z .................................................................................................... 6000/9796
2020-03-18T14:38:01.6372036Z .................................................................................................... 6000/9796
2020-03-18T14:38:07.8397122Z ...............................................ii...i..ii...........i............................... 6100/9796
2020-03-18T14:38:28.0844741Z .................................................................................................... 6300/9796
2020-03-18T14:38:35.0001299Z .................................................................................................... 6400/9796
2020-03-18T14:38:35.0001299Z .................................................................................................... 6400/9796
2020-03-18T14:38:42.1759148Z .............................................................................i..ii.................. 6500/9796
2020-03-18T14:39:04.4373850Z .................................................................................................... 6700/9796
2020-03-18T14:39:14.0160623Z ...........................................................................i........................ 6800/9796
2020-03-18T14:39:15.9996728Z .................................................................................................... 6900/9796
2020-03-18T14:39:18.0609901Z .................................................................................................... 7000/9796
---
2020-03-18T14:41:00.7049386Z .................................................................................................... 7800/9796
2020-03-18T14:41:05.9960445Z .................................................................................................... 7900/9796
2020-03-18T14:41:12.1257136Z .............................................................i...................................... 8000/9796
2020-03-18T14:41:21.9227206Z .................................................................................................... 8100/9796
2020-03-18T14:41:27.5439013Z ..........iiiiiiiiii.i.............................................................................. 8200/9796
2020-03-18T14:41:41.0039261Z .................................................................................................... 8400/9796
2020-03-18T14:41:48.8703788Z .................................................................................................... 8500/9796
2020-03-18T14:42:03.3297692Z .................................................................................................... 8600/9796
2020-03-18T14:42:10.0518791Z .................................................................................................... 8700/9796
---
2020-03-18T14:44:28.5571909Z  finished in 7.342
2020-03-18T14:44:28.5681473Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-18T14:44:28.7569216Z 
2020-03-18T14:44:28.7569476Z running 183 tests
2020-03-18T14:44:31.4003403Z iiii......i............ii.i..iiii....i....i...........i............i..i..................i....i..... 100/183
2020-03-18T14:44:33.9063130Z .......i.i.i...iii..iiiiiiiiiiiiiiii.......................iii.............ii......
2020-03-18T14:44:33.9070022Z 
2020-03-18T14:44:33.9073656Z  finished in 5.339
2020-03-18T14:44:33.9078001Z Suite("src/test/codegen-units") not skipped for "bootstrap::test::CodegenUnits" -- not in ["src/tools/tidy"]
2020-03-18T14:44:33.9257027Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-03-18T14:44:36.0198654Z Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
2020-03-18T14:44:36.0396643Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-18T14:44:36.1894594Z 
2020-03-18T14:44:36.1895433Z running 9 tests
2020-03-18T14:44:36.1897346Z iiiiiiiii
2020-03-18T14:44:36.1899036Z 
2020-03-18T14:44:36.1903053Z  finished in 0.150
2020-03-18T14:44:36.1909323Z Suite("src/test/incremental") not skipped for "bootstrap::test::Incremental" -- not in ["src/tools/tidy"]
2020-03-18T14:44:36.2089421Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-03-18T14:44:55.9871291Z Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
2020-03-18T14:44:56.0097909Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-18T14:44:56.1922143Z 
2020-03-18T14:44:56.1922447Z running 115 tests
2020-03-18T14:45:10.0723131Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
2020-03-18T14:45:11.6032574Z ...iiii.....ii.
2020-03-18T14:45:11.6034407Z 
2020-03-18T14:45:11.6037201Z  finished in 15.593
2020-03-18T14:45:11.6040022Z Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
2020-03-18T14:45:11.6043720Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-03-18T14:55:15.8025163Z    Compiling alloc v0.0.0 (/checkout/src/liballoc)
2020-03-18T14:55:18.0350317Z error[E0658]: use of unstable library feature 'new_uninit'
2020-03-18T14:55:18.0351027Z    --> src/liballoc/vec.rs:682:28
2020-03-18T14:55:18.0351665Z     |
2020-03-18T14:55:18.0352568Z 682 |             buf.into_box().assume_init()
2020-03-18T14:55:18.0354151Z     |
2020-03-18T14:55:18.0354151Z     |
2020-03-18T14:55:18.0354930Z     = note: see issue #63291 <***/issues/63291> for more information
2020-03-18T14:55:18.0355970Z     = help: add `#![feature(new_uninit)]` to the crate attributes to enable
2020-03-18T14:55:18.1571099Z error: aborting due to previous error
2020-03-18T14:55:18.1571879Z 
2020-03-18T14:55:18.1573312Z For more information about this error, try `rustc --explain E0658`.
2020-03-18T14:55:18.1643685Z error: could not compile `alloc`.
---
2020-03-18T14:56:02.6568273Z   local time: Wed Mar 18 14:56:02 UTC 2020
2020-03-18T14:56:03.0211443Z   network time: Wed, 18 Mar 2020 14:56:03 GMT
2020-03-18T14:56:03.0212298Z == end clock drift check ==
2020-03-18T14:56:03.4750432Z 
2020-03-18T14:56:03.4821660Z ##[error]Bash exited with code '1'.
2020-03-18T14:56:03.4834220Z ##[section]Finishing: Run build
2020-03-18T14:56:03.4886048Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-18T14:56:03.4891950Z Task         : Get sources
2020-03-18T14:56:03.4892249Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-18T14:56:03.4892553Z Version      : 1.0.0
2020-03-18T14:56:03.4892748Z Author       : Microsoft
2020-03-18T14:56:03.4892748Z Author       : Microsoft
2020-03-18T14:56:03.4893054Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-18T14:56:03.4893426Z ==============================================================================
2020-03-18T14:56:03.8147011Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-18T14:56:03.8189141Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69889/merge to s
2020-03-18T14:56:03.8276298Z Cleaning up task key
2020-03-18T14:56:03.8277435Z Start cleaning up orphan processes.
2020-03-18T14:56:03.8492512Z Terminate orphan process: pid (3552) (python)
2020-03-18T14:56:03.8738709Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@TimDiekmann
Copy link
Member Author

TimDiekmann commented Mar 18, 2020

The current implementation of into_box is not sound because of the used excess. The current capacity is set from the returned excess, but Box assumes the content to be initialized, which is not the case.

@TimDiekmann
Copy link
Member Author

Github don't let me reopen this. Follow up: #70362

@bjorn3
Copy link
Member

bjorn3 commented Mar 24, 2020

You need to push the same commit as when you closed the PR for github to allow reopening a PR.

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 2, 2020
Overhaul of the `AllocRef` trait to match allocator-wg's latest consens; Take 2

GitHub won't let me reopen rust-lang#69889 so I make a new PR.

In addition to rust-lang#69889 this fixes the unsoundness of `RawVec::into_box` when using allocators supporting overallocating. Also it uses `MemoryBlock` in `AllocRef` to unify `_in_place` methods by passing `&mut MemoryBlock`. Additionally, `RawVec` now checks for `size_of::<T>()` again and ignore every ZST. The internal capacity of `RawVec` isn't used by ZSTs anymore, as `into_box` now requires a length to be specified.

r? @Amanieu

fixes rust-lang/wg-allocators#38
fixes rust-lang/wg-allocators#41
fixes rust-lang/wg-allocators#44
fixes rust-lang/wg-allocators#51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet