sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: node
Issue: 100% CPU usage for a long time after execution of the last statement
Labels: confirmed-bug,v8 engine

### Version

v12.x-v20.x - severe, v8.x - v10.x - less severe but still visible

### Platform

Darwin Andreys-MacBook-Pro.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 arm64

### Subsystem

suspect GC

### What steps will reproduce the bug?

run first script in the gist: https://gist.github.com/sidorares/128160e6b3dea1da3ad45cd672651d2d#file-repro1-js

After last line `console.log("done");` is executed CPU spikes to 100% and stays like that for about 5 minutes.
In case of node v8 and v10 cpu spike is much shorter, 5-7 seconds.
Bun.js executes the script almost instantly

### How often does it reproduce? Is there a required condition?

Consistently reproduceable

### What is the expected behavior? Why is that the expected behavior?

the script is expected to finish in sub second time

### What do you see instead?

CPU spikes for 300-400 seconds which is unexpected for the workload

### Additional information

The profiler only reports the code before the CPU spike, no high GC usage, the time after cpu spike is "unaccounted".

```js
 [Shared libraries]:
   ticks  total  nonlib   name
     98    0.0%          /Users/laplace/.nvm/versions/node/v20.3.0/bin/node

 [JavaScript]:
   ticks  total  nonlib   name
      2    0.0%    0.0%  JS: *parseLengthCodedInt /Users/laplace/tmp/2090/repro3.js:2014:24

 [C++]:
   ticks  total  nonlib   name

 [Summary]:
   ticks  total  nonlib   name
      2    0.0%    0.0%  JavaScript
      0    0.0%    0.0%  C++
     66    0.0%    0.0%  GC
     98    0.0%          Shared libraries
  291682  100.0%          Unaccounted

 [C++ entry points]:
   ticks    cpp   total   name

 [Bottom up (heavy) profile]:
  Note: percentage shows a share of a particular caller in the total
  amount of its parent calls.
  Callers occupying less than 1.0% are not shown.

   ticks parent  name
  291682  100.0%  UNKNOWN
```
Repository: react
Issue: [DevTools Bug]: Update highlights crash often
Labels: Type: Bug,Status: Unconfirmed,Component: Developer Tools

### Website or app

http://everywhereiusetheextension.io

### Repro steps

- Open React devtools
- Enable " Highlight updates when components render."
- Use your React app
- Highlight stops working again and again. The only way to make it work is to close and open devtools...

### How often does this bug happen?

Often

### DevTools package (automated)

_No response_

### DevTools version (automated)

_No response_

### Error message (automated)

_No response_

### Error call stack (automated)

_No response_

### Error component stack (automated)

_No response_

### GitHub query string (automated)

_No response_
Repository: storybook
Issue: [Bug]: storybook@latest (7.0.24) produces ETARGET error during migration 
Labels: bug,needs triage

### Describe the bug

![image](https://github.com/storybookjs/storybook/assets/28097617/4525b542-500b-493d-a2e3-dc984dd2ad07)


### To Reproduce

Try to upgrade from v6.5.14 using `npx @storybook@latest upgrade` command

### System

```shell
11:07 $ npx storybook@latest info
Need to install the following packages:
  storybook@7.0.24
Ok to proceed? (y) y
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @storybook/core-common@7.0.24.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in: /home/vagrant/.npm/_logs/2023-06-28T09_10_19_405Z-debug-0.log
```


### Additional context

_No response_
Repository: next.js
Issue: Rewrites don't work if a middleware.ts file is present
Labels: bug,Navigation,Runtime

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000
    Binaries:
      Node: 16.19.1
      npm: 8.19.3
      Yarn: 1.22.19
      pnpm: N/A
    Relevant packages:
      next: 13.4.6
      eslint-config-next: 13.4.6
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.3
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

Middleware / Edge (API routes, runtime), Routing (next/router, next/navigation, next/link)

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/Reinano/custom-next

### To Reproduce

1.next build && next start
2.Go to main page then click any link (about-1 or about-2).
3.Check router.query.slug
4. U'll be able to see empty router.query (useRouter)

### Describe the Bug

I use rewrites and in the case when there is a middleware.ts file in the root of the project, then rewrites with a dynamic slug stop working.
I have rewrites like this: 
`
const nextConfig = {
  reactStrictMode: true,
  async rewrites() {
    return [
      {
        source: '/es-es/(quenes-somos)/:slug',
        destination: '/about/:slug',
        locale: false,
      },
    ]
  }
}
`
If i go to production build and start it. Next dev is ok.
After following the link 
`<Link href='/es-es/quenes-somos/about-1'>about-1 </Link>` from the main page to the about/[slug] dynamic page, I won't get router.query.slug.
If u reload the page u can get router.query.slug
Router.query.slug available from getServerSideProps, but not in client side. 

### Expected Behavior

Would like to have access to router.query.slug from useRouter()

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: PowerToys
Issue: Run not showing files that are indexed
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.70.1

### Installation method

Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

## Issue: Run not showing files that are indexed

Some files in PowerToys are not always indexed (which we can always make it show back in settings) but  **a program I was looking for was not showing up**. Run told it was not indexed.  

### ✔️ Expected Behavior

All files should come up, except non-indexed ones. So I was looking through it expecting the program to show up.

### ❌ Actual Behavior

When Run started, I showed the prompt and it told _not all files are indexed_. Second time it ran, it was normal.

### Other Software

_No response_
Repository: godot
Issue: Transparent wall behind another transparent wall is rendered in front of it.
Labels: topic:rendering,topic:3d

### Godot version

4.0

### System information

Win 10, Godot 4.0.x (compatibility), GT 610, i5, 8 GB RAM

### Issue description

We have many walls in our 3D scene, and all of them are semi transparent. The wall behind is drawn in front. I have reference image. It also causes weird flickring.
![249137819-496ab91e-1fa7-41e2-b0eb-c3f80f2fb5fc](https://github.com/godotengine/godot/assets/38527141/5374b78e-694e-4ac8-a36f-81e391cc90ed)


### Steps to reproduce

1. Create a minimal scene of walls made of primitive cubes.
2. Apply alpha transparency of 0.6 to each wall.
3. Move camera around.

### Minimal reproduction project

N/A
Repository: godot
Issue: Godot 3.5 & 4.0 crash from time to time
Labels: bug,topic:editor,needs testing,crash

### Godot version

v3.5.2.stable.official [170ba337a], v4.0.3.stable.official [5222a99f5]

### System information

Ubuntu 23.04, Windows 11

### Issue description

From time to time, several times per hour, Godot is shutting down without any reasons or warnings.
It could happened when saving a file or importing an assets (or anything else...).

### Steps to reproduce

I don't know how to reproduce it because it seems erratic.

I don't know, as weel, how to provide more information.




### Minimal reproduction project

N/A
Repository: PowerToys
Issue: [Peek] Preview Files in Archives
Labels: Idea-Enhancement,Product-Peek

Investigate the possibility to trigger Peek for files in the archives.
You will probably need to extract the files.

https://github.com/microsoft/PowerToys/pull/26839#issuecomment-1607846013
Repository: vscode
Issue: Listing processes failed: Error: cat: /proc/241496/stat: No such file or directory
Labels: bug,workbench-diagnostics

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.79.2
- OS Version: Ubuntu 23.04

### Steps to Reproduce:

1. Open Process Explorer
2. Open output channel for "Main"

Sometimes an error is logged to the output channel: `Listing processes failed: Error: cat: /proc/241496/stat: No such file or directory`

![listing-processes](https://github.com/microsoft/vscode/assets/23744935/463b3915-cf11-4be9-82c5-162fd8287d54)

### Expected behaviour: 


No error is logged to the main output channel. 

### Actual behaviour: 
An error is logged to the output channel: `Listing processes failed: Error: cat: /proc/241496/stat: No such file or directory`


### Additional information

There probably is race condition where the process is already gone when vscode tries to get its cpu usage. Perhaps it might be a good idea to specifically ignore `ENOENT` errors when querying cpu usage to avoid logging lots of `ENOENT` errors to the main output channel.


### Code

The error is likely coming from here:

https://github.com/microsoft/vscode/blob/f5e6325900b7e831c2772d77a29cc24395d9f872/src/vs/base/node/cpuUsage.sh#L24
Repository: rust
Issue: Misleading lifetime error with for loop and async capture
Labels: A-diagnostics,T-compiler

### Code

```Rust
struct Foo(String);
struct Bar;
fn foo(foos: &[Foo], bar: &'static Bar) {
    let (tx, _rx) = tokio::sync::mpsc::unbounded_channel();
    for foo in foos {
        let tx = tx.clone();
        tokio::spawn(async move {
            tx.send(foo.0.clone()).unwrap();
        });
    }
}
```


### Current output

```Shell
error[E0521]: borrowed data escapes outside of function
   --> src/lib.rs:5:16
    |
  3 | fn foo(foos: &[Foo], bar: &'static Bar) {
    |        ----  -       --- `bar` declared here, outside of the function body
    |        |     |
    |        |     let's call the lifetime of this reference `'1`
    |        `foos` is a reference that is only valid in the function body
  4 |     let (tx, _rx) = tokio::sync::mpsc::unbounded_channel();
  5 |     for foo in foos {
    |                ^^^^
    |                |
    |                `foos` escapes the function body here
    |                argument requires that `'1` must outlive `'static`

For more information about this error, try `rustc --explain E0521`.
```


### Desired output

I'm not sure what the perfect diagnostic would be here.

If you were the modify the code and not use a for loop/slice, you get something closer to this:

```Shell
error[E0521]: borrowed data escapes outside of function
   --> src/lib.rs:517:9
    |
  3 |   fn foo(foos: &[Foo], bar: &'static Bar) {
    |          ---   -       --- `bar` declared here, outside of the function body
    |          |     |
    |          |     let's call the lifetime of this reference `'1`
    |          `foos` is a reference that is only valid in the function body
...
  7 | /         tokio::spawn(async move {
  8 | |             tx.send(foo.0.clone()).unwrap();
  9 | |         });
    | |          ^
    | |          |
    | |__________`foos` escapes the function body here
    |            argument requires that `'1` must outlive `'static`

For more information about this error, try `rustc --explain E0521`.
```

If you modify the original code to use std::sync::mpsc/std::thread::spawn you get the same error above.

But the
```
--- `bar` declared here, outside of the function body
```
is still a red herring. I think the perfect diagnostic would point to `foo.0.clone` and the `tokio::spawn`'s `F: 'static` requirement.



### Rationale and extra context

The problem is that the `foo` is `move`d by reference, so the task is not `'static`. Pointing the error at the for loop is incorrect as it's not the culprit of the issue. This might be a lifetime inference bug

### Other cases

_No response_

### Anything else?

_No response_
Repository: pytorch
Issue: Segmentation error while using F.cross_entropy with mps(for code that works fine with device= "cpu")
Labels: module: crash,triaged,module: mps

### 🐛 Describe the bug

import torch
import torch.nn as nn
from torch.nn import functional as F
batch_size = 32 
block_size = 8 
device = "mps"

vocab_size = 1000
X = torch.randint(0, vocab_size, (32, 8), device = device)
Y = torch.randint(0, vocab_size, (32, 8), device = device)
token_embedding_table = nn.Embedding(vocab_size, vocab_size, device=device)
logits = token_embedding_table(X) 
B, T, C = logits.shape
logits = logits.view(BT, C)
targets = Y.view(BT)
loss = F.cross_entropy(logits, targets)


### Versions

vrindavan@Vrindavans-MBP Code % python3 collect_env.py
Collecting environment information...
PyTorch version: 2.0.0.dev20230208
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 14.0 (arm64)
GCC version: Could not collect
Clang version: 14.0.3 (clang-1403.0.22.14.1)
CMake version: version 3.25.2
Libc version: N/A

Python version: 3.9.6 (default, May  7 2023, 23:32:44)  [Clang 14.0.3 (clang-1403.0.22.14.1)] (64-bit runtime)
Python platform: macOS-14.0-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Apple M2

Versions of relevant libraries:
[pip3] numpy==1.23.5
[pip3] torch==2.0.0.dev20230208
[pip3] torchaudio==2.0.0.dev20230207
[pip3] torchvision==0.15.0.dev20230207
[conda] Could not collect
vrindavan@Vrindavans-MBP Code % 

cc @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen @razarmehr @abhudev
Repository: vscode
Issue: cpuUsage.sh: line 51: let: PROCESS_TIME_AFTER=+: syntax error: operand expected (error token is "+")
Labels: bug,workbench-diagnostics

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.79.2
- OS Version: Ubuntu 23.04

### Steps to Reproduce:

1. Open the process explorer
2. Open output channel for "Main"

Sometimes an error is logged to the output channel: `/snap/code/132/usr/share/code/resources/app/out/vs/base/node/cpuUsage.sh: line 51: let: PROCESS_TIME_AFTER=+: syntax error: operand expected (error token is "+")`

### Additional information

By default shell scripts continue even on error. Perhaps it would be a good idea to add `set -e` to the bash script so the script doesn't continue on error. 

Related to this issue is https://github.com/microsoft/vscode/issues/186500, the actual error occurs in `cat /proc/$PID/stat` but the script continues, resulting in another error `let: PROCESS_TIME_AFTER=+: syntax error: operand expected (error token is "+")`

### Code 

https://github.com/microsoft/vscode/blob/f5e6325900b7e831c2772d77a29cc24395d9f872/src/vs/base/node/cpuUsage.sh#L51
Repository: material-ui
Issue: Confusion regarding Grid2 inheritance
Labels: component: Grid,enhancement

With the changes in this pull request https://github.com/mui/material-ui/pull/36401/files#diff-332d9020c5961e15d6a690dcb551f07200c3446c981c14c446738ffeeee7a7f8 it added inheritance of columns and spacing to the root grid container.

I'm just a bit confused about how the inheritance should actually work. Should only direct `Grid` children with the `container` prop inherit these values? Or should every `Grid` child with the `container` prop inherit from the root grid container? The second scenario just seems a bit weird to me as you could have a grid as the top level layout of your page, and then every nested grid even if they are 10 levels deep will now start inheriting from the root level. 

I've attached a code sandbox to try to illustrate what I mean

https://codesandbox.io/s/serene-allen-n2lg7h?file=/src/App.tsx

So the main question is this all intended behaviour now?
Repository: rust
Issue: `-C debug-assertions=off` does not apply on all consteval cases
Labels: A-const-eval,C-discussion

> Not sure if this is a bug, but I'd post it anyways.

When experimenting turning off optimizations for MIR output, for example, disabling `debug-assertions` in the following code, the output is confusing. The overflow checking is removed from function `foo`, but not from `const A` evaluation.

It is less confusing if the debug assertions are turned off in all places.

BTW, is there a way to turn off `const-eval`? `-Zmir-opt-level=0` is not useful.

I tried this code:

```rust
const fn foo(x: i32, y: i32) -> i32 {
    x + y
}

fn main() {
    const A: i32 = foo(1, 2 + 34);
    assert!(A == 37);
    return
}
```

Emitted mir for the code using 
```
rustc test.rs --emit=mir -C debug-assertions=off
```
with rustc version
```
rustc 1.72.0-nightly (fe7454bf4 2023-06-19)
```
I expected to see the `CheckedAdd` replaced by `Add` and the assertion removed in the following code:
```
const A: i32 = {
    let mut _0: i32;
    let mut _1: i32;
    let mut _2: (i32, bool);

    bb0: {
        StorageLive(_1);
        _2 = CheckedAdd(const 2_i32, const 34_i32);
        assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 34_i32) -> bb1;
    }

    bb1: {
        _1 = move (_2.0: i32);
        ConstEvalCounter;
        _0 = foo(const 1_i32, move _1) -> bb2;
    }

    bb2: {
        StorageDead(_1);
        return;
    }
}
```
Repository: flutter
Issue: Pass app version, name, and description as Dart environment constants
Labels: c: new feature,tool,framework,c: proposal,P2,team-framework,triaged-framework

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Quite often there's a need to access the information about the current version and/or the package name and description of the app binary. For example that would be helpful to display the app info in the About menu/dialog or to build a HTTTP client agent string. It seems that currently there's no easy way to do that without involving a 3rd-party package or platform plugin despite all that information is static and is available during the app build. 

### Proposal

That would be really great to be able read the `name`, `description` and `version` values from the `pubspec.yaml` as constants from the environment:

```
const kAppName = String.fromEnvironment('packageName');
const kAppDescription = String.fromEnvironment('packageDescription');
const kAppVersion = String.fromEnvironment('packageVersion');
```
Repository: vscode
Issue: Add a "Reload all windows" command
Labels: feature-request,workbench-window

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
A single command that does the equivalent of `Developer: Reload Window` or clicking the `Reload Window` button on the dialog that pops up after the "Remote - SSH extension" fails to reconnect a few times.

#97175 requested this feature but was closed when it was pointed out that quitting the whole program and relaunching it could achieve similar results. I don't think that's an effective answer for the following reasons:
* The user may have `window.restoreWindows` disabled.
* The user's environment may make it nontrivial to reproduce the same launch state the program had previously.
* Relaunching the whole program could take arbitrarily much longer than reloading windows.

PS: A "Reconnect all windows" command would also solve a subset of this problem and be much faster.
PPS: It would also be nice if these commands had "Reload all windows currently showing a reload prompt" and "Reconnect all windows currently showing a reconnect prompt" variants; that's what I'd use most often.
Repository: vscode
Issue: `files.simpleDialog` should be able to create paths
Labels: feature-request,simple-file-dialog

`files.simpleDialog` can create a path if it doesn't exist (either interactively or via a setting) 

<img width="618" alt="image" src="https://github.com/microsoft/vscode/assets/16353531/0ad5ac6d-ddd0-4529-80b5-d662cc3bec41">

I would kinda be interested in implementing this myself as well, if you don't mind the idea