Git Product home page Git Product logo

schedviz's Introduction

Linux Scheduling Visualization

Build and Test SchedViz

This is not an officially supported Google product.

SchedViz is a tool for gathering and visualizing kernel scheduling traces on Linux machines. It helps to:

  • quantify task starvation due to round-robin queueing,
  • identify primary antagonists stealing work from critical threads,
  • determine when core allocation choices yield unnecessary waiting,
  • evaluate different scheduling policies,
  • and much more.

To learn more about what SchedViz can do and what problems it can solve, read our announcement post on the Google open source blog.

Running SchedViz

To get started clone this repo:

git clone https://github.com/google/schedviz.git

SchedViz requires yarn. Closely follow the installation instructions on the yarn Website. Make sure you have a recent version of Node.js (>= 10.9.0) installed as well.

Building SchedViz also requires the GNU build tools and the unzip utility. On Debian, for example, the dependencies can be installed by executing this command:

sudo apt-get update && sudo apt-get install build-essential unzip

To run SchedViz, run the following commands:

cd schedviz # The location where the repo was cloned
yarn install

Once yarn has finished run the following command in the root of the repo to start the server:

yarn bazel run server -- -- -storage_path="Path to a folder to store traces in"

The server binary takes several options:

Name Type Description
storage_path String Required.
The folder where trace data is/will be stored.
This should be an empty folder that is not used by anything else.
cache_size Int Optional.
The maximum number of collections to keep open in memory at once.
port Int Optional.
The port to run the server on.
Defaults to 7402.
resources_root String Optional.
The folder where the static files (e.g. HTML and JavaScript) are stored.
Default is "client".
If using bazel to run the server, you shouldn't need to change this.

To load SchedViz, go to http://localhost:7402/collections

Manually collecting a scheduling trace

  1. Run the trace.sh as root on the machine that you want to collect a trace from:

    sudo ./trace.sh -out 'Path to directory to save trace in' \
                    -capture_seconds 'Number of seconds to record a trace' \
                    [-buffer_size 'Size of the trace buffer in KB'] \
                    [-copy_timeout 'Time to wait for copying to finish']

    Default number of seconds to wait for copy to finish is 5. The copying of the raw traces from Ftrace to the output file won't finish automatically as the raw trace pipes aren't closed. This setting is a timeout for when the copying should stop. It should be at least as long as it takes to copy out all the trace files. If you see incomplete traces, try increasing the timeout.

    Default buffer size is 4096 KB.

    The shell script collects the sched_switch, sched_wakeup, sched_wakeup_new, and sched_migrate_task tracepoints.

    NOTE: There is also a binary version of the trace collector script, which can collect traces larger than the size of the buffer.

    To build it, run bazel build util:trace from the root of the repo.

    To run it, run sudo bazel-bin/util/trace. It takes the same arguments as the shell script, except -copy_timeout.

  2. Copy the generated tar.gz file off of the trace machine to a machine that can access the SchedViz UI.

  3. Upload the output tar.gz file to SchedViz by clicking the "Upload Trace" button on the SchedViz collections page. The tar.gz file will be located at $OUTPUT_PATH/trace.tar.gz.

Collecting a scheduling trace on a GCE machine

Using gcloud you can easily collect a trace on a remote GCE machine. We've written a helper script to collect a trace on a GCE machine with a single command. This script is a wrapper around the manual trace script.

Usage: bash ./gcloud_trace.sh -instance 'GCE Instance Name' \ -trace_args 'Arguments to forward to trace script' \ [-project 'GCP Project Name'] \ [-zone 'GCP Project Zone'] \ [-script 'Path to trace script']

Analyzing a trace

Take a look at our features and usage walkthrough.

Keyboard Shortcuts

Key Description
? (Shift + /) Show a shortcut cheatsheet dialog
Shift + c Copy the current tooltip text to the clipboard
Shift + a Reset zoom level in heatmap viewport
Shift + x Clear the CPU filter

Common sources of errors

Errors collecting traces

  • When the trace takes longer to copy than the timeout passed to the trace collection script (default timeout is five seconds), traces will not be fully copied into the output file. To fix this, increase the copy timeout parameter to a larger and sufficient value.

  • If a CPU's trace buffer fills up before the timeout is reached, recording will be stopped for that CPU. Other CPUs may keep recording until their buffers fill up, but only the events occurring up to the last event in the first buffer to fill up will be used.

Errors loading traces

SchedViz infers CPU and thread state information that isn't directly attested in the trace, and fails aggressively when this inference does not succeed. In particular, two factors may increase the likelihood of inference failures: * PID reuse. Machines with small PID address spaces, or long traces, may experience PID reuse, where two separate threads are assigned the same PID. This can lead to inference failures, for example, threads last seen on one CPU could appear on another without an intervening migration. * Event ordering. Scheduling trace interpretation relies on an accurate total ordering between the scheduling events; event timestamps are generated by their emitting CPU's rdtsc. If the cores of a machine do not have their rdtscs tightly aligned, events may appear to slip, which can lead to inference errors as above.

Events can also have incorrect timestamps written if the kernel is interrupted while it is recording an event, and the interrupt tries to write another event. This will result in many events appearing having the same timestamp when they shouldn't. This type of error occurs when recording high-frequency events such as the workqueue family, and it very rarely occurs when recording only scheduling events.

schedviz's People

Contributors

brad4d avatar dependabot[bot] avatar franksiegemund avatar hsudhof avatar ilhamster avatar krusek avatar michaelgriscom avatar mirrorkeydev avatar mprobst avatar nreid260 avatar sabarabc avatar sainsley avatar schedviz-eng avatar ssantino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

schedviz's Issues

some extension poc about irq

Schedviz is very useful, but it is only limited to 4 sched trace_point. Recently I wanted to observe the triggering status of reschedule irq , and find them in the trace event. I tried processing in the back-end logic of schedViz, converting the format of reschedule_entry and reschedule_exit to sched_switch and visualizing it. Fortunately, it succeeded. Through some settings, comm and illegal pid, we can distinguish these events that we have joined. What do you think of this approach?

[installation] error Found incompatible module.

Try schedviz step by stey, but got an error:

$ yarn install
yarn install v1.19.1
[1/4] Resolving packages...
[2/4] Fetching packages...
error @angular-devkit/[email protected]: The engine "node" is incompatible with this module. Expected version ">= 10.9.0". Got "8.16.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
$

I don't know if anyone has a similar problem. Any suggestions? Thanks!

Some extra info:

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
$
$ sudo apt-get install build-essential unzip
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
unzip is already the newest version (6.0-21ubuntu1).
The following packages were automatically installed and are no longer required:
  libc-ares2 libhttp-parser2.7.1 libuv1 nodejs-doc python3-netifaces
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 126 not upgraded.
$
$ yarn --version
1.19.1
$

server wont run because zlib 1.2.11 isn't found

Looks like this package was recently-ish updated: https://zlib.net/ and the link being used isn't a perma-link'd on the zlib site

Other projects have addressed it like this:
ApolloAuto/apollo#14387
ApolloAuto/apollo#14374

zlib 1.2.12

March 27, 2022

Version 1.2.12 has these key improvements over 1.2.11:

Fix a deflate bug when using the Z_FIXED strategy that can result in out-of-bound accesses.
Fix a deflate bug when the window is full in deflate_stored().
Speed up CRC-32 computations by a factor of 1.5 to 3.
Use the hardware CRC-32 instruction on ARMv8 processors.
Speed up crc32_combine() with powers of x tables.
Add crc32_combine_gen() and crc32_combine_op() for fast combines.

actual output

yarn run v1.22.15
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ /home/jkohler/optane/git/schedviz/node_modules/.bin/bazel run server -- -storage_path=/home/jkohler/optane/git/schedviz/traces
INFO: Writing tracer profile to '/home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/command.profile.gz'
WARNING: Download from https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/12a2d801f69ca8fff9128a8044549d7cbac306f1.zip failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
INFO: Call stack for the definition of repository 'net_zlib' which is a http_archive (rule definition at /home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/external/bazel_tools/tools/build_defs/repo/http.bzl:262:16):
 - /home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/external/io_bazel_rules_go/go/private/repositories.bzl:95:9
 - /home/jkohler/optane/git/schedviz/WORKSPACE:99:1
WARNING: Download from https://zlib.net/zlib-1.2.11.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
ERROR: An error occurred during the fetch of repository 'net_zlib':
   java.io.IOException: Error downloading [https://zlib.net/zlib-1.2.11.tar.gz] to /home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/external/net_zlib/zlib-1.2.11.tar.gz: GET returned 404 Not Found
ERROR: /home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/external/io_bazel_rules_go/go/private/repositories.bzl:91:9: //external:zlib depends on @net_zlib//:zlib in repository @net_zlib which failed to fetch. no such package '@net_zlib//': java.io.IOException: Error downloading [https://zlib.net/zlib-1.2.11.tar.gz] to /home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/external/net_zlib/zlib-1.2.11.tar.gz: GET returned 404 Not Found
ERROR: Analysis of target '//server:server' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.459s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 2 targets configured)
FAILED: Build did NOT complete successfully (1 packages loaded, 2 targets configured)
    Fetching @go_googleapis; Cloning 41d72d444fbe445f4da89e13be02078734fb7875 of https://github.com/googleapis/googleapis
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Failed to upload trace file trace.tar.gz - Internal Server Error

Hi,

I'm getting 'Failed to upload trace file trace.tar.gz Reason: Internal Server Error' while trying to upload a tarball created with this command:

$ sudo ./trace.sh -capture_seconds 10 --out ftrace

What am I missing?

Ubuntu 18.04
yarn 1.19.1
node 10.16.3

Make gcloud_trace.sh script work on Google COS

I tried to run the gcloud_trace.sh against a COS instance.

It failed as follows:

$ ./gcloud_trace.sh -instance myinstance -ta "-cs 1"
Uploading trace script to myinstance
trace.sh                                                                                                                                                                   100% 4536     6.3MB/s   00:00    
Collecting trace on myinstance
sudo: unable to execute /tmp/trace.sh: Permission denied
Downloading recorded trace from myinstance
scp: /tmp/trace/trace.tar.gz: No such file or directory
ERROR: (gcloud.compute.scp) [/usr/bin/scp] exited with return code [1].

because /tmp is mounted as noexec by design:

$ mount | grep /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec)

Possible fixes:
a) allow to configure the remote directory for trace.sh via argument of gcloud_trace.sh
b) detect COS nodes and automatically choose a dir without noexec
c) detect COS nodes and run the trace.sh inside a toolbox.

yarn install is failing

Following the setup instructions, I cloned the repo and cd'ed into the directory:

$ git clone https://github.com/google/schedviz.git
$ cd schedviz
$ yarn install
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'

ubuntu 20.04: undocumented bazel requires libtinfo5

Hit the following with ubuntu 20.04. README should specify this is required, similar to #44

doing sudo apt install libtinfo5 gets past the error

jon@jk-dev-ubuntu:~/git/schedviz$ sudo yarn bazel run server -- -- -storage_path="/home/jon/git/schedviz/traces"
yarn run v1.22.15
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ /home/jon/git/schedviz/node_modules/.bin/bazel run server -- -storage_path=/home/jon/git/schedviz/traces
INFO: Writing tracer profile to '/root/.cache/bazel/_bazel_root/5ea69f222941b39d1537fc221d7063a2/command.profile.gz'
WARNING: Download from https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/12a2d801f69ca8fff9128a8044549d7cbac306f1.zip failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
INFO: Analyzed target //server:server (6 packages loaded, 145 targets configured).
INFO: Found 1 target...
ERROR: /root/.cache/bazel/_bazel_root/5ea69f222941b39d1537fc221d7063a2/external/com_google_protobuf/BUILD:388:1: C++ compilation of rule '@com_google_protobuf//:protoc' failed (Exit 127) clang failed: error executing command external/llvm_toolchain/bin/clang -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 39 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
external/llvm_toolchain/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
Target //server:server failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 31.316s, Critical Path: 1.82s
INFO: 8 processes: 4 linux-sandbox, 4 worker.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
jon@jk-dev-ubuntu:~/git/schedviz$ 

Failed to upload trace file trace.tar.gz

Alright, finally got the server running on ubuntu 20.04, ran a trace, and now get the following while trying to upload it via the UI.

Happy to share this trace via google drive to whomever would like to look? cc @sabarabc

Failed to upload trace file trace.tar.gz
Message:
 Http failure response for http://10.50.69.252:7402/upload: 500 Internal Server Error
Reason:
 Internal Server Error:
Failed to upload trace file: open /home/jon/git/schedviz/traces/53363615-8e4a-4387-93e6-2ae881cfba0b_16f215f736fdc3c2_local_user.binproto: no such file or directory

Request:
POST /upload HTTP/1.1
Host: 10.50.69.252:7402
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: keep-alive
Content-Length: 25881625
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryRNOGkEFVSwyBAu4u
Origin: http://10.50.69.252:7402
Referer: http://10.50.69.252:7402/collections
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36

Upload trace fails because traces are misordered

I've been getting 'inference error (CPU)' trying to load some traces.
Having written a program to read and dump (and adjust) the raw trace data I think I know what is happening.

A process (pid 3857) in the trace (I'll try to attach) has run a few times on cpu2.
At (raw) time 39866b80c873 it is migrated to cpu1 (stolen by) and runs.
At 39866c19166e cpu1 migrates it back to cpu2 and then enables it.
At 39866c1a093f it executes on cpu2.
These are the only 'migrates' for pid 3857 in the trace, so must be relevant.

The file upload fails because the process state is 'unknown' on cpu2 @179948522 having gone 'sleeping' on cp1 @179792871.

Digging through the *.go files I think I understand the problem.
The large absolute timestamps are converted to small values in setTimestampNormalize().
This code subracts off the timestamp of the first real trace entry from all the others.
However it is only (AFAICT) looking at the data from a single cpu.
So it subtracts different amounts off the timestamps from the different files.
This slight difference doesn't usually make much difference, but when a migrate is done by the cpu the process last ran on immediiadtely prior to being woken; the process schedule trace can end up with a timestamp earlier than the migrate.

Note that the trace files contain a lot of 'pad' entries where they've been 'adjusted' so that they all start at the same time and only contain valid trace.
(Oh can you also fix ringBufferEvent() so it doesn't reject 'Padding' with time interval zero - these happen if a pad is added after a 'time extend' entry.)

trace.tar.gz

Unknown LLVM release: clang+llvm-9.0.0-x86_64-apple-darwin.tar.xz

Background

  • OS: Darwin Kernel Version 19.0.0
  • command: yarn bazel run server -- -- -storage_path=traces
  • error:
An error occurred during the fetch of repository 'llvm_toolchain
Unknown LLVM release: clang+llvm-9.0.0-x86_64-apple-darwin.tar.xz
Please ensure file name is correct.

404 during bazel download operation

Running the yarn command to start the server gives me the following:

yarn bazel run server -- -- -storage_path=~/traces

yarn run v1.22.19 warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts. $ /home/bas/git/schedviz/node_modules/.bin/bazel run server -- '-storage_path=~/traces' Extracting Bazel installation... Starting local Bazel server and connecting to it... INFO: Writing tracer profile to '/home/bas/.cache/bazel/_bazel_bas/cd302194fecff1bc1697c9f7dd52a681/command.profile.gz' WARNING: Download from https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/12a2d801f69ca8fff9128a8044549d7cbac306f1.zip failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found ERROR: /home/bas/git/schedviz/client/app/sidebar/BUILD.bazel:8:1: //client/app/sidebar:sidebar: no such attribute 'strict_templates' in 'ng_module' rule ERROR: /home/bas/git/schedviz/client/app/sidebar/settings_menu/BUILD.bazel:8:1: //client/app/sidebar/settings_menu:settings_menu: no such attribute 'strict_templates' in 'ng_module' rule ERROR: /home/bas/git/schedviz/client/app/sidebar/thread_table/BUILD.bazel:8:1: //client/app/sidebar/thread_table:thread_table: no such attribute 'strict_templates' in 'ng_module' rule ERROR: /home/bas/git/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar/settings_menu:settings_menu' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar' ERROR: /home/bas/git/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar/thread_table:thread_table' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar' ERROR: /home/bas/git/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar.ts' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar' ERROR: /home/bas/git/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar_module.ts' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar' ERROR: /home/bas/git/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar.ng.html' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar' ERROR: /home/bas/git/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar.css' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar' ERROR: /home/bas/git/schedviz/client/app/dashboard/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar' contains an error and its package is in error and referenced by '//client/app/dashboard:dashboard' ERROR: Analysis of target '//server:server' failed; build aborted: Analysis failed INFO: Elapsed time: 138.574s INFO: 0 processes. FAILED: Build did NOT complete successfully (79 packages loaded, 7088 targets configured) FAILED: Build did NOT complete successfully (79 packages loaded, 7088 targets configured) Fetching @org_golang_google_grpc; Cloning 2fdaae294f38ed9a121193c51ec99fecd3b13eb7 of https://github.com/grpc/grpc-go Fetching @com_github_workiva_go-datastructures; fetching Fetching @com_google_protobuf; Cloning 582743bf40c5d3639a70f98f183914a2c0cd0680 of https://github.com/protocolbuffers/protobuf Fetching @org_golang_x_tools; Cloning 589c23e65e65055d47b9ad4a99723bc389136265 of https://go.googlesource.com/tools Fetching @build_bazel_rules_nodejs_rollup_deps; Running yarn install on @build_bazel_rules_nodejs//internal/rollup:package.json error Command failed with exit code 1.

The 404 is actually correct, since the reference to https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/12a2d801f69ca8fff9128a8044549d7cbac306f1.zip is obsolete and just gives a return of:<Error> <Code>NoSuchKey</Code> <Message>The specified key does not exist.</Message> </Error>

recommended Linux distribution and docker

Hi,
I was trying to run schedviz on a plain vanilla centos7 kernel but am having compile errors (like GLIBC_xxx not being found).
Has anybody managed to run schedviz natively on centos7?

Alternatively, has anybody been able to use docker and could provide the Dockerfile?

Thanks in advance,
Alain

Failed to upload trace file - field pid not found

On tracing a 5.17 kernel, I get the following error. I'm assuming kernel has changed some formatting that SchedViz cares about somewhere along the way?

Happy to share a sample trace over google drive to whomever would like to take a look cc @sabarabc

Failed to upload trace file trace.tar.gz
Message:
 Http failure response for http://10.50.69.252:7402/upload: 500 Internal Server Error
Reason:
 Internal Server Error:
Failed to upload trace file: rpc error: code = NotFound desc = field 'pid' not found for event 0

Request:
POST /upload HTTP/1.1
Host: 10.50.69.252:7402
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: keep-alive
Content-Length: 902299
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryY3g4UA4Pa40A1T3z
Origin: http://10.50.69.252:7402
Referer: http://10.50.69.252:7402/collections
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36

rocky linux: libz3.so.4.8: cannot open shared object file

I haven't been able to find a distro binary for rocky or rhel8 for libz3, this appears like a hard blocker :(

Can't run server without this

[root@localhost schedviz]# yarn bazel run server -- -- -storage_path="/root/git/traces"
yarn run v1.22.18
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ /root/git/schedviz/node_modules/.bin/bazel run server -- -storage_path=/root/git/traces
INFO: Writing tracer profile to '/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/command.profile.gz'
INFO: Analyzed target //server:server (2 packages loaded, 14 targets configured).
INFO: Found 1 target...
ERROR: /root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/com_google_protobuf/BUILD:388:1: C++ compilation of rule '@com_google_protobuf//:protoc' failed (Exit 127) clang failed: error executing command external/llvm_toolchain/bin/clang -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 39 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
external/llvm_toolchain/bin/clang: error while loading shared libraries: libz3.so.4.8: cannot open shared object file: No such file or directory
Target //server:server failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 25.514s, Critical Path: 1.53s
INFO: 18 processes: 18 linux-sandbox.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Trace upload fails with 'inference error (CPU)'

If I set the -buffer_size far too small for the -capture seconds timeout then the trace upload fails because the call to resolveConflict() in checkCPUs() (in sched_thread_inferrer.go) returns 'Fail'.

My suspicion is the problem happens because the trace files for the different cpus start at different times.

The reason I'm doing this is because I want to leave the trace running and stop it when the application sees an unexpected scheduling delay. This might take hours, but I only want the last 20ms of trace.

Dependency undocumented: patch

With Rocky 8.6, "patch" is not installed by default. Not sure if we could detect this sooner in the bazel process or what, but without patch installed, you'll get this error.

Filing an issue to have it documented somewhere

[root@localhost schedviz]# yarn bazel run server -- -- -storage_path="/root/git/traces"
yarn run v1.22.18
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ /root/git/schedviz/node_modules/.bin/bazel run server -- -storage_path=/root/git/traces
INFO: Writing tracer profile to '/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/command.profile.gz'
INFO: Call stack for the definition of repository 'go_googleapis' which is a git_repository (rule definition at /root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18):
 - /root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/io_bazel_rules_go/go/private/repositories.bzl:237:9
 - /root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/io_bazel_rules_go/go/private/repositories.bzl:188:5
 - /root/git/schedviz/WORKSPACE:100:1
ERROR: An error occurred during the fetch of repository 'go_googleapis':
   Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/git.bzl", line 178
                patch(ctx)
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 116, in patch
                fail(("Error applying patch %s:\n%s%s...)))
Error applying patch @io_bazel_rules_go//third_party:go_googleapis-deletebuild.patch:
bash: patch: command not found
ERROR: /root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/org_golang_google_grpc/status/BUILD.bazel:3:1: @org_golang_google_grpc//status:go_default_library depends on @go_googleapis//google/rpc:status_go_proto in repository @go_googleapis which failed to fetch. no such package '@go_googleapis//google/rpc': Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/git.bzl", line 178
                patch(ctx)
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 116, in patch
                fail(("Error applying patch %s:\n%s%s...)))
Error applying patch @io_bazel_rules_go//third_party:go_googleapis-deletebuild.patch:
bash: patch: command not found
ERROR: Analysis of target '//server:server' failed; build aborted: no such package '@go_googleapis//google/rpc': Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/git.bzl", line 178
                patch(ctx)
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 116, in patch
                fail(("Error applying patch %s:\n%s%s...)))
Error applying patch @io_bazel_rules_go//third_party:go_googleapis-deletebuild.patch:
bash: patch: command not found
INFO: Elapsed time: 24.080s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 2 targets configured)
FAILED: Build did NOT complete successfully (1 packages loaded, 2 targets configured)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[root@localhost schedviz]# 

run server fails

Hi

Doing the "yarn bazel run server -- -- -storage_path=." on current master HEAD yields:

INFO: Writing tracer profile to '/home/simonmm/.cache/bazel/_bazel_simonmm/952ff058d280e02422a08c25be80412e/command.profile.gz'
ERROR: /home/simonmm/Documents/tmp/schedviz/client/app/sidebar/BUILD.bazel:8:1: //client/app/sidebar:sidebar: no such attribute 'strict_templates' in 'ng_module' rule
ERROR: /home/simonmm/Documents/tmp/schedviz/client/app/sidebar/settings_menu/BUILD.bazel:8:1: //client/app/sidebar/settings_menu:settings_menu: no such attribute 'strict_templates' in 'ng_module' rule
ERROR: /home/simonmm/Documents/tmp/schedviz/client/app/sidebar/thread_table/BUILD.bazel:8:1: //client/app/sidebar/thread_table:thread_table: no such attribute 'strict_templates' in 'ng_module' rule
ERROR: /home/simonmm/Documents/tmp/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar/settings_menu:settings_menu' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /home/simonmm/Documents/tmp/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar/thread_table:thread_table' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /home/simonmm/Documents/tmp/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar.ts' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /home/simonmm/Documents/tmp/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar_module.ts' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /home/simonmm/Documents/tmp/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar.ng.html' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /home/simonmm/Documents/tmp/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar.css' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /home/simonmm/Documents/tmp/schedviz/client/app/dashboard/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar' contains an error and its package is in error and referenced by '//client/app/dashboard:dashboard'
ERROR: Analysis of target '//server:server' failed; build aborted: Analysis failed

I've rolled back to commit a932419 which works.

Regards

ubuntu 20.04: deps install needs to declare cmdtest

Switched over from Rocky to ubuntu 20.04

The README mentions the following for installing deps: sudo apt-get update && sudo apt-get install build-essential unzip

Followed by a yarn install; however, yarn is not installed in the apt-get above, as that requires cmdtest.

While we're on the topic of yarn install, that should also be prefixed by sudo, else you'll get:

jon@jk-dev-ubuntu:~/git/schedviz$ yarn install

Command 'yarn' not found, but can be installed with:

sudo apt install cmdtest

TLDR
README should read: sudo apt-get install build-esstentials unzip cmdtest and sudo yarn install

Support of analysing trace result generated by AArch64

Does SchedViz currently doesn't support analysing trace result from AArch64?

I was doing manual collection (through the trace.sh) on Rpi4, the trace starts and ends without any error/warning.

However, SchedViz shows this: (Using stress for generating dummy tasks)
image

the heatmap pane of this trace shows nothing.

Thanks!

Failed to run `yarn bazel run server -- -- -storage_path="/tmp`

Hi

I'm trying to run the server. However, I'm facing the following error,

alireza@neat:~/schedviz$ yarn bazel run server -- -- -storage_path=/tmp/traces_sched
yarn run v1.22.15
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ /home/alireza/schedviz/node_modules/.bin/bazel run server -- -storage_path=/tmp/traces_sched
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Writing tracer profile to '/home/alireza/.cache/bazel/_bazel_alireza/3623e6f5b3c7c23c7952e987fbc7cddc/command.profile.gz'
INFO: Call stack for the definition of repository 'llvm_toolchain' which is a llvm_toolchain (rule definition at /home/alireza/.cache/bazel/_bazel_alireza/3623e6f5b3c7c23c7952e987fbc7cddc/external/com_grail_bazel_toolchain/toolchain/rules.bzl:24:18):
 - /home/alireza/schedviz/WORKSPACE:66:1
WARNING: Download from https://releases.llvm.org/9.0.0/clang%2Bllvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz failed: class java.io.IOException Read timed out
ERROR: An error occurred during the fetch of repository 'llvm_toolchain':
   Traceback (most recent call last):
	File "/home/alireza/.cache/bazel/_bazel_alireza/3623e6f5b3c7c23c7952e987fbc7cddc/external/com_grail_bazel_toolchain/toolchain/internal/configure.bzl", line 101
		_download_llvm_preconfigured(rctx)
	File "/home/alireza/.cache/bazel/_bazel_alireza/3623e6f5b3c7c23c7952e987fbc7cddc/external/com_grail_bazel_toolchain/toolchain/internal/llvm_distributions.bzl", line 135, in _download_llvm_preconfigured
		rctx.download_and_extract(urls, sha256 = _llvm_distributions...], ..."))])
java.io.IOException: Error downloading [https://releases.llvm.org/9.0.0/clang%2Bllvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz] to /home/alireza/.cache/bazel/_bazel_alireza/3623e6f5b3c7c23c7952e987fbc7cddc/external/llvm_toolchain/clang%2Bllvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz: Read timed out
ERROR: no such package '@llvm_toolchain//': Traceback (most recent call last):
	File "/home/alireza/.cache/bazel/_bazel_alireza/3623e6f5b3c7c23c7952e987fbc7cddc/external/com_grail_bazel_toolchain/toolchain/internal/configure.bzl", line 101
		_download_llvm_preconfigured(rctx)
	File "/home/alireza/.cache/bazel/_bazel_alireza/3623e6f5b3c7c23c7952e987fbc7cddc/external/com_grail_bazel_toolchain/toolchain/internal/llvm_distributions.bzl", line 135, in _download_llvm_preconfigured
		rctx.download_and_extract(urls, sha256 = _llvm_distributions...], ..."))])
java.io.IOException: Error downloading [https://releases.llvm.org/9.0.0/clang%2Bllvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz] to /home/alireza/.cache/bazel/_bazel_alireza/3623e6f5b3c7c23c7952e987fbc7cddc/external/llvm_toolchain/clang%2Bllvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz: Read timed out
ERROR: no such package '@llvm_toolchain//': Traceback (most recent call last):
	File "/home/alireza/.cache/bazel/_bazel_alireza/3623e6f5b3c7c23c7952e987fbc7cddc/external/com_grail_bazel_toolchain/toolchain/internal/configure.bzl", line 101
		_download_llvm_preconfigured(rctx)
	File "/home/alireza/.cache/bazel/_bazel_alireza/3623e6f5b3c7c23c7952e987fbc7cddc/external/com_grail_bazel_toolchain/toolchain/internal/llvm_distributions.bzl", line 135, in _download_llvm_preconfigured
		rctx.download_and_extract(urls, sha256 = _llvm_distributions...], ..."))])
java.io.IOException: Error downloading [https://releases.llvm.org/9.0.0/clang%2Bllvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz] to /home/alireza/.cache/bazel/_bazel_alireza/3623e6f5b3c7c23c7952e987fbc7cddc/external/llvm_toolchain/clang%2Bllvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz: Read timed out
INFO: Elapsed time: 165.951s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Thanks,
Alireza

Server fails to find "trace.tar.gz.binproto" file

After creating the trace (either using the trace.sh script or util:trace binary) only trace.tar.gz file is generated to the result directory. This leads to the following error when loading the web UI:

Failed to get list of collections
Reason:
 Failed to list collection metadata: open /home/ipuustin/tmp/traces/trace.tar.gz.binproto: no such file or directory

Server is not running in Arch Linux

I tried to run the server on my Arch Linux, but it doesn't run.
I installed yarn and bazel. I tried to run the command with yarn and without.
I am not familiar with yarn, so I coud use some help here.

 $ yarn --version
1.22.21

$ bazel --version
bazel 6.4.0

$ yarn bazel run server -- -- -storage_path=~/schedviz_traces
yarn run v1.22.21
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ /workspace/neat/schedviz/node_modules/.bin/bazel run server -- '-storage_path=~/schedviz_traces'
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Writing tracer profile to '/home/tanureal/.cache/bazel/_bazel_tanureal/44a250536f8b1b544f60c8660768e4db/command.profile.gz'
WARNING: Download from https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/12a2d801f69ca8fff9128a8044549d7cbac306f1.zip failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
ERROR: /workspace/neat/schedviz/client/app/sidebar/BUILD.bazel:8:1: //client/app/sidebar:sidebar: no such attribute 'strict_templates' in 'ng_module' rule
ERROR: /workspace/neat/schedviz/client/app/sidebar/thread_table/BUILD.bazel:8:1: //client/app/sidebar/thread_table:thread_table: no such attribute 'strict_templates' in 'ng_module' rule
ERROR: /workspace/neat/schedviz/client/app/sidebar/settings_menu/BUILD.bazel:8:1: //client/app/sidebar/settings_menu:settings_menu: no such attribute 'strict_templates' in 'ng_module' rule
ERROR: /workspace/neat/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar/settings_menu:settings_menu' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /workspace/neat/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar/thread_table:thread_table' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /workspace/neat/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar.ts' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /workspace/neat/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar_module.ts' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /workspace/neat/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar.ng.html' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /workspace/neat/schedviz/client/app/sidebar/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar.css' contains an error and its package is in error and referenced by '//client/app/sidebar:sidebar'
ERROR: /workspace/neat/schedviz/client/app/dashboard/BUILD.bazel:8:1: Target '//client/app/sidebar:sidebar' contains an error and its package is in error and referenced by '//client/app/dashboard:dashboard'
ERROR: Analysis of target '//server:server' failed; build aborted: Analysis failed
INFO: Elapsed time: 102.455s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (122 packages loaded, 1089 targets configured)
FAILED: Build did NOT complete successfully (122 packages loaded, 1089 targets configured)
    Fetching @org_golang_x_sync; fetching
    Fetching @org_golang_google_grpc; Cloning 2fdaae294f38ed9a121193c51ec99fecd3b13eb7 of https://github.com/grpc/grpc-go
    Fetching @com_github_hashicorp_golang-lru; fetching
    Fetching @com_github_golang_protobuf; Cloning c823c79ea1570fb5ff454033735a8e68575d1d0f of https://github.com/golang/protobuf
    Fetching @com_github_google_uuid; fetching
    Fetching @build_bazel_rules_sass_deps; Running yarn install on @io_bazel_rules_sass//sass:package.json
    Fetching @com_github_workiva_go-datastructures; fetching
    Fetching @org_golang_x_tools; Cloning 589c23e65e65055d47b9ad4a99723bc389136265 of https://go.googlesource.com/tools ... (10 fetches)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

$ bazel run server -- -- -storage_path=~/schedviz_traces
Extracting Bazel installation...
Killed non-responsive server process (pid=105016)
Starting local Bazel server and connecting to it...
INFO: Reading rc options for 'run' from /workspace/neat/schedviz/.bazelrc:
  Inherited 'build' options: --host_force_python=PY2 --crosstool_top=@llvm_toolchain//:toolchain --incompatible_strict_action_env --incompatible_new_actions_api=false --experimental_allow_incremental_repository_updates --incompatible_depset_is_not_iterable=false
ERROR: --experimental_allow_incremental_repository_updates :: Unrecognized option: --experimental_allow_incremental_repository_updates

Can't install on rocky linux 8.6

As the title suggests, I was unable to easily get this setup on Rocky 8.6. I did the clone, and yarn install and that worked, but trying to get the server up fails almost immediately with the following:

INFO: Call stack for the definition of repository 'llvm_toolchain' which is a llvm_toolchain (rule definition at /root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/com_grail_bazel_toolchain/toolchain/rules.bzl:24:18):
 - /root/git/schedviz/WORKSPACE:66:1
ERROR: An error occurred during the fetch of repository 'llvm_toolchain':
   Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/com_grail_bazel_toolchain/toolchain/internal/configure.bzl", line 101
                _download_llvm_preconfigured(rctx)
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/com_grail_bazel_toolchain/toolchain/internal/llvm_distributions.bzl", line 120, in _download_llvm_preconfigured
                fail(("Failed to detect host OS versi...)))
Failed to detect host OS version: 

Unsupported linux distribution and version: rocky, 8.6
ERROR: no such package '@llvm_toolchain//': Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/com_grail_bazel_toolchain/toolchain/internal/configure.bzl", line 101
                _download_llvm_preconfigured(rctx)
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/com_grail_bazel_toolchain/toolchain/internal/llvm_distributions.bzl", line 120, in _download_llvm_preconfigured
                fail(("Failed to detect host OS versi...)))
Failed to detect host OS version: 

Unsupported linux distribution and version: rocky, 8.6
ERROR: no such package '@llvm_toolchain//': Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/com_grail_bazel_toolchain/toolchain/internal/configure.bzl", line 101
                _download_llvm_preconfigured(rctx)
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/com_grail_bazel_toolchain/toolchain/internal/llvm_distributions.bzl", line 120, in _download_llvm_preconfigured
                fail(("Failed to detect host OS versi...)))
Failed to detect host OS version: 

Unsupported linux distribution and version: rocky, 8.6

Failure to start: "Unknown token"

node version 16.19.0
yarn version 3.4.1
building at commit 0beae2e

Actual error:

(error An unexpected error occurred: "Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in /home/zlacelle/schedviz/yarn.lock".
)
ERROR: no such package '@npm//': yarn_install failed: yarn install v1.13.0

When running the bazel command, get the following:

INFO: Writing tracer profile to '/home/zlacelle/.cache/bazel/_bazel_zlacelle/f394b6cfc4dc0f4f553cf5228e672989/command.profile.gz'
INFO: Call stack for the definition of repository 'npm' which is a yarn_install (rule definition at /home/zlacelle/.cache/bazel/_bazel_zlacelle/f394b6cfc4dc0f4f553cf5228e672989/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:382:16):
 - /home/zlacelle/.cache/bazel/_bazel_zlacelle/f394b6cfc4dc0f4f553cf5228e672989/external/build_bazel_rules_nodejs/defs.bzl:82:5
 - /home/zlacelle/schedviz/WORKSPACE:87:1
ERROR: An error occurred during the fetch of repository 'npm':
   yarn_install failed: yarn install v1.13.0
info If you think this is a bug, please open a bug report with the information provided in "/home/zlacelle/schedviz/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
 (error An unexpected error occurred: "Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in /home/zlacelle/schedviz/yarn.lock".
)
ERROR: no such package '@npm//': yarn_install failed: yarn install v1.13.0
info If you think this is a bug, please open a bug report with the information provided in "/home/zlacelle/schedviz/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
 (error An unexpected error occurred: "Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in /home/zlacelle/schedviz/yarn.lock".
)
ERROR: no such package '@npm//': yarn_install failed: yarn install v1.13.0
info If you think this is a bug, please open a bug report with the information provided in "/home/zlacelle/schedviz/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
 (error An unexpected error occurred: "Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in /home/zlacelle/schedviz/yarn.lock".
)
INFO: Elapsed time: 0.229s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)

Initial yarn install output:

➤ YN0000: ┌ Resolution step
➤ YN0061: │ protractor@npm:6.0.0 is deprecated: We have news to share - Protractor is deprecated and will reach end-of-life by Summer 2023. To learn more and find out about other options please refer to this post on the Angular blog. Thank you for using and contributing to Protractor. https://goo.gle/state-of-e2e-in-angular
➤ YN0061: │ chokidar@npm:2.1.6 is deprecated: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
➤ YN0061: │ sourcemap-codec@npm:1.4.4 is deprecated: Please use @jridgewell/sourcemap-codec instead
➤ YN0061: │ fsevents@npm:1.2.9 is deprecated: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
➤ YN0061: │ debug@npm:3.2.6 is deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
➤ YN0061: │ request@npm:2.88.0 is deprecated: request has been deprecated, see https://github.com/request/request/issues/3142
➤ YN0061: │ @bazel/bazel@npm:1.0.0 is deprecated: @bazel/bazel is deprecated, please use @bazel/bazelisk instead
➤ YN0032: │ nan@npm:2.14.0: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ debug@npm:4.1.1 is deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
➤ YN0061: │ node-pre-gyp@npm:0.12.0 is deprecated: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
➤ YN0061: │ har-validator@npm:5.1.3 is deprecated: this library is no longer supported
➤ YN0061: │ uuid@npm:3.3.2 is deprecated: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
➤ YN0061: │ nomnom@npm:1.8.1 is deprecated: Package no longer supported. Contact [email protected] for more info.
➤ YN0061: │ ini@npm:1.3.5 is deprecated: Please update to ini >=1.3.6 to avoid a prototype pollution issue
➤ YN0061: │ source-map-resolve@npm:0.5.2 is deprecated: See https://github.com/lydell/source-map-resolve#deprecated
➤ YN0061: │ read-package-tree@npm:5.3.1 is deprecated: The functionality that this package provided is now in @npmcli/arborist
➤ YN0061: │ source-map-url@npm:0.4.0 is deprecated: See https://github.com/lydell/source-map-url#deprecated
➤ YN0061: │ resolve-url@npm:0.2.1 is deprecated: https://github.com/lydell/resolve-url#deprecated
➤ YN0061: │ urix@npm:0.1.0 is deprecated: Please see https://github.com/lydell/urix#deprecated
➤ YN0061: │ readdir-scoped-modules@npm:1.0.2 is deprecated: This functionality has been moved to @npmcli/fs
➤ YN0061: │ set-value@npm:2.0.0 is deprecated: Critical bug fixed in v3.0.1, please upgrade to the latest version.
➤ YN0061: │ set-value@npm:0.4.3 is deprecated: Critical bug fixed in v3.0.1, please upgrade to the latest version.
➤ YN0061: │ node-fetch-npm@npm:2.0.2 is deprecated: This module is not used anymore, npm uses minipass-fetch for its fetch implementation now
➤ YN0061: │ @npmcli/move-file@npm:2.0.1 is deprecated: This functionality has been moved to @npmcli/fs
➤ YN0061: │ @schematics/update@npm:0.801.0 is deprecated: This was an internal-only Angular package up through Angular v11 which is no longer used or maintained. Upgrade Angular to v12+ to remove this dependency.
➤ YN0061: │ @bazel/typescript@npm:0.32.2 is deprecated: This package is no longer maintained, see https://github.com/aspect-build/rules_ts for replacement
➤ YN0061: │ @bazel/hide-bazel-files@npm:0.32.2 is deprecated: This package is a workaround for an issue prior to Bazel 2.1. If you are on Bazel 2.1 or later, you should not need this, because the .bazelignore file contains node_modules so that Bazel doesn't try to read packages from this directory.
➤ YN0061: │ puppeteer@npm:0.13.0 is deprecated: < 19.2.0 is no longer supported
➤ YN0061: │ mkdirp@npm:0.5.1 is deprecated: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
➤ YN0061: │ @bazel/karma@npm:0.32.2 is deprecated: As of https://github.com/bazelbuild/rules_nodejs/releases/tag/3.0.0 use @bazel/concatjs instead
➤ YN0061: │ log4js@npm:4.3.1 is deprecated: 4.x is no longer supported. Please upgrade to 6.x or higher.
➤ YN0061: │ core-js@npm:2.6.9 is deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
➤ YN0061: │ date-format@npm:2.0.0 is deprecated: 2.x is no longer supported. Please upgrade to 4.x or higher.
➤ YN0061: │ streamroller@npm:1.0.5 is deprecated: 1.x is no longer supported. Please upgrade to 3.x or higher.
➤ YN0002: │ @bazel/typescript@npm:0.32.2 doesn't provide typescript (p7a668), requested by tsutils
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 3s 523ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ zone.js@npm:0.9.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0019: │ @bazel-typescript-npm-5.7.3-7db63b054c-b97e16d871.zip appears to be unused - removing
➤ YN0019: │ @bazel-worker-npm-5.7.3-95aece651d-e109b8d12f.zip appears to be unused - removing
➤ YN0019: │ google-protobuf-npm-3.21.2-7c82de39ab-3caa2e1e26.zip appears to be unused - removing
➤ YN0019: │ tsutils-npm-3.21.0-347e6636c5-1843f4c1b2.zip appears to be unused - removing
➤ YN0000: └ Completed in 0s 656ms
➤ YN0000: ┌ Link step
➤ YN0007: │ protobufjs@npm:6.8.8 must be built because it never has been before or the last one failed
➤ YN0008: │ schedviz@workspace:. must be rebuilt because its dependency tree changed
➤ YN0000: └ Completed in 7s 842ms
➤ YN0000: Done with warnings in 12s 93ms

Failed to upload trace file trace.tar.gz

hi,I am getting errors when uploading trace file.

Could you help to take a look at this?

Failed to upload trace file: failed to read Ftrace trace files: failed to read page. caused by: not enough bytes left in reader. wanted to read 36364, but read 4080
CPU: 0, Page: 0 Page Timestamp: 421905801070 Event Index: 0

Internal Server Error when uploading trace file

This is happening when I try to upload my trace file on a different machine to analyze the trace.

trace.tar.gz

 Internal Server Error:
Failed to upload trace file: no format found with id: 529
Page: 0 Page Timestamp: 81224889073 Event Index: 0 
Bitfield: d
Data:
00000000  11 02 00 00 da 0a 00 00  14 00 20 00 00 80 08 00  |.......... .....|
00000010  68 51 00 00 2f 6c 69 62  2f 78 38 36 5f 36 34 2d  |hQ../lib/x86_64-|
00000020  6c 69 6e 75 78 2d 67 6e  75 2f 6c 69 62 63 2e 73  |linux-gnu/libc.s|
00000030  6f 2e 36 00                                       |o.6.|

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.