sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: sdp_kernel causes dynamo error on torch.compile(model, fullgraph=True)
Labels: good first issue,triaged,oncall: pt2,module: dynamo,dynamo-must-fix,module: sdpa

### 🐛 Describe the bug

Applying torch.compile(model, fullgraph=True) to a model using sdp_kernel results with a dynamo error.

### Error logs

from user code:
   File ... , line 14, in forward
    with torch.backends.cuda.sdp_kernel(

Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information

### Minified repro

```
import torch
import torch._dynamo
import torch._inductor


class Repro(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.enable_flash = True
        self.enable_math = True
        self.enable_mem_efficient = True

    def forward(self, q, k, v):
        with torch.backends.cuda.sdp_kernel(
            enable_flash=self.enable_flash,
            enable_math=self.enable_math,
            enable_mem_efficient=self.enable_mem_efficient,
        ):
            out = torch.nn.functional.scaled_dot_product_attention(
                q,
                k,
                v,
                attn_mask=None,
                dropout_p=0.0,
                is_causal=False,
            )
            return out

rep = Repro()
rep_opt = torch.compile(rep, fullgraph=True)
q = torch.empty_strided(
        (1, 48, 64, 64), (0, 4096, 64, 1), device="cuda", dtype=torch.half
    )
 k = torch.empty_strided(
        (1, 48, 64, 64), (0, 4096, 64, 1), device="cuda", dtype=torch.half
    )
 v = torch.empty_strided(
        (1, 48, 64, 64), (0, 4096, 64, 1), device="cuda", dtype=torch.half
    )
 with torch.no_grad():
     out = rep_opt(q, k, v)


```

### Versions

NA

cc @jbschlosser @bhosmer @cpuhrsch @erichan1 @drisspg @mikaylagawarecki @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @ezyang @msaroufim @bdhirsh @anijain2305 @zou3519 @aakhundov @wconstab @Xia-Weiwen @ipiszy
Repository: pytorch
Issue: Timeout during NCCL initialization due to store
Labels: oncall: distributed,better-engineering

## Context

Pytorch barrier for the NCCL backend is implemented by calling [allReduce](https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api/colls.html#ncclallreduce) from NCCL. Because we initialize NCCL lazily, before the allreduce we need to set up the NCCL communicators. To initialize communicator, a unique nccl id is broadcasted to all ranks in the group. To do this, we use a key-value store where rank 0 sets the ID, and all other ranks read from this.

## Issue
There is a possibility that some rank is trying to read from the store but no key is set (rank 0 is not setting it). This can happen when rank 0 is a straggler. The default timeout for store is 5 mins which is different that the default nccl watchdog timeout of 30 mins.

the error would look something like:

```
  "RuntimeError: [6] is setting up NCCL communicator and retrieving ncclUniqueId from [0] via c10d key-value store by key '0', but store->get('0') got error: Socket Timeout",
```

We should rethink our nccl initialization design and how we want to timeout for initialization

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @kwen2501 @awgu @penguinwu
Repository: go
Issue: os: `ReadDir` and `Readdir` on a `File` opened from a relative path try the wrong paths for `FileInfo` structs
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
devel go1.22-98bacdeafe Mon Aug 14 12:51:16 2023 +0000
</pre>

### Does this issue reproduce with the latest release?

Yes.


### What did you do?

1. Use `os.Open` to open an `os.File` for a relative directory.
2. Call `os.Chdir` to change the current working directory.
3. Call `ReadDir` or `Readdir` on the `File` opened in step (1).
4. Inspect the resulting `FileInfo`s.

(https://go.dev/play/p/bLLMvUJGu_u?v=gotip)


### What did you expect to see?

The `FileInfo`s should correspond to the directory entries relative to the `File`.


### What did you see instead?

On Linux:
- `ReadDir` produces the directory contents relative to the current directory instead of the opened file.
- `Readdir` produces `DirEntry` contents relative to the opened file, but calling the `Info` method on those entries attempts to open the wrong paths (compare #52747).

It isn't clear to me how this can be fixed in general — it is possible to use `fdopendir` to read the correct entries while the parent file is still open, but if the parent file is closed before the `Info` method is called on the returned `DirEntry`, I don't see a standard API to reliably open the correct path.
Repository: next.js
Issue: Using `redirect` to the redirect to the same path within server actions causes the page to do a browser refresh when using `runtime = edge`
Labels: bug,Navigation

### 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 23.0.0: Tue Aug  1 03:25:17 PDT 2023; root:xnu-10002.0.242.0.6~31/RELEASE_ARM64_T8103
    Binaries:
      Node: 18.16.0
      npm: 9.5.1
      Yarn: 1.22.19
      pnpm: 8.6.7
    Relevant Packages:
      next: 13.4.15
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: N/A
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App Router, Routing (next/router, next/navigation, next/link)

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/Fredkiss3/next-redirect-cache-bug/tree/another-bug

### To Reproduce

1. clone and run the server
2. Click on the button `redirect To /` it will submit a form which redirects you to the same page, you will see a browser refresh
3. Click on the button  `redirect To /target` it will submit a form which redirects you to `/target` page you won't see a browser refresh 

https://github.com/vercel/next.js/assets/38298743/3bff81c2-3608-4754-a6bf-97933b6e19e5



### Describe the Bug

When calling redirect to the same page inside a server action, nextjs does a full browser refresh, while redirecting to another page does not. 

This only happens when using edge runtime.

### Expected Behavior

It should not do a browser refresh but a client-side navigation.

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: pytorch
Issue: DISABLED test_RNN_dropout_state (__main__.TestNN)
Labels: module: rocm,triaged,skipped

Platforms: rocm

This test was disabled because it is failing on main branch ([recent examples](https://hud.pytorch.org/failure/test_nn.py%3A%3ATestNN%3A%3Atest_RNN_dropout_state))

Specific example: https://github.com/pytorch/pytorch/actions/runs/5859121053/job/15885247751

cc @jeffdaily @sunway513 @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang
Repository: rust
Issue: Overflow check on division can't be disabled
Labels: T-libs-api

Division is always overflow checked even when overflow checks are disabled: https://godbolt.org/z/f7488Enqc

I tried to find if this is correct but I couldn't find any information on division being an exception for overflow checks.
Which either means this is incorrect behaviour or I just couldn't find the documentation stating that division is an exception. In the latter case, it should probably be documented better.
Repository: godot
Issue: Accessing invalid body shape data in PhysicsServer2D silently crashes game
Labels: topic:physics,needs testing

### Godot version

v4.1.stable.official [970459615]

### System information

Windows 10

### Issue description

Calling `PhysicsServer2D.body_get_shape_transform` or `PhysicsServer2D.body_get_shape` with an invalid shape index (negative or shape doesn't exist) silently crashes the application with no error message.

It looks like [the intention](https://github.com/godotengine/godot/blob/c495eb5102278a110c14bbffbf833ed436d1594d/servers/physics_2d/godot_collision_object_2d.h#L120) is not to give some kind of [error message](https://github.com/godotengine/godot/blob/c495eb5102278a110c14bbffbf833ed436d1594d/core/error/error_macros.h#L192), but it probably should.

Run on separate thread is not enabled.

### Steps to reproduce

Run this code.

```gdscript
var body:RID
func _ready() -> void:
	body = PhysicsServer2D.body_create()
	PhysicsServer2D.body_get_shape_transform( body, 0 )
	PhysicsServer2D.body_get_shape( body, 0 )
```

### Minimal reproduction project

N/A
Repository: godot
Issue: Cyclic reference error with autoload, preload and ordering
Labels: bug,topic:gdscript

### Godot version

4.1 stable

### System information

Windows 11

### Issue description

An error `Parser Error: Could not resolve member "main": Cyclic reference.` occurred when I tried to reference a `preload()` variable in the autoload by the other scenes. It crashes regardless if the related code has been accessed or not. (Possibly during pre-check by the engine?) More info and tests below.

### Steps to reproduce

Prepare:
- Autoload "event.gd", with the order-mattered content `@onready var sub = preload(...sub.tscn)` and `@onready var main = preload(...main.tscn)`
- Scene "launcher.tscn" without script (to launch as the main scene, although not required at all)
- Scene "main.tscn" with script "main.gd" with any kind of function that does `print(Event.main)`
- Scene "sub.tscn" with script "sub.gd" with any kind of function that does `print(Event.main)`

Procedure:
- Just launch any of the scenes available, it will crash with error `Parser Error: Could not resolve member "main": Cyclic reference.`, pointing at "main.tscn", at code `print(Event.main)`, even if it has not been accessed yet.

Additional:
- Error does not occur if the order of variable `sub` and `main` in "event.gd" is reversed.
- Error does not occur if variable `main` in "event.gd" use `load()` instead.
- Error does not occur if only variable `sub` OR `main` exist alone in "event.gd".
  - Which means the "main.tscn" that has `print(Event.main)` actually cause no cyclic issue at all.

### Minimal reproduction project

[debug.zip](https://github.com/godotengine/godot/files/12340341/debug.zip)
Repository: pytorch
Issue: The difference between channels last backward and channels first backward of AvgPool2d on CUDA is too large
Labels: module: nn,module: cuda,triaged,module: memory format

### 🐛 Describe the bug

The difference between channels last backward and channels first backward of AvgPool2d on CUDA is too large.

```
### reproducer
import torch
import copy
import torch.utils._pytree as pytree

x = torch.randn(2, 3, 6, 6).cuda().requires_grad_()
x2 = x.contiguous(memory_format=torch.channels_last).cuda().detach().requires_grad_()
model = torch.nn.AvgPool2d((2, 2), (2, 2), (1, 1)).cuda()
model2 = copy.deepcopy(model).cuda()
output = model(x)
grad_out = torch.randn(output.shape).cuda()
grad_out2 = grad_out.clone().contiguous(memory_format=torch.channels_last).cuda()

output2 = model2(x2)

if isinstance(output2, torch.Tensor):
    outputs2 = (output2,)
    outputs = (output,)

# === Do backward pass. ===

ref_diff_outputs = tuple(t for t in outputs)
ref_params = tuple(p for p in model.parameters())
ref_inputs=(x,)
ref_diff_inputs = tuple(
    t
    for t in pytree.tree_flatten((ref_inputs, ref_params))[0]
)
ref_grad_outputs = tuple(
    torch.rand_like(t)
    for t in ref_diff_outputs
)

ref_grad_inputs = torch.autograd.grad(
    ref_diff_outputs,
    ref_diff_inputs,
    grad_outputs=ref_grad_outputs,
    allow_unused=True,
)

diff_outputs = tuple(t for t in outputs2)
params = tuple(p for p in model2.parameters())
inputs=(x2,)
diff_inputs = tuple(
    t
    for t in pytree.tree_flatten((inputs, params))[0]
)
grad_outputs = tuple(
    torch.rand_like(t)
    for t in diff_outputs
)
grad_outputs = tuple(
    t1.copy_(t2)
    for (t1, t2) in zip(grad_outputs, ref_grad_outputs)
)

grad_inputs = torch.autograd.grad(
    diff_outputs,
    diff_inputs,
    grad_outputs=grad_outputs,
    allow_unused=True,
)

torch.testing.assert_close(grad_inputs, ref_grad_inputs, atol=None, rtol=None)
```

The difference is too large:
```
AssertionError: Tensor-likes are not close!

Mismatched elements: 162 / 216 (75.0%)
Greatest absolute difference: 0.2320583015680313 at index (1, 2, 1, 4) (up to 1e-05 allowed)
Greatest relative difference: 245.96385192871094 at index (1, 2, 1, 4) (up to 1.3e-06 allowed)
```

### Versions

PyTorch master.

cc @ezyang @gchanan @zou3519 @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @ptrblck @jamesr66a
Repository: node
Issue: Throwing within `util.inspect.custom` can cause an `ERR_INTERNAL_ASSERTION`
Labels: util

### Version

20.5.1

### Platform

Darwin paperback.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:21:53 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6020 arm64

### Subsystem

_No response_

### What steps will reproduce the bug?

```ts
import util from "util";
console.log({
  hello: {
    [util.inspect.custom]: () => {
      throw new Error("hello");
    },
  },
});
```

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

Every Time

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

To throw the error without an internal assertion error.

### What do you see instead?

```
node:internal/errors:496
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_INTERNAL_ASSERTION]: Error: hello
    at [nodejs.util.inspect.custom] (file:///private/tmp/scratchpad_20230815T031811/index.mjs:5:13)
    at formatValue (node:internal/util/inspect:804:19)
    at formatProperty (node:internal/util/inspect:1944:11)
    at formatRaw (node:internal/util/inspect:1053:9)
    at formatValue (node:internal/util/inspect:839:10)
    at inspect (node:internal/util/inspect:363:10)
    at formatWithOptionsInternal (node:internal/util/inspect:2297:40)
    at formatWithOptions (node:internal/util/inspect:2159:10)
    at console.value (node:internal/console/constructor:342:14)
    at console.log (node:internal/console/constructor:379:61)
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

    at new NodeError (node:internal/errors:405:5)
    at Function.fail (node:internal/assert:20:9)
    at handleMaxCallStackSize (node:internal/util/inspect:1555:10)
    at formatRaw (node:internal/util/inspect:1061:12)
    at formatValue (node:internal/util/inspect:839:10)
    at inspect (node:internal/util/inspect:363:10)
    at formatWithOptionsInternal (node:internal/util/inspect:2297:40)
    at formatWithOptions (node:internal/util/inspect:2159:10)
    at console.value (node:internal/console/constructor:342:14)
    at console.log (node:internal/console/constructor:379:61) {
  code: 'ERR_INTERNAL_ASSERTION'
}

Node.js v20.5.1
```

### Additional information

_No response_
Repository: storybook
Issue: [Bug]: ArgTypes assigns an object control to Vue events
Labels: bug,needs triage

### Describe the bug

This issue was already present in older versions of Storybook with both vue 2 and vue 3. 

If a component has an event emitter, that even shows on the Controls table with an object control. My understanding is that it shouldn't show any control.

<img width="576" alt="image" src="https://github.com/storybookjs/storybook/assets/104721/aa7bc2c6-97b0-4362-a875-231abbd013ae">


### To Reproduce

The Storybook + Vue template on stackblitz already shows this behavior on the button component: https://stackblitz.com/github/storybookjs/sandboxes/tree/next/vue3-vite/default-js/after-storybook?file=README.md



### System

```shell
Environment Info:

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 16.20.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
  npmPackages:
    @storybook/addon-essentials: ^7.3.0-alpha.0 => 7.3.0-alpha.0 
    @storybook/addon-interactions: ^7.3.0-alpha.0 => 7.3.0-alpha.0 
    @storybook/addon-links: ^7.3.0-alpha.0 => 7.3.0-alpha.0 
    @storybook/blocks: ^7.3.0-alpha.0 => 7.3.0-alpha.0 
    @storybook/testing-library: ^0.2.0 => 0.2.0 
    @storybook/vue3: ^7.3.0-alpha.0 => 7.3.0-alpha.0 
    @storybook/vue3-vite: ^7.3.0-alpha.0 => 7.3.0-alpha.0
```


### Additional context

Old issue describing the same problem: 
- https://github.com/storybookjs/storybook/issues/18953
Repository: go
Issue: crypto/tls: QUICConn.SendSessionTicket should check Config.SessionTicketsDisabled
Labels: NeedsFix

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.21.0 darwin/arm64
</pre>

### Does this issue reproduce with the latest release?

Yes


### What did you do?

When `QUICConn.SendSessionTicket` is called even though `Config.SessionTicketsDisabled` is set, an error is returned ("session ticket keys unavailable").

Now one could argue that the QUIC stack do that check before calling `SendSessionTicket` (and that's what [quic-go does](https://github.com/quic-go/quic-go/blob/v0.37.4/internal/handshake/crypto_setup.go#L358-L361)), however, the QUIC stack won't have access to the `tls.Config` used on the connection if it is a config returned by `GetConfigForClient` (unless the QUIC stack wraps that callback and keeps track of the invocations, which would be quite a bit of complexity).

### What did you expect to see?

Instead, it would be easy for crypto/tls to check the `Config.SessionTicketsDisabled` flag on the config that's in use on the connection. 

API-wise, there are two options here:
1. return `nil`
2. return a sentinel error

No strong preference in either direction.

cc @neild @FiloSottile
Repository: flutter
Issue: DatePicker can overflow when `initialEntryMode` is `DatePickerEntryMode.input` in landscape
Labels: framework,f: material design,f: date/time picker,a: tablet,P2,team-design,triaged-design

### 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)

### Steps to reproduce

DatePicker dialog overflow when 
```dart
 initialEntryMode=DatePickerEntryMode.input,
```
in landscape orientation.

### Expected results

DatePicker dialog should be scrolling like in TimePicker when showing keyboard.

### Actual results

DatePicker dialog overflow when 
```dart
 initialEntryMode=DatePickerEntryMode.input,
```
in landscape orientation.

### Code sample

<details><summary>Code sample</summary>

```dart
 await showDatePicker(
                  context: context,
                  initialDate: dateValue ?? DateTime.now(),
                  firstDate: DateTime(2020),
                  lastDate: DateTime.now().add(Duration(days: 400)),
                  initialEntryMode: DatePickerEntryMode.input,
                  helpText: label,
                  fieldLabelText: label)
```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

![Screenshot_2023-08-15-06-54-07-239](https://github.com/flutter/flutter/assets/38154967/8f7f4c0a-f831-4e43-a0eb-8d57bde96748)
![Screenshot_2023-08-15-06-54-18-366](https://github.com/flutter/flutter/assets/38154967/6d8b8160-97f4-444d-977b-ded4a864ad25)


</details>



### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.10.0, on Microsoft Windows [Version 10.0.19043.1526], locale en-US)

```

</details>
Repository: go
Issue: proposal: reflect: back out multiple keys in key:value pair in struct tag
Labels: Proposal

<!--
Our proposal process is documented here:
https://go.dev/s/proposal-process
-->

Proposal #40281 was once accepted in Go1.16, but was reverted due to [breaking changing](https://github.com/golang/go/issues/40281#issuecomment-746758247) found.

Now we have [new features to improve compatibility](https://go.dev/blog/compat). So it would be time to try again.

cc @scorsi
Repository: next.js
Issue: Client-side navigation not working for SSG pages using generateStaticParams out to other pages (SSG/SSR/etc).
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro
    Binaries:
      Node: 18.17.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.16-canary.1
      eslint-config-next: 13.4.16
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: N/A
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App Router

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/WilsonPhooYK/nextjs-routing

### To Reproduce

1. Go to the deployed website at [https://nextjs-routing-nu.vercel.app/en](url)
2. Open the developer console.
3. Perform client-side navigation by pressing one of the page hyperlinks.
4. Watch the console for multiple `SHOULD ONLY MOUNT 1 TIME!` logs as it does a full reload instead of client-side rendering.

### Describe the Bug

The setup is simple. I have a layout under a dynamic route. Inside of it is a memoized client component that does not take in props.
![image](https://github.com/vercel/next.js/assets/83743898/9f30f44a-4948-4eb3-a9c0-8a1327c4673e)
![image](https://github.com/vercel/next.js/assets/83743898/7c7e3670-d2fe-48f4-96d3-ab2de6e38541)

The pages and rendered using generateStaticParams to parse the language for the page to make is SSG.
![image](https://github.com/vercel/next.js/assets/83743898/03990fe6-5664-47ea-9b94-f181c359972e)

However, running client-side rendering on these pages forces a full reload, as seen from the client side, which keeps on remounting.
![image](https://github.com/vercel/next.js/assets/83743898/7d5b8c9e-058e-4974-9296-89c5364f01d3)

This effect is devastating in real projects as all my global states and variables are destroyed when still navigating under the same layout parent.

This happens on a production build.

### Expected Behavior

Using client-side navigation, `Link` from `next/link` or `router.push` from `next/navigation`, should never force a full reload on the `Layout` if the target path is a local path even when they are SSG pages using `generateStaticParams`.

### Which browser are you using? (if relevant)

Chrome Version 115.0.5790.171 (Official Build) (64-bit)

### How are you deploying your application? (if relevant)

Vercel
Repository: material-ui
Issue: [icons] Include new twitter icon X
Labels: new feature,package: icons

### Summary 💡

The current twitter icon available under MUI is the old logo

### Examples 🌈

The current twitter icon available under MUI is the old logo
`TwitterIcon from '@mui/icons-material/Twitter';`


### Motivation 🔦

The current twitter icon available under MUI is the old logo