sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: node
Issue: High cpu usage and traffic when using windows named pipes
Labels: windows

### Version

v21.6.2

### Platform

Microsoft Windows NT 10.0.22631.0 x64

### Subsystem

_No response_

### What steps will reproduce the bug?

When using the following code snippet in a Node.js project, high CPU usage and traffic are observed, possibly due to extensive sending of FSCTL_PIPE_PEAK.

```javascript
import net from 'net';
import fs from 'fs';

var PIPE_NAME = "my_pipe";
var PIPE_PATH = "\\\\.\\pipe\\" + PIPE_NAME;

var server = net.createServer(function(stream) {
    console.log('Server: on connection')

    stream.on('data', function(c) {
        console.log('Server: on data:', c.toString());
    });
});

server.listen({path: PIPE_PATH, readableAll: true, writableAll: true, exclusive:true},function(){
    console.log('Server: on listening');
})

var PIPE_CLIENT_PATH = "\\\\127.0.0.1\\pipe\\" + PIPE_NAME;

fs.open(PIPE_CLIENT_PATH, fs.constants.O_RDWR | fs.constants.O_NONBLOCK, (err, fd) => {
    const pipe = new net.Socket({fd, readable: true});
    pipe.on('data', data => {
        console.log('Received:', data);
    });
});
```

### How often does it reproduce? Is there a required condition?

- Include the provided code snippet in a Node.js project.
- Run the project and observe the CPU usage and network traffic.

### What is the expected behavior? Why is that the expected behavior?

The code should not result in high CPU usage and excessive traffic.

### What do you see instead?

## Captured Traffic Details

### One captured pipe request
| No.  | Time  | Source  | Destination  | Protocol | Length | Info | Port |
|---|---|---|---|---|---|---|---|
| 17 | 0.000381 | 127.0.0.1 | 127.0.0.1 | SMB2 | 168 | Ioctl Request FSCTL_PIPE_PEEK | 445|
| 18 | 0.000402 | 127.0.0.1 | 127.0.0.1 | TCP | 44 | 445 → 59368 [ACK] Seq=529 Ack=621 Win=8369 Len=0 | 59368 |
...

### Snipped of Wireshark captured traffic
![obrazek](https://github.com/nodejs/node/assets/45627241/b0f32c29-aa37-4083-971d-464b8f3a2057)

### Observed high cpu usage and operation traffic
![bc4S](https://github.com/nodejs/node/assets/45627241/669a181a-a086-41b3-be86-2c081af7f6a6)


### Additional information

Our current implementation involves opening multiple connections to a pipe, leading to a notable strain on server resources. This, in turn, results in increased CPU usage and network traffic. We are actively looking for ideas and suggestions on how to address this issue or any potential workarounds. If you have any insights or recommendations, please share them below. Your input is highly appreciated!
Repository: ollama
Issue: Ollama only using half of available CPU cores with NUMA multi-socket systems
Labels: bug,linux,performance

I just test using only cpu to lanch LLMs，however it only takes 4cpu busy 100% of the vmware, others still 0%
Repository: react
Issue: Bug: onBlur is not firing in IOS Chrome when trigger done button
Labels: Status: Unconfirmed

### Version
- react: 18.2.0
- react-dom: 18.2.0
- test device version: Iphone X(IOS 16.3)

### Sample Code
- https://github.com/youryu0212/react-blur-error

### Expectation
- Clicking the DONE button on the IOS keyboard, I expected the blur to be triggered by losing focus on the html Input Element.

### Result
- The onBlur event is not fired.

### Detailed description:
- After the done button on the keypad was clicked, the html was blurred but react's onBlur was not fired
- If you apply blur as a native event instead of react onBlur, it works fine.
- IOS, Android Other Browsers onBlur was fine.

https://github.com/youryu0212/react-blur-sample/assets/87521172/517787aa-4856-4eb4-a416-eb0c8db3a62d
https://github.com/youryu0212/react-blur-sample/assets/87521172/71ff622b-e982-4bcc-98c3-fd25b17aef3e

### The current behavior
- Clicking the DONE button on the IOS keyboard, The onBlur event is not fired.
### The expected behavior
- Clicking the DONE button on the IOS keyboard, The onBlur event is fired.
Repository: pytorch
Issue: torch compile does not improve the torchscript model
Labels: needs reproduction,module: performance,triaged,oncall: pt2

### 🐛 Describe the bug

I hava a pytorch model,

model = ....
ts_model = torch.jit.script(model)

compiled_model = torch.compile(model)
compiled_ts_model = torch.compile(ts_model)

comparing the performance of ts_model, compiled_model and compiled_ts_model, we found that the performance of ts_model and compiled_ts_model are almost the same, and compiled_model performs better than them all.


### Versions

torch                     2.1.0
torchvision               0.16.0

cc @msaroufim @ezyang @chauhang @penguinwu @bdhirsh @anijain2305 @zou3519
Repository: pytorch
Issue: Build torch From Source is failed on Mac, maybe caused by protobuf
Labels: module: build,triaged,module: third_party

### 🐛 Describe the bug

I've tried to build pytorch (v2.2.1) from source to study the source code. However, I was constantly frustrated at the end of  compiling `torch/csrc`, with errors hinting something wrong with onnx/proto. I have found similar error in issue #25580 , but don't know how to fix it.

My logging file uploaded as: 
[install.log](https://github.com/pytorch/pytorch/files/14493308/install.log)


### Versions

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: macOS 12.7.2 (x86_64)
GCC version: Could not collect
Clang version: 14.0.0 (clang-1400.0.29.202)
CMake version: version 3.22.0
Libc version: N/A

Python version: 3.10.0 (default, Mar  3 2022, 03:57:21) [Clang 12.0.0 ] (64-bit runtime)
Python platform: macOS-10.16-x86_64-i386-64bit
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

CPU:
Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] optree==0.10.0
[conda] mkl                       2023.1.0         h8e150cf_43560    defaults
[conda] mkl-include               2023.1.0         hecd8cb5_43560    defaults
[conda] numpy                     1.26.4                   pypi_0    pypi
[conda] optree                    0.10.0                   pypi_0    pypi

cc @malfet @seemethere
Repository: fastapi
Issue: Breaking change with path parameters when updating to pydantic>=2 from pydantic<2
Labels: question

### Discussed in https://github.com/tiangolo/fastapi/discussions/11250

<div type='discussions-op-text'>

<sup>Originally posted by **ThirVondukr** March  5, 2024</sup>
### First Check

- [X] I added a very descriptive title here.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I searched the FastAPI documentation, with the integrated search.
- [X] I already searched in Google "How to X in FastAPI" and didn't find any information.
- [X] I already read and followed all the tutorial in the docs and didn't find an answer.
- [X] I already checked if it is not related to FastAPI but to [Pydantic](https://github.com/pydantic/pydantic).
- [X] I already checked if it is not related to FastAPI but to [Swagger UI](https://github.com/swagger-api/swagger-ui).
- [X] I already checked if it is not related to FastAPI but to [ReDoc](https://github.com/Redocly/redoc).

### Commit to Help

- [X] I commit to help with one of those options 👆

### Example Code

```python
from uuid import UUID

from fastapi import FastAPI

app = FastAPI()


@app.get("/int/{path}")
async def int_(path: int | str):
    return str(type(path))


@app.get("/uuid/{path}")
async def uuid_(path: UUID | str):
    return str(type(path))
```


### Description

With pydantic<2 parameters are correctly parsed as int and UUID if an appropriate string is passed, with pydantic 2 they're always interpreted as str, I presume this will work the same way with all other types that you can pass into path parameters.
I also observed the same behavior with query, so I assume it behaves the same way with all FastAPI parameters (headers, body, etc).

### Operating System

Windows

### Operating System Details

_No response_

### FastAPI Version

0.110.0

### Pydantic Version

1.10.14 / 2.6.3

### Python Version

Python 3.11.5

### Additional Context

_No response_</div>
Repository: PowerToys
Issue: Change action of update notification "see more" button
Labels: Idea-Enhancement,Product-Settings,Issue-DCR,Priority-2

### Microsoft PowerToys version

0.78

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

General

### Steps to reproduce

1. Wait until a windows notification about a new version update pops up
2. Click the "See more" button
3. It just opens the Powertoys settings

### ✔️ Expected Behavior

If I click the "see more" button I expect it to open the changelog page with information about the update

### ❌ Actual Behavior

it brings me to the powertoys settings page, where I have to click in the upper-left update item to jump to the update page, then click on "see what's new" to finally open the changelog.

Instead of what's supposed to be a single click to "see more", you now have to perform 3 different steps to finally get the same result.

### Other Software

_No response_
Repository: stable-diffusion-webui
Issue: [Bug]: Webui fails to open on Steam Deck OLed
Labels: asking-for-help-with-local-system-issues

### Checklist

- [x] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

On steam deck when running webui.sh it says it fails to open python venv.

### Steps to reproduce the problem

1. Install normally for arch linux, up to step 3.
2. Try running webui.sh

### What should have happened?

Webui should work as intended and the command shouldn't produce an error.

### What browsers do you use to access the UI ?

Brave

### Sysinfo

I can't access webui.

### Console logs

```Shell
(1)(deck@steamdeck A1111)$ sh webui.sh

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on deck user
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
ERROR: Cannot activate python venv, aborting...
################################################################
(1)(deck@steamdeck A1111)$
```


### Additional information

I am running this on a Steam Deck OLed.
Repository: transformers
Issue: Add a warning when the dataset has no matching columns
Labels: Feature request

### Feature request

Currently, when a user provides a dataset to `Trainer` without any columns matching the parameters of the `model.forward` method, an `IndexError` is raised without any accompanying warning or logs to aid the user in understanding this behavior. This lack of feedback can lead to confusion and increased debugging time, as experienced and discussed in [this thread](https://discuss.huggingface.co/t/trainers-dataloader-influenced-by-target-model/75685).

I suggest adding a warning log when such a scenario occurs. Additionally, considering whether directly raising an error could be an option might be beneficial. However, it's important to consider cases where a user could intentionally provides a dataset with no matching columns.

### Motivation

As a user, I wasn't initially aware that columns not accepted by the `model.forward()` method are automatically removed during the creation of the dataloader. Consequently, I spent several hours debugging my dataloader, model, and dataset without understanding why I kept receiving an `IndexError`. Implementing a warning log could potentially save users from similar debugging efforts in the future.

### Your contribution

I'm ready to create a pull request! :D
Repository: storybook
Issue: [Bug]: Storybook build showing infinite spinner when 'vite' package is at '5.1.x' only on Docker
Labels: bug,help wanted,compatibility with other tools

### Describe the bug

In our in house storybook implementation we use storybook-vite for our vue components. We have a bot to bump package versions whenever a new one is available. We built our storybook UI and deploy the static site in our internal cloud using Docker. 

In the build asset `iframe.html`, there is a line in `<head>` which looks like following,
```
<script type="module" crossorigin src="./assets/iframe-[HASH].js"></script>
```

This particular line is missing inside Docker container assets but on my machine that line is getting injected correctly.

Because of this missing line inside Docker container, the storybook is not able to render story files hence showing an infinite loader as shown below.

<img width="1011" alt="Screenshot 2024-03-05 at 17 09 45" src="https://github.com/storybookjs/storybook/assets/116878963/7f8684aa-6362-44b7-a9b1-f84e2aa278e8">


### To Reproduce

Make sure along with storybook you have vite package at ">5.1.x"

In your Dockerfile

```
FROM node:21.4.0-alpine3.17 AS builder

COPY package.json pnpm-lock.yaml ./

RUN npm install -g pnpm && pnpm install

COPY . ./

WORKDIR /

RUN pnpm run build:storybook

FROM node:21.4.0-alpine3.17 AS runner

RUN apk add --no-cache bash

COPY --from=builder /storybook-static ./storybook-static

COPY bin/entrypoints/server.sh ./bin/entrypoints/server.sh

ENTRYPOINT ["bin/entrypoints/server.sh"]

ADD server /

RUN npm install -g pnpm && pnpm install

EXPOSE 3000
```

The entry point can be replaced by any http serve setup, I had used express.

### System

```bash
System:
    OS: macOS 14.3.1
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.4.0 - ~/.node-versions/21.4.0/bin/node
    npm: 10.2.4 - ~/.node-versions/21.4.0/bin/npm
    pnpm: 8.15.4 - ~/.node-versions/21.4.0/bin/pnpm <----- active
  Browsers:
    Chrome: 122.0.6261.94
    Edge: 122.0.2365.63
    Safari: 17.3.1
  npmPackages:
    @storybook/addon-actions: ^7.6.17 => 7.6.17
    @storybook/addon-controls: ^7.6.17 => 7.6.17
    @storybook/addon-docs: ^7.6.17 => 7.6.17
    @storybook/addon-essentials: ^7.6.17 => 7.6.17
    @storybook/addon-interactions: ^7.6.17 => 7.6.17
    @storybook/addon-links: ^7.6.17 => 7.6.17
    @storybook/blocks: ^7.6.17 => 7.6.17
    @storybook/builder-vite: ^7.6.17 => 7.6.17
    @storybook/test: ^7.6.17 => 7.6.17
    @storybook/vue3: ^7.6.17 => 7.6.17
    @storybook/vue3-vite: ^7.6.17 => 7.6.17
    eslint-plugin-storybook: ^0.8.0 => 0.8.0
    storybook: ^7.6.17 => 7.6.17
```


### Additional context

_No response_
Repository: ollama
Issue: Does not using all threads on NUMA configuration (server motherboards 2, 4, 6 multisocket CPU) on Windows
Labels: bug,windows

Very old problem since 00s early Microsoft concerns `setThreadAffinity` which by default does not cover all logical processors in the system, this was fixed 20 years later only in Windows 11 and more Windows Server, but count threads is most likely incorrectly calculated. I do not know Golang, but if it were in С/C++ I would be able to help. I have already fixed this issue here before:

https://github.com/ggerganov/llama.cpp/issues/5524

https://github.com/x64dbg/x64dbg/pull/3272

https://github.com/giampaolo/psutil/issues/771

https://github.com/GermanAizek/llvm-project/commit/d1fa25f37631b8b33a71fbe9eb4ea89e3a47b723

![image](https://github.com/ollama/ollama/assets/21138600/a517d7a8-b9ba-48de-af90-488b0039474c)
Repository: pytorch
Issue: input_data.to produce inconsistent results
Labels: module: error checking,triaged,module: python frontend

### 🐛 Describe the bug

The initial vector is a float tensor containing NaN. After I convert it to int32 using `torch.Tensor.to`, it should still be NaN. I get the correct result on CPU, but on the GPU, I get 0.

For the code on CPU:
```
input_data = torch.tensor([float('nan')])
different_input = input_data.to(dtype=torch.int32)
print(different_input)
```
,we get the right result:
```
tensor([-2147483648], dtype=torch.int32)
```

For the code on GPU:
```
input_data = torch.tensor([float('nan')]).cuda()
different_input = input_data.to(dtype=torch.int32)
print(different_input)
```
,we get the wrong result:
```
tensor([0], device='cuda:0', dtype=torch.int32)
```

### Versions

Versions of relevant libraries:
[pip3] numpy==1.24.4
[pip3] torch==2.2.1
[pip3] triton==2.2.0
[conda] numpy 1.24.4 pypi_0 pypi
[conda] torch 2.2.1 pypi_0 pypi
[conda] triton 2.2.0 pypi_0 pypi

cc @malfet @albanD
Repository: go
Issue: x/tools/godoc/vcs/zipfs: `New` can't be called with a `*zip.Reader`
Labels: NeedsInvestigation,Tools

### Go version

go version go1.22.0 darwin/arm64

### Output of `go env` in your module/workspace:

```shell
GO111MODULE='auto'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/richardcrovern/Library/Caches/go-build'
GOENV='/Users/richardcrovern/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/richardcrovern/pkg/mod'
GONOPROXY='github.com/monzo'
GONOSUMDB='github.com/monzo'
GOOS='darwin'
GOPATH='/Users/richardcrovern'
GOPRIVATE='github.com/monzo'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.22.0/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD=''
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/ds/9nyxj91138s74kvd12pgpjbc0000gn/T/go-build3692657355=/tmp/go-build -gno-record-gcc-switches -fno-common'
```


### What did you do?

Construct a `zip.ReadCloser` from an `io.ReaderAt` suitable for use with `zipfs.New` from `golang.org/x/tools/godoc/vfs/zipfs` as follows:
```
zip, err := zip.NewReader(reader, size)
if err != nil {
  panic(err)
}
closableZip := &zip.ReadCloser{Reader: *zip}
```

See https://go.dev/play/p/hFPUG1CYhdH for a complete program example

### What did you see happen?

`go vet` reports the following error:
```
./prog.go:20:40: literal copies lock value from *zipReader: archive/zip.Reader contains sync.Once contains sync/atomic.Uint32 contains sync/atomic.noCopy
```

### What did you expect to see?

The finding by `go vet` is legitimate, in that a `sync.Once` is copied here, but I don't believe there is any way to construct the `zip.ReadCloser` and not get this error.
Repository: go
Issue: net/http: `(*http.Response).Cookies` have different behaviour compared with web browser
Labels: NeedsInvestigation

### Go version

go version go1.22.0 linux/amd64

### Output of `go env` in your module/workspace:

```shell
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/ii64/.cache/go-build'
GOENV='/home/ii64/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/ii64/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/ii64/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn,https://gocenter.io,https://goproxy.io,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build4219600399=/tmp/go-build -gno-record-gcc-switches'
```


### What did you do?

I was trying to get any valid cookies given in HTTP response header specifically via `Set-Cookie` header entry. https://go.dev/play/p/M8hiEzF_n97

### What did you see happen?

In the example code, the `Cookies` method exclude `utid` because it has quotation mark chars inside cookie-value. Looking at the RFC in the comment, https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1

Quotation mark `"` OR in hex 0x22 is excluded, which is already expected behaviour:
```
 set-cookie-header = "Set-Cookie:" SP set-cookie-string
 set-cookie-string = cookie-pair *( ";" SP cookie-av )
 cookie-pair       = cookie-name "=" cookie-value
 cookie-name       = token
 cookie-value      = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
 cookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
                       ; US-ASCII characters excluding CTLs,
                       ; whitespace DQUOTE, comma, semicolon,
                       ; and backslash
```

However, for web browsers that behaviour is totally fine. 

### What did you expect to see?

Interface for custom validation for valid cookies
Repository: TypeScript
Issue: Generic conditional type prematurely resolves to one of the branches instead of deferring
Labels: Needs Investigation

### 🔎 Search Terms

generic, conditional, premature / eager / defer, inline, 

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about generic conditional types 

### ⏯ Playground Link

[Playground link](https://www.typescriptlang.org/play?#code/C4TwDgpgBAkgzgOQK4FsBGEBOAeAKgPigF4oBtXAXSggA9gIA7AEzjIdQ0yoH4phMk0AFxQAZgEMANnAgAoUJFhwAYlJl5qdRiyhoA9nskRxDQiQnSIpKrXrNWua1F79BUERZmz54aABEAS0wIAGNgYiVVS2x4ZHQsbDh+AIYAc3xCW21WV2heAAZ3KABGAG5ZAHoKqBqAPW5vBWgAZQALPUxgEKRgPDNItQgYxA4Egkytez4BPKhCkTKfRRhmINDwkjaOrp7E5LT8cqqaqHrvWSA)

### 💻 Code

```ts
type IsNumber<T> = [T] extends [number] ? true : false
type IsFalse<T extends boolean> = false[] extends T[] ? true : false

type Direct = IsFalse<IsNumber<string>> extends true ? 0 : 1;
//   ^? type Direct = 0

type Shortcut<T> = IsFalse<IsNumber<T>> extends true ? 0 : 1;
type Indirect = Shortcut<string>;
//   ^? type Indirect = 1

```


### 🙁 Actual behavior

`Direct` and `Indirect` are different.

### 🙂 Expected behavior

`Direct` and `Indirect` should be the same because `Direct` is just an inlined version of `Shortcut<string>`.

### Additional information about the issue

This feels like a similar issue to #39364, #30708, #30020 and maybe some others, but many of those have been resolved already and yet this one remains.  Came from [this Stack Overflow question](https://stackoverflow.com/q/78104909/2887218).