sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: x/sys/unix: add AppendSocketControlMessage
Labels: Proposal,compiler/runtime

### Proposal Details

I propose adding this function to `golang.org/x/net/sys/unix`:


```
// AppendSocketControlMessage appends a single socket control message to b,
// returning a new slice and the subslice of the message data.
func AppendSocketControlMessage(b []byte, level, typ int32, size int) (_, data []byte) {
        off := len(b)
        b = append(b, make([]byte, unix.CmsgSpace(size))...)
        h := (*unix.Cmsghdr)(unsafe.Pointer(&b[off]))
        h.Level = level
        h.Type = typ
        h.SetLen(unix.CmsgLen(size))
        return b, b[off+unix.CmsgSpace(0):][:size]
}
```

Sample usage:

```
var control []byte
control, data = AppendSocketControlMessage(control, unix.IPPROTO_IP, unix.IP_TOS)
data[0] = 0b000000_01 // set ECN field to ECT1
conn.WriteMessageUDPAddrPort(datagram, control, address)
```

----

Background and motivation:

The [`golang.org/x/net/sys/unix.ParseOneSocketControlMessage`](https://pkg.go.dev/golang.org/x/sys/unix#ParseOneSocketControlMessage) function parses a socket [control message](https://man7.org/linux/man-pages/man3/cmsg.3.html).

The `unix` package contains functions that can be used to create specific control messages, such as [unix.PktInfo4](https://pkg.go.dev/golang.org/x/sys/unix#PktInfo4). There are also functions which can be used to construct a control message, but they are ill-documented and cumbersome to use. For example, the implementation of `PktInfo4` is:

```
func PktInfo4(info *Inet4Pktinfo) []byte {
        b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
        h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
        h.Level = SOL_IP
        h.Type = IP_PKTINFO
        h.SetLen(CmsgLen(SizeofInet4Pktinfo))
        *(*Inet4Pktinfo)(h.data(0)) = *info
        return b
}
```

Note that this uses the unexported function `Cmsghdr.data`. One can achieve the same effect with exported functions (`unix.CmsgSpace(0)` will give the offset to the data section), but there is still no convenient inverse to `ParseOneSocketControlMessage`.

`AppendSocketControlMessage` provides that inverse, giving a simple way to construct control messages for use with `sendmsg`.

As another example of usage, `PktInfo4` rewritten in terms of `AppendSocketControlMessage`:

```
func PktInfo4(info *Inet4Pktinfo) []byte {
        b, data := AppendSocketControlMessage(nil, SOL_IP, IP_PKTINFO, SizeofInet4Pktinfo)
        *(*Inet4Pktinfo)(unsafe.Pointer(&data[0])) = *info
        return b
}
```
Repository: stable-diffusion-webui
Issue: [Feature Request]: Documentation
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Install stable-diffusion-webui with latest Torch/CUDA.

The install instructions for stable-diffusion-webui invite NVidia users to visit
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs

This is all fine and okay. But running the the `webui.sh` script in a fresh venv as instructed installs torch==2.0.1, which wants old CUDA 11.8, and downloads a lot of extra stuff for that. Which leads to endless problems with downloading old drivers, parallel installs of old CUDA, pickling and unpickling different sets of environment variables, and other unsupported stuff we don't really need. Not to mention all the extra support requests that generates.

Almost everybody is using Torch 2.3.0.x/CUDA 12.x now. And they work work absolutely fine with stable-diffusion-webui. There's no need to download and install all that old material!

### Proposed workflow

First, make sure you have a `gcc-12` compiler and toolchain set up. I used `conda` for this. Many Linux distros are on `gcc13`+ now. Users lured here for glamor of AI, who have no experience with pip, do not realize it invokes a compiler. And `gcc-13` tosses in some hot patches for `glibc` that just won't work for building against CUDA (which has already implemented its own conflicting fixes). TL-DR. Just get CC to point to `gcc-12` somehow.

```export CC=/my/gcc-12/gcc```

Then install python 3.10 and set it up in the `venv` environment inside the stable-diffusion-webui folder. I used 

```
virtualenv venv --python=python3.10
. venv/bin/activate
```

Now, install torch nightly from https://pytorch.org/get-started/locally/ . We can even `pip install xformers` .

`pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121`
 If you already have cached packages from another venv, it will use those. 

Finally, run `webui.sh`. It will see a better version of torch is already installed. And everything works perfectly.

### Additional information

That's it! The installer works. It pops up a web page on http://127.0.0.1:7860/ as expected.

And we are go for launch.
Repository: godot
Issue: Subsurface scattering causes ghosting on nearby objects, worse with 4.3 master.
Labels: bug,topic:rendering,needs testing,topic:3d

### Tested versions

4.3 dev [8ff821670561466a5ff72044ad574dcb955b66c2]

### System information

Windows 11 - Vulkan - Nvidia RTX 4070 - intel i5 13600KF

### Issue description

Subsurface scattering can cause ghosting.

~~For some reason the bluring causes ghosting, at highest quality settings it's the worst. The objects in question are near the camera and the far distance is set to over 20 units but the DOF distance itself doesn't matter.
I set up settings up such as glow and autoexposure to make it better visible, it happens without it too but depending on the background color it might be difficult to see, TAA makes it flash a lot constantly which makes it even worse - change values in camera attributes in exposure, particularly scale and speed and some other to make it flash like crazy to see if you have torubles).~~

**Some regression perhaps?**
This was already happening in 4.2.1 but it got worse in 4.3, both occurences are annoying.

(Screenshots are scaled up to show where the issue is clearly - around cpasule and the other shapes - my project itself is at full hd so it's not a low res issue, it's also just as visible at larger res as it is in these screens)

**4.2.1:**
![image](https://github.com/godotengine/godot/assets/33526847/5ebd7c59-71c5-4351-ae3e-5873de8c78f5)

**4.3 master images:**
![image](https://github.com/godotengine/godot/assets/33526847/64a3b16c-9101-4d89-9526-5a7673624cd4)
![image](https://github.com/godotengine/godot/assets/33526847/8d499537-ee57-479a-950b-bf0ddd967e99)
(second image is from the MRP, the other are from my project)

Ghosting in video (I zoomed in a bit to make it easier to see around the capsuleand the red mesh but it's just as visible from distance too I only wanted to isolate this part of the video to make it clear what I'm talking about.):
https://youtu.be/SrBSVaI9QxE

It flashes with TAA enabled a lot in 4.3 (not sure if this is expected or if it's a bug and should be here or in a separate report?):
https://youtu.be/XUSraUwzzmc

Lower quality blur settings help (I assume it's still happening but on a such a smaller scale it's not easily visible in my test cases?)

One last note, the ghosting happens even before the far objects start getting blurred, I'd expect it to work the other way around that the closer the blur distance gets to the capsule the more likely the issue would happen but nah first the ghosting and then eventually the distance objects get blurred as I increase the blur distance.

### Steps to reproduce

1. Open the MRP and check the camera preview.
2. Play with camera attributes - blur distance, auto exposure settings.
3. Enable/disable TAA.

### Minimal reproduction project (MRP)

[BlurTest.zip](https://github.com/godotengine/godot/files/14320180/BlurTest.zip)
Repository: next.js
Issue: Cannot use CommonJS packages in PNPM workspace
Labels: bug,Module Resolution

### Link to the code that reproduces this issue

https://github.com/disintegrator/nextjs-workspace-js

### To Reproduce

1. Clone this repository
2. Run `pnpm install`
3. On the main branch, run `pnpm dev` and go to http://localhost:3000 to see the app working.
4. Stop the development server.
5. Run `git checkout broken`
6. Run `pnpm dev` and go to http://localhost:3000 and the error thrown:
   ```
   ../../packages/monorepo-sdk/index.js
   Module parse failed: Cannot use 'import.meta' outside a module (60:16)
   |                 // still a Refresh Boundary later.
   |                 // @ts-ignore importMeta is replaced in the loader
   >                 import.meta.webpackHot.accept();
   |                 // This field is set when the previous version of this module was a
   |                 // Refresh Boundary, letting us know we need to check for invalidation or
   ```

### Current vs. Expected behavior

On the `main` branch of this repository, the Next.js app uses `@disintegrator/httpbin-client` to generate UUIDs using https://httpbin.org/uuid and everything works as expected.

On the `broken` branch of this repository, the Next.js app uses the workspace package `monorepo-sdk` to generate UUIDs using https://httpbin.org/uuid but it will not render the page and instead throw the error above.

**I expect the Next.js app to treat the workspace package the exact same way as the NPM package and load the page successfully.**


### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: arm64
  Version: #104-Ubuntu SMP Tue Jan 9 15:26:57 UTC 2024
Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: N/A
  pnpm: 8.15.3
Relevant Packages:
  next: 14.1.0
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router, Module resolution (CJS / ESM, module resolving)

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

This bug appears to have been introduced in `next@14.0.2-canary.1`
Repository: next.js
Issue: fastapi streaming response is not decoded in chunks with compression enabled
Labels: bug

### Link to the code that reproduces this issue

https://github.com/HP2706/nextjs_streaming_bug

### To Reproduce

to reproduce run npm run dev from root of the project 
preferably use an virtual environment with Python 3.9.18

next click on the "stream" button
about 10 seconds later the number 1 .. 10 will appear on the screen
next to next.config.mjs and uncomment compression : false
now reload and click again.
this time the numbers will actually be stream as expected from the fastapi endpoint



### Current vs. Expected behavior

i would expect  the client to receive the streamingResponse from fastapi in chunks and not all at once even  even without explicitly disabling compression

### Provide environment information

```bash
Node : v21.5.0
os : darwin 23.2.0
Python : 3.9.18
fastapi : 0.100.1
uvicorn :0.23.2
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Vercel (Deployed)

### Additional context

_No response_
Repository: PowerToys
Issue: Cannot disable SVG thumbnail preview
Labels: Issue-Bug,Product-File Explorer,Needs-Triage

### Microsoft PowerToys version

0.75.1

### Installation method

Microsoft Store

### Running as admin

No

### Area(s) with issue?

File Explorer: Thumbnail preview

### Steps to reproduce

1. Open Powertoys settings
2. Disable SVG preview
3. Disable SVG thumbnails
4. Reboot

### ✔️ Expected Behavior

1. No SVG preview in preview pane
2. No SVG thumbnails

### ❌ Actual Behavior

1. No SVG preview in preview pane
2. But still showing SVG thumbnails

### Other Software

_No response_
Repository: PowerToys
Issue: PowerToys Memory Leak
Labels: Issue-Bug,Product-PowerToys Run,Needs-Triage

### Microsoft PowerToys version

0.78.0

### Installation method

PowerToys auto-update, WinGet

### Running as admin

No

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

- Used PowerToys as a normal
- Around 30-45 minutes of use Memory usages spikes and stays high 

### ✔️ Expected Behavior

- Able to open settings
- Low memory usage.

### ❌ Actual Behavior

- The settings page is a black page
- High memory usage 

### Other Software

[PowerToysReport_2024-02-17-20-21-19.zip](https://github.com/microsoft/PowerToys/files/14320380/PowerToysReport_2024-02-17-20-21-19.zip)
<img width="643" alt="image" src="https://github.com/microsoft/PowerToys/assets/44588781/340b3845-fb12-4744-bf34-a856f26fd647">
<img width="1128" alt="image" src="https://github.com/microsoft/PowerToys/assets/44588781/876b2f54-29d7-4920-93af-daeaba9b7265">
Repository: tensorflow
Issue: v2.15.0 docker image print error messages like "Unable to register cuDNN/cuFFT... factory "
Labels: stat:awaiting tensorflower,type:bug,type:build/install,subtype: ubuntu/linux,TF 2.15

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

binary

### TensorFlow version

2.15.0

### Custom code

No

### OS platform and distribution

ubuntu 18.04

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

```
$ docker pull tensorflow/tensorflow:2.15.0-gpu
$ docker run -it --gpus all tensorflow/tensorflow:2.15.0-gpu
$import tensorflow as tf
2024-02-18 02:43:26.283147: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-02-18 02:43:26.283204: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-02-18 02:43:26.283926: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-02-18 02:43:26.289011: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
>>> print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
Num GPUs Available:  8
```

I tried some examples and it worked. But why this error messages show?

### Standalone code to reproduce the issue

```shell
Ubuntu 18.04 nvidia-driver 535.104.12
```


### Relevant log output

_No response_
Repository: pytorch
Issue: QAT using pytorch-quantization cause accuracy loss after exporting to onnx
Labels: module: onnx,oncall: quantization

### 🐛 Describe the bug

I use pytorch-quantization to do QAT for a pointpillar model, it works fine during pytorch training, however, when I export the torch model to onnx, accuracy degrades badly. In my opinion, this process should have no loss of accuracy at all.

I report this issue against TRT repo, the developer assigned thinks that should be a bug of pytorch.
https://github.com/NVIDIA/TensorRT/issues/3654

![image](https://github.com/pytorch/pytorch/assets/127090509/1b24e124-4fd5-4fdf-a229-34e4d72c65c9)

### Versions

TensorRT Version:
8.5.2
NVIDIA GPU:
RTX3060
NVIDIA Driver Version:
470.161.03
CUDA Version:
11.3
CUDNN Version:
8.6

Operating System:
Ubuntu 20.04
Python Version (if applicable):
3.8
PyTorch Version (if applicable):
1..11
pytorch-quantization:
2.1.2

cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel
Repository: deno
Issue: `deno fmt` breaks list of objects in the middle of an object
Labels: bug,upstream,deno fmt

For a list of objects, Deno applies the following formatting:

```ts
  const fpnMembershipTitles = [{ name: "FPN" }, { name: "FPN Class" }, {
    name: "Type",
  }, { name: "Description" }];
```

It breaks the line in the middle of an object, which doesn't make much sense. This formatting gets reapplied even if I delete line breaks and trailing commas. The following would be much better:

```ts
  const fpnMembershipTitles = [
    { name: "FPN" },
    { name: "FPN Class" },
    { name: "Type" },
    { name: "Description" },
  ];
```

No specific format configuration outside of excluded files. 

deno 1.40.3 (release, aarch64-apple-darwin)
v8 12.1.285.6
typescript 5.3.3
Repository: godot
Issue: Ghost collisions with CharacterBody3D (CylinderShape3D) against StaticBody3D (ConcavePolygonShape3D)
Labels: bug,topic:physics,topic:3d

### Tested versions

Reproducible in v4.2.1.stable.mono.official [b09f793f5]

### System information

Godot v4.2.1.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon (TM) R9 390 Series (Advanced Micro Devices, Inc.; 27.20.20913.2000) - Intel(R) Core(TM) i5-4430 CPU @ 3.00GHz (4 Threads)

### Issue description

When a CharacterBody3D with CylinderShape3D collides against particular triangles on a StaticBody3D with ConcavePolygonShape3D, the collision results after invoking MoveAndSlide() and GetSlideCollision() are sometimes extremely incorrect.

The reproduction project includes an example of a CharacterBody3D on the edge of a StaticBody3D, moving only very slightly into it, which causes an extreme shift (The collision has a depth of .244, despite the cylinder only having a radius of .25. This becomes significantly more problematic if collision response is used to control character velocity)

![image](https://github.com/godotengine/godot/assets/8617121/64c4aea9-8c0c-446a-b7c7-b4de8a169e14)

### Steps to reproduce

Run the example project. The CharacterBody3D is moving into the StaticBody3D at a very low speed, but the collision depth+normal pushes it extremely far to the left, as displayed through the console logs.

### Minimal reproduction project (MRP)

[CollisionDepthIssue.zip](https://github.com/godotengine/godot/files/14321177/CollisionDepthIssue.zip)
Repository: next.js
Issue: `redirect()` inside Server Actions doesn't work with the same domain
Labels: bug,Navigation,linear: next

### Link to the code that reproduces this issue

https://github.com/steven-tey/server-action-redirect-bug

### To Reproduce

Go to https://server-action-redirect-bug.vercel.app/, type in any password and click "Log In". You'll see the URL change to have the `?pw=` query param:

![CleanShot 2024-02-17 at 20 53 07](https://github.com/vercel/next.js/assets/28986134/0f1ebf40-4134-4169-9ce2-5dd8683a6c87)

However, this is incorrect since we have a middleware that says if there's a `pw` query param, redirect to `https://dub.co`. Refreshing the page fixes this.

### Current vs. Expected behavior

Current: `redirect()` does a "soft" redirect and doesn't actually refresh the router
Expected: `redirect()` triggers a router refresh and redirects to the final URL (`https://dub.co`) (as per the [docs](https://nextjs.org/docs/app/api-reference/functions/redirect#client-component))

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6000
Binaries:
  Node: 20.9.0
  npm: 10.2.4
  Yarn: 1.22.21
  pnpm: 8.10.5
Relevant Packages:
  next: 14.1.1-canary.59 // Latest available version is detected (14.1.1-canary.59).
  eslint-config-next: 14.1.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router, Routing (next/router, next/navigation, next/link)

### Which stage(s) are affected? (Select all that apply)

next dev (local), Vercel (Deployed)

### Additional context

This used to work before `next@14.1.1` I believe

<sub>[NEXT-2840](https://linear.app/vercel/issue/NEXT-2840/redirect-inside-server-actions-doesnt-work-with-the-same-domain)</sub>
Repository: stable-diffusion-webui
Issue: [Feature Request]: amd gpu detections
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

webui.sh can detect correct amd gpu and set HSA_OVERRIDE_GFX_VERSION and TORCH_COMMAND accordingly

### Proposed workflow

```bash
# Check if lspci command is available
if ! command -v lspci &> /dev/null; then
    echo "lspci command not found. Please make sure it is installed."
    exit 1
fi

# Use lspci to list PCI devices and grep for VGA compatible controller
gpu_brand=$(lspci | grep "VGA compatible controller")
# Check the GPU company
if [[ $gpu_brand == *AMD* ]]; then
    echo "AMD GPU detected."
    
    # Check if rocminfo is installed
    if ! command -v rocminfo &> /dev/null; then
        echo "Error: rocminfo is not installed. Please install ROCm and try again."
        exit 1
    fi

    # Get GPU information using rocminfo
    rocm_info=$(rocminfo)

    # Extract GPU identifier (gfx part) from rocminfo output
    gpu_info=$(echo "$rocm_info" | awk '/^Agent 2/,/^$/ {if ($1 == "Name:" && $2 ~ /^gfx/) {gsub("AMD", "", $2); print $2; exit}}')

    # Define officially supported GPU versions
    supported_versions="gfx900 gfx906 gfx908 gfx90a gfx942 gfx1030 gfx1100"
    # Check if the extracted gfx_version is in the list of supported versions
    if echo "$supported_versions" | grep -qw "$gpu_info"; then
        echo "AMD $gpu_info is officially supported by ROCm."
        export TORCH_COMMAND="pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm5.7"
    else
        if [[ $gpu_info == gfx9* ]]; then
            export HSA_OVERRIDE_GFX_VERSION=9.0.0
            export TORCH_COMMAND="pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 --index-url https://download.pytorch.org/whl/rocm5.2"
            printf "\n%s\n" "${delimiter}"
            printf "Experimental support gfx9 series: make sure to have at least 4GB of VRAM and 10GB of RAM or enable cpu mode: --use-cpu all --no-half"
            printf "\n%s\n" "${delimiter}"
        elif [[ $gpu_info == gfx10* ]]; then
            export HSA_OVERRIDE_GFX_VERSION=10.3.0
            export TORCH_COMMAND="pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm5.7"
        elif [[ $gpu_info == gfx11* ]]; then
            export HSA_OVERRIDE_GFX_VERSION=11.0.0
            export TORCH_COMMAND="pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/rocm6.0"
        fi
    fi
    if echo "$gpu_info" | grep -q "Huawei"; then
        export TORCH_COMMAND="pip install torch==2.1.0 torchvision --index-url https://download.pytorch.org/whl/cpu; pip install torch_npu"
    fi

elif [[ $gpu_brand == *NVIDIA* ]]; then
    echo "NVIDIA GPU detected."
else
    echo "Unable to identify GPU manufacturer."
    exit 1
fi
```

### Additional information

_No response_