Граф коммитов

6022 Коммитов

Автор SHA1 Сообщение Дата
CloudDev Build Account e244530fe2 New LKG 0.1.0-20230321.0
[skip ci]
2023-03-24 06:05:26 +00:00
CloudDev Build Account 953bcc9d44 New LKG 0.1.0-20230323.3
[skip ci]
2023-03-24 05:32:03 +00:00
Julian Bayardo fe43a562a6 Merged PR 707482: Don't publish recompute information globally
Don't publish recompute information globally. Also removes the concept of a LocationAddRecentInactiveEager. That feature has been useless for months because machines are filtered out at both local and global, so doing a proactive global registration doesn't help.
2023-03-24 01:24:11 +00:00
Sergey Tepliakov b7431b1efb Merged PR 706590: Remove UseInRingMachinesForCopies
We realized that `UseInRingMachinesForCopies` feature is not helpful because it generates a lot of extra netrowking traffic and doesn't improve build reliability.

This PR removes the code that we should not use. If/when we'll think that we need something like that we'll implement such feature from scratch.
2023-03-24 00:11:36 +00:00
Michael Pysson 1711cacb3a Merged PR 708850: Remove additional status line for pips waiting on resources
This removes the additional line on the console below the main status line that gets displayed with pips are resourced paused. ex:
`3 running pips waiting on resources`

The data is already shown in the primary status and we want to decrease the amount of scrolling back people have to do in the ADO console view when looking at builds that have already completed.
2023-03-23 23:57:25 +00:00
Sergey Tepliakov 0651523882 Merged PR 708403: Stop tracing 'ProactiveCopyIfNeededAsync start'
Stop tracing 'ProactiveCopyIfNeededAsync start'
2023-03-23 23:45:21 +00:00
Will Li 1ab57ddf3d Merged PR 707695: Removing Pips Dependencies from Processes
This PR moves majority of Pips dependencies from Processes. All of the Pips usages are BXL specific. Additionally, moved a bunch of files that are only used by SandboxedProcessPipExecutor or above into ProcessPipExecutor
2023-03-23 23:27:12 +00:00
Serge Mera aaa84d7b55 Merged PR 708959: Address the case when the Lage graph is too big for stdio
Address the case when the Lage graph is too big for the 200kb stdio buffer.

Related work items: #2042518
2023-03-23 23:12:22 +00:00
Marcelo Lynch 🧉 b9063087db Merged PR 708954: Move SDL validation to OneESPipelinesValidation pool 2023-03-23 22:43:37 +00:00
Marcelo Lynch 🧉 005e28486c Merged PR 708896: Temporarily disable SDL analysis on the Linux validation
The pool is having networking issues and the validations take forever and mostly timeout
2023-03-23 20:12:51 +00:00
Julian Bayardo 6a93bd30c2 Merged PR 708671: Upgrade Azurite 2023-03-23 19:54:48 +00:00
Marcelo Lynch 🧉 a48f399964 Merged PR 708874: Temporarily disable distribution on linux validations
Temporarily disable distribution on linux validations
2023-03-23 19:43:29 +00:00
Marcelo Lynch 🧉 e983b92e2c Merged PR 708851: Move Linux PR validation to EastUS Pool
WUS3 is having networking issues that are blocking our Linux validations
2023-03-23 18:48:43 +00:00
Ignacio Alonso Battaglia 97eda3378c Merged PR 708674: Add PhysicalSize in DistributedCentralStorage
Add PhysicalSize in DistributedCentralStorage
2023-03-23 00:19:59 +00:00
Michael Pysson 01d363751e Merged PR 708451: Further decrease status logging frequency
After some reflection, we should be more aggressive about limiting the frequency of status updates that go to the ADO console. We are getting customer feedback that it is annoying to scroll through the many lines of status updates for longer builds. This change aims to strike a balance of providing some feedback in case folks want to see status while the build is running, but erroring on the side of having fewer status lines which aren't relevant once the build is over.
2023-03-23 00:00:37 +00:00
Michael Pysson 1cdac5db2d Merged PR 708176: Simplify command line config for redirecting user profiles
Usage of /RedirectedUserProfileJunctionRoot was thrown off because /enableProfileRedirect must also be set for it to take effect. This change simplifies config by just removing /enableProfileRedirect. It was not being set anyway and now that CloudBuild is externally setting the path, there is no longer need for a CB specific default path in the BuildXL codebase.
2023-03-22 23:57:13 +00:00
Iman Narasamdya 272992bffa Merged PR 708220: Ensure PTrace files exist and executable only when needed
Only ensure PTrace files exist and executable when PTrace is enabled:
- AnyBuild doesn't use PTrace. Missing access reports are compensated by Fuse.
- In previous PR I suggested Pasindu to use BuildXL itself as the daemon. In that case we don't have to ensure the existence of `ptracedaemon`.
- The existence and executability of `ptracerunner` still needs to be guaranteed, and should only be done once.

This PR should allow AnyBuild to ingest new BuildXL without further modification in AnyBuild file distrib.
2023-03-22 23:48:10 +00:00
Will Li 9619dc520c Merged PR 708448: Move Counter Utilities to Utilities.Core
Move Counter From BXL.Utilities to Utilities.Core. CounterAttributes are needed by Processes but it made sense to just move all of Counter to Utilities.Core.
2023-03-22 18:51:48 +00:00
Serge Mera 565e086355 Merged PR 708200: Add push to outputs duration on the critical path
Add push to outputs duration on the critical path
2023-03-21 16:21:46 +00:00
Will Li c3b5746fd1 Merged PR 707693: Pull Processes.Remoting into a Separate dll
Processes.Remoting is currently only used by ProcessPipExecutor. It must be moved out of Processes due to its dependency on Pips. So moving it to its own dll as it's separate from both Processes and ProcessesPipExecutor
2023-03-20 21:16:48 +00:00
Marcelo Lynch 🧉 4ebd68fd1b Merged PR 707958: Consider O_RDWR when marking access modes as writes
Related work items: #2040587
2023-03-20 21:05:06 +00:00
Michael Pysson 274ddac5b2 Merged PR 707821: Make status update throttling apply to console messages
The previously developed status update throttling feature only applied to the "##vso[task.setprogress" which are interpreted by ADO. This change refactors that throttling to extend it to the user visible status lines on the console. The goal is to decrease the status updates that people scroll through on ADO.
2023-03-20 18:35:44 +00:00
CloudDev Build Account 099fc94f1a New LKG 0.1.0-20230317.0
[skip ci]
2023-03-18 05:46:44 +00:00
CloudDev Build Account f38dfd3ac3 New LKG 0.1.0-20230316.1
[skip ci]
2023-03-18 04:48:52 +00:00
Iman Narasamdya 36fb9f7146 Merged PR 707181: Optimize allow list check for undeclared accesses
This makes the 2nd pass of observed input processor up to 2x faster.

Before:
```
              { "id":"PipExecutorCounter.ObservedInputProcessorPass2ProcessObservationInfos"               , "duration":"  109,100", "occurrences":"    28", "displayAvgDuration":"00:00:03.8964474", "c":[
                { "id":"PipExecutorCounter.ObservedInputProcessorTryQueryDirectoryFingerprint"             , "duration":"    1,389", "occurrences":" 6,655", "displayAvgDuration":"00:00:00.0002087"},
                { "id":"PipExecutorCounter.ObservedInputProcessorTryProbeForExistence"                     , "duration":"    1,295", "occurrences":"59,528", "displayAvgDuration":"00:00:00.0000217"},
                { "id":"PipExecutorCounter.ObservedInputProcessorTryQuerySealedInputContent"               , "duration":"       15", "occurrences":"93,943", "displayAvgDuration":"00:00:00.0000001"},
```

After:
```
              { "id":"PipExecutorCounter.ObservedInputProcessorPass2ProcessObservationInfos"               , "duration":"   48,636", "occurrences":"    28", "displayAvgDuration":"00:00:01.7370205", "c":[
                { "id":"PipExecutorCounter.ObservedInputProcessorOnAllowingUndeclaredAccessCheck"          , "duration":"   47,155", "occurrences":"88,410", "displayAvgDuration":"00:00:00.0005333"},
                { "id":"PipExecutorCounter.ObservedInputProcessorTryProbeForExistence"                     , "duration":"    1,272", "occurrences":"59,530", "displayAvgDuration":"00:00:00.0000213"},
                { "id":"PipExecutorCounter.ObservedInputProcessorTryQuerySealedInputContent"               , "duration":"       16", "occurrences":"93,945", "displayAvgDuration":"00:00:00.0000001"}]},

```
2023-03-17 18:40:13 +00:00
Marcelo Lynch 🧉 4bb69a650d Merged PR 707842: Propagate __BUILDXL_PTRACE_MQ_NAME through the process tree
The process might clear the environment so we need to propagate this on exec. Also, let's check this variable every time, even if the FAM flag is not set, to fail fast if this is unexpectedly absent: we set the variable even when the PTrace mode is not enabled, so this should always be there

Related work items: #2041253
2023-03-17 18:39:22 +00:00
CloudDev Build Account 33aeb194a7 New LKG 0.1.0-20230313.0
[skip ci]
2023-03-17 05:47:33 +00:00
CloudDev Build Account abefcbb011 New LKG 0.1.0-20230315.2
[skip ci]
2023-03-17 05:30:01 +00:00
CloudDev Build Account e9fbff0984 New LKG 0.1.0-20230313.4
[skip ci]
2023-03-17 05:11:02 +00:00
CloudDev Build Account fccf320bd5 New LKG 0.1.0-20230314.2
[skip ci]
2023-03-17 04:52:36 +00:00
CloudDev Build Account a3056f52e0 New LKG 0.1.0-20230315.1
[skip ci]
2023-03-17 01:20:04 +00:00
Marcelo Lynch 🧉 dcb1b49695 Merged PR 707682: Spanify parsing of the Linux sandbox reports
This code is hit millions of times per build, and we can easily avoid the object creations caused by `string.Split`.

Here's a benchmark processing 100,000 such strings:

![image (3).png](https://dev.azure.com/mseng/9ed2c125-1cd5-4a17-886b-9d267f3a5fab/_apis/git/repositories/50d331c7-ea65-45eb-833f-0303c6c2387e/pullRequests/707682/attachments/image%20%283%29.png)

The code is 30% faster and allocations are cut by 70%.
2023-03-17 00:33:46 +00:00
Will Li 5fcd30eaf4 Merged PR 707153: Pulling SandboxProcessPipExecutor out of Processes
SandboxProcessPipExecutor is BuildXL specific. Pulling this out of Processes as step 1 to making Sandboxing code Generic and not specific to BXL.
2023-03-16 23:19:57 +00:00
Serge Mera 2a6c3405b6 Merged PR 707610: Track the time it takes to push outputs to the cache as part of perf info
Measure the time it takes to push outputs to the cache for each pip and record it in the perf info object used by the scheduler. Add this counter as a sub-step of execute process in the main log perf summary
2023-03-16 19:23:58 +00:00
Marcelo Lynch 🧉 1e75793d6f Merged PR 707432: [Linux sandbox] Process pending reports from the FIFO even after the pip process tree has exited
The FIFO might still hold some unread reports when the process tree has finished, so it's incorrect to stop processing the reports as soon as we find out that all the processes for the pip have exited. Doing this causes reports to be dropped, messing with the observations for the pip.

What we do know at the point where we call `RequestStop` is that there will be no more reports pushed to the FIFO (because all the processes have exited, there are no more possible writes), so we can send a special value through it to signal the FIFO-consuming thread that it can finish. This is preferred against just disposing our keep-alive write handle to produce an EOF in the consumer (which was our original strategy), because the `Dispose` on that handle produces the EOF with a considerable delay.

Related work items: #2021040
2023-03-16 02:23:00 +00:00
Semih Okur de575243b0 Merged PR 707371: Updated Release-Notes.md 2023-03-15 20:09:44 +00:00
Qi Wang 0b6e378d80 Merged PR 702696: Capture observed inputs for failed & retried pips in the XLG
Capture observed inputs for failed & retried pips in the XLG.
Lert ObservedInputProcessor return observed inputs for failed pips and dfa pips
Add two new kinds of FingerprintComputation to make runtime analyzer ignore failed pips' fingerprint information but do computation for dfa pips
2023-03-15 17:06:27 +00:00
Oleksii Kononenko bbd51395ef Merged PR 706729: Fix a crash caused by a race during build cancellation
When we are approaching a CB timeout, we trigger a cancellation token. As a result, we cancel all running pips as well as cancel the post processing of all finished pips (even if they were successful). This pr fixes the assert, so we don't crash during build termination.

Related work items: #2028490
2023-03-14 23:23:44 +00:00
Serge Mera cf5e149dba Merged PR 707155: Interposing rename should generate write accesses for destination
The implementaion of rename (and renameat) in the Linux sandbox was generating accesses for the destination files without the write flag, and therefore they were interpreted as reads
2023-03-14 23:01:17 +00:00
Pasindu Gunasekara 🍣 c41055f5e5 Merged PR 705641: Run ptrace sandbox as a daemon
- This change allows ptrace to run outside of the process tree of the pip, reducing any interference we have in the process execution. The previous iteration of the sandbox had issues with inheriting handles from the parent process that it was forked from causing pips to hang.
- Adds the ptracedaemon service that runs in the background to listen to ptrace requests from processes running under the interpose sandbox.
- When a request is received, the ptracerunner is executed in a separate process to attach to the tracee using PTRACE_ATTACH.

Related work items: #2037038
2023-03-14 22:32:25 +00:00
Sahiti Chandramouli 1e15f47714 Merged PR 707064: Adding error handling to CreateFileStream() GraphAgnosticIncrementalSchedulingState.cs in to avoid crashing on failure during incremental scheduling.
Adding error handling to CreateFileStream method to avoid crashing on failure during incremental scheduling.
We do not want the build to crash or exit after the exception has occurred as the build proceeds further without any issues even if there is any error, hence a warning is logged here instead of an error.
If we track this call one of the inner methods CreateFileStream in FileSystem.Win.cs throws a BuildXLException
https://dev.azure.com/mseng/Domino/_git/BuildXL.Internal?path=/Public/Src/Utilities/Native/IO/Windows/FileSystem.Win.cs&version=GBmain&line=1985&lineEnd=1986&lineStartColumn=1&lineEndColumn=1&lineStyle=plain&_a=contents
hence I added a catch block to handle that exception but if we want to make it exclusive to IOException I can modify this.

Related work items: #2012530
2023-03-14 22:29:24 +00:00
Michael Pysson e95967d89c Merged PR 706387: Refine the Other portion of build overhead for processing outputs
The breakdown of process overhead is just displaying the PipStep. But the ExecuteProcess PipStep can have quite a bit more work than just having the child process active. Grab a couple counters from constituent parts of this overhead and include them in the appropriate part of the breakdown instead of under "other"
2023-03-14 16:01:36 +00:00
Sergey Tepliakov cc72fc98a1 Merged PR 706884: Increase target buffer for merged locations and add error handling to it
AnyBuild started failing with the following error after updating to the latest bxl bits:

```
2023-03-11 05:48:57,219 [18] ERROR root: An exception is unhandled. Process will exit.
BuildXL.Utilities.Serialization.InsufficientLengthException: The buffer should have at least 2 length but has 0.
   at BuildXL.Utilities.Serialization.InsufficientLengthException.Throw(Int32 minLength, Int32 remainingLength) in \.\Public\Src\Utilities\Utilities\Serialization\Insuffic>   at BuildXL.Utilities.Serialization.SpanWriter.DoEnsureLength(Int32 minLength) in \.\Public\Src\Utilities\Utilities\Serialization\SpanWriter.cs:line 187
   at BuildXL.Utilities.Serialization.SpanWriter.EnsureLength(Int32 minLength) in \.\Public\Src\Utilities\Utilities\Serialization\SpanWriter.cs:line 159
   at BuildXL.Utilities.Serialization.SpanSerializationExtensions.Write[T](SpanWriter& writer, T value) in \.\Public\Src\Utilities\Utilities\Serialization\SpanSerializatio>   at BuildXL.Cache.ContentStore.Distributed.MetadataService.RocksDbOperations.WriteMergeLocations(SpanWriter& mergeWriter, SpanReader& reader1, SpanReader& reader2, Boole>   at BuildXL.Cache.ContentStore.Distributed.MetadataService.RocksDbOperations.WriteMergeLocations(SpanWriter& mergeWriter, ReadOnlySpan`1 value1, ReadOnlySpan`1 value2, B>   at BuildXL.Cache.ContentStore.Distributed.MetadataService.RocksDbOperations.MergeLocations(ReadOnlySpan`1 key, ReadOnlySpan`1 value1, ReadOnlySpan`1 value2, MergeResult>   at BuildXL.Cache.ContentStore.Distributed.MetadataService.RocksDbOperations.ProcessSingleLocationEntry(ReadOnlySpan`1 key, ReadOnlySpan`1 value, MergeResult result) in >   at RocksDbSharp.MergeOperators.<>c__DisplayClass4_0.<CreateAssociative>g__mergeCore|1(ReadOnlySpan`1 key, MergeOperandsEnumerator operands, MergeValueBuffers buffers, R>   at RocksDbSharp.MergeOperators.<>c__DisplayClass4_0.<CreateAssociative>b__3(ReadOnlySpan`1 key, NullableReadOnlySpan`1 value, MergeOperandsEnumerator operands, MergeVal>   at RocksDbSharp.MergeOperators.MergeOperatorImpl.RocksDbSharp.MergeOperator.FullMerge(IntPtr key, UIntPtr keyLength, IntPtr existingValue, UIntPtr existingValueLength, >   at RocksDbSharp.ColumnFamilyOptions.MergeOperator_FullMerge(IntPtr state, IntPtr key, UIntPtr keyLength, IntPtr existingValue, UIntPtr existingValueLength, IntPtr opera>
```

To mitigate this issue this PR makes the following changes:
* Increases the target buffer for merged location entry
* Adds an error handling to trace the error and not crash the app.
2023-03-13 22:28:36 +00:00
Michael Pysson 8ed373961f Merged PR 704009: Allow version numbers to be externally declared for yaml public rolling
Allowing the version number to be externally configured will allow us to call this pipeline from our rolling build which is not yet yaml
2023-03-13 21:05:04 +00:00
Michael Pysson e3505a1b80 Merged PR 706419: Remove Other field from Telemetry Tags since pips can have multiple tags
This addresses nonsensical performance summaries like the one below having a negative "Other" time.

```
[0:21.038] verbose DX0408: Performance Summary:
Time breakdown:
    Application Initialization:            1% (0.274sec)
    Graph Construction:                    1% (0.394sec)
        Checking for pip graph reuse:          27% (0.107sec)
        Reloading pip graph:                   72% (0.287sec)
        Create graph:                          0% (0sec)
        Other:                                 1%
    Scrubbing:                             0% (0.055sec)
    Scheduler Initialization:              20% (4.268sec)
    Execute Phase:                         69% (14.515sec)
        Executing processes                    81%
            dscToBinaryGraph                       99%
            fragmentFromProjectsToBuildDsc         54%
            fragmentFromMetaBuildDsc               15%
            EnlistBuildSyncSucceedFast             0%
            SyncSucceedFast                        0%
            generateNugetInstallDsc                0%
            metagraphCreator                       0%
            createSymlinkDsc                       0%
            environmentGenerator                   0%
            Other:                                 -68%
```
2023-03-13 20:32:30 +00:00
Semih Okur 067f70b29e Merged PR 706083: Revert 'Disable some tests for linux as those fail with root access'
Disable some tests for linux as those fail with root access

Reverts !705946
2023-03-13 20:28:20 +00:00
Sergey Tepliakov 6657eafd06 Merged PR 706694: Fix SetsRequiredMembersAttribute and allow not using polySharpAttributes
Fix SetsRequiredMembersAttribute and allow not using polySharpAttributes
2023-03-13 19:32:11 +00:00
Michael Pysson 7523fb720a Merged PR 706676: Handle pips that are too large to serialize to fingerprint store
The root cause of this crash was a pip with 8 million dependencies. That was unintended in spec generation and has been addressed, but I figured it was still good to have some form of handling in case that pops up again.

Originally I wanted to handle this in a more elegant way where we would keep fingerprint text that was truncated after a certain point. But that would not be valid json. Truncating cleanly while still allowing the JSON to be valid is more effort than it's worth so just going with logging a warning and moving on.

Related work items: #2036600
2023-03-13 17:50:13 +00:00
CloudDev Build Account 5d188e2eb4 New LKG 0.1.0-20230310.5
[skip ci]
2023-03-11 21:09:15 +00:00
CloudDev Build Account dcf9e75e9c New LKG 0.1.0-20230310.0
[skip ci]
2023-03-11 20:51:27 +00:00