sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Creating an immutable temporary object that `Copy`s a mutable reference contained by an immutable object could (?) but doesn't work
Labels: T-lang,T-compiler

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
struct Thing<'a> {
    mut_ref_value: &'a mut u8
}

fn func<'a>(thing: &'a Thing<'a>) {
    func(&Thing {mut_ref_value: thing.mut_ref_value})
}

fn main() {
    println!("Hello, world!");
}
```

I expected to see this happen: For the code to compile (albeit not do anything useful). Because the `Thing` constructed in `Func` is an immutable temporary, the fact that `thing` is immutable shouldn't restrict using its `&mut u8` since it can only ever be used as a `&u8`. I am not entirely certain that reasoning checks out but I'm having a hard time thinking of a way it isn't.

It breaks the "don't have two mutable references to the same thing" rule but I don't think breaking it here could cause issues.

The code I ran into this in uses `thing.mut_ref_value` to create an actually different version of `Thing` so this isn't just a random edge case nobody'd ever run into.

Instead, this happened: 

```
error[E0596]: cannot borrow `*thing.mut_ref_value` as mutable, as it is behind a `&` reference
 --> src/main.rs:6:33
  |
6 |     func(&Thing {mut_ref_value: thing.mut_ref_value})
  |                                 ^^^^^^^^^^^^^^^^^^^ `thing` is a `&` reference, so the data it refers to cannot be borrowed as mutable
  |
help: consider changing this to be a mutable reference
  |
5 | fn func<'a>(thing: &'a mut Thing<'a>) {
  |                        +++
```

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.81.0 (eeb90cda1 2024-09-04)
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
N/A
```

</p>
</details>
Repository: vscode
Issue: Cannot read properties of undefined (reading 'length')
Labels: error-telemetry

```javascript
TypeError: Cannot read properties of undefined (reading 'length')
at <anonymous> in src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts:750:49
at async Promise.all (index 1)
at async D in src/vs/workbench/services/progress/browser/progressService.ts:56:12
```
[Go to Errors Site](https://errors.code.visualstudio.com/card?ch=4849ca9bdf9666755eb463db297b69e5385090e3&bH=da784510-f1a8-44ea-e4ee-7f28e8984cbe)
Repository: vscode
Issue: Assertion Failed: argument is undefined or null
Labels: error-telemetry

```javascript
Error: Assertion Failed: argument is undefined or null
at b in src/vs/base/common/types.ts:99:9
at de.ec in out/vs/workbench/workbench.desktop.main.js:2670:70132
at de.layout in src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts:1107:9
at <anonymous> in src/vs/workbench/browser/parts/editor/editorPanes.ts:490:46
at fn in src/vs/workbench/browser/parts/editor/editorPanes.ts:507:4
at o.layout in src/vs/workbench/browser/parts/editor/editorPanes.ts:490:8
at ne.layout in src/vs/workbench/browser/parts/editor/editorGroupView.ts:2196:19
at ne.relayout in src/vs/workbench/browser/parts/editor/editorGroupView.ts:2202:9
at d.value in src/vs/workbench/browser/parts/editor/editorTitleControl.ts:99:111
at l.B in src/vs/base/common/event.ts:1242:13
at l.fire in src/vs/base/common/event.ts:1273:9
at d.value in src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts:587:96
at l.B in src/vs/base/common/event.ts:1242:13
at l.fire in src/vs/base/common/event.ts:1273:9
at B.hide in src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts:270:32
at B.update in src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts:301:10
at g.D in src/vs/workbench/browser/parts/editor/editorTitleControl.ts:118:29
at g.openEditor in src/vs/workbench/browser/parts/editor/editorTitleControl.ts:107:8
at ne.Kb in src/vs/workbench/browser/parts/editor/editorGroupView.ts:1309:22
at ne.Jb in src/vs/workbench/browser/parts/editor/editorGroupView.ts:1259:33
at ne.openEditor in src/vs/workbench/browser/parts/editor/editorGroupView.ts:1163:15
at se in src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts:916:27
at handleClickOrTouch in src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts:931:73
```
[Go to Errors Site](https://errors.code.visualstudio.com/card?ch=4849ca9bdf9666755eb463db297b69e5385090e3&bH=f405a8d0-9e27-b78c-b4f2-2ad0e6dafbc2)
Repository: vscode
Issue: Cannot read properties of undefined (reading 'onEvents')
Labels: error-telemetry

```javascript
TypeError: Cannot read properties of undefined (reading 'onEvents')
at i.$acceptModelChanged in src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker.ts:126:32
at f.g in src/vs/base/common/worker/simpleWorker.ts:510:59
at Object.handleMessage in src/vs/base/common/worker/simpleWorker.ts:487:88
at _.k in src/vs/base/common/worker/simpleWorker.ts:245:32
at _.h in src/vs/base/common/worker/simpleWorker.ts:209:17
at _.handleMessage in src/vs/base/common/worker/simpleWorker.ts:178:8
at f.onmessage in src/vs/base/common/worker/simpleWorker.ts:493:18
at self.onmessage in src/vs/base/worker/workerMain.ts:147:57
```
[Go to Errors Site](https://errors.code.visualstudio.com/card?ch=4849ca9bdf9666755eb463db297b69e5385090e3&bH=a104beaa-3d36-bab8-940f-84c8d216e232)
Repository: pytorch
Issue: Python 3.10 + intel-openmp failed to use numactl after import torch._C
Labels: needs reproduction,module: cpu,triaged,module: openmp,module: intel

### 🐛 Describe the bug

Insert debug code in torch._init_.py
```python
 366     if USE_GLOBAL_DEPS:
 367         _load_global_deps()
 368     import os
 369     print("Before import torch._C")
 370     os.system("numactl -C 1 ls")
 371     from torch._C import *  # noqa: F403
 372     print("After import torch._C")
 373     os.system("numactl -C 1 ls")
 ```

How to reproduce:
```shell
LD_PRELOAD=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}/lib/libiomp5.so KMP_AFFINITY=granularity=fine,compact,1,0 python -c "import torch"
```

**Print:**
```shell
pytorch_3.10) [root@d2a4b224fd20 workspace]# LD_PRELOAD=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}/lib/libiomp5.so KMP_AFFINITY=granularity=fine,compact,1,0 python -c "import torch"
Before import torch._C
DeepSpeed  log  oneCCL  test.py  torch-ccl  vision  whls  whls.zip
 

After import torch._C
libnuma: Warning: cpu argument 1 is out of range
<1> is invalid
usage: numactl [--all | -a] [--interleave= | -i <nodes>] [--preferred= | -p <node>]
               [--physcpubind= | -C <cpus>] [--cpunodebind= | -N <nodes>]
               [--membind= | -m <nodes>] [--localalloc | -l] command args ...
       numactl [--show | -s]
       numactl [--hardware | -H]
       numactl [--length | -l <length>] [--offset | -o <offset>] [--shmmode | -M <shmmode>]
               [--strict | -t]
               [--shmid | -I <id>] --shm | -S <shmkeyfile>
               [--shmid | -I <id>] --file | -f <tmpfsfile>
               [--huge | -u] [--touch | -T]
               memory policy | --dump | -d | --dump-nodes | -D
memory policy is --interleave | -i, --preferred | -p, --membind | -m, --localalloc | -l
<nodes> is a comma delimited list of node numbers or A-B ranges or all.
Instead of a number a node can also be:
  netdev:DEV the node connected to network device DEV
  file:PATH  the node the block device of path is connected to
  ip:HOST    the node of the network device host routes through
  block:PATH the node of block device path
  pci:[seg:]bus:dev[:func] The node of a PCI device
<cpus> is a comma delimited list of cpu numbers or A-B ranges or all
all ranges can be inverted with !
all numbers and ranges can be made cpuset-relative with +
the old --cpubind argument is deprecated.
use --cpunodebind or --physcpubind instead
<length> can have g (GB), m (MB) or k (KB) suffixes
```

### Versions

Python 3.10
Intel-openmp: 2024

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @frank-wei
Repository: tensorflow
Issue: tf.python.ops.array_ops.transpose aborts with "Check failed: d >= 0 (0 vs. -1)"
Labels: stat:awaiting tensorflower,type:bug,comp:ops,2.17

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

binary

### TensorFlow version

tf-nightly 2.18.0

### Custom code

Yes

### OS platform and distribution

Linux Ubuntu 20.04.3 LTS

### Mobile device

_No response_

### Python version

3.10.14

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

I encountered an `aborted issue` in TensorFlow when I used API `array_ops.transpose`

### Standalone code to reproduce the issue

```shell
import numpy as np
from tensorflow.python.ops import array_ops

x =np.arange(0, 8).reshape([2, 4]).astype(np.float32)
y = np.array([-1, 0]).astype(np.int32)
array_ops.transpose(x, y,conjugate = False)
```


### Relevant log output

```shell
2024-09-19 16:16:30.137164: F tensorflow/core/framework/tensor_shape.cc:356] Check failed: d >= 0 (0 vs. -1)
Aborted (core dumped)
```
Repository: langchain
Issue: PyPDFLoader parse pdf with extract_images=True encountered an error
Labels: 🤖:bug

### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

PyPDFLoader

### Error Message and Stack Trace (if applicable)

```
  File "envs\xxx\Lib\site-packages\langchain_core\document_loaders\base.py", line 30, in load
    return list(self.lazy_load())
           ^^^^^^^^^^^^^^^^^^^^^^
  File "envs\xxx\Lib\site-packages\langchain_community\document_loaders\pdf.py", line 202, in lazy_load
    yield from self.parser.parse(blob)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "envs\xxx\Lib\site-packages\langchain_core\document_loaders\base.py", line 126, in parse
    return list(self.lazy_parse(blob))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "envs\xxx\Lib\site-packages\langchain_community\document_loaders\parsers\pdf.py", line 124, in lazy_parse
    yield from [
               ^
  File "envs\xxx\Lib\site-packages\langchain_community\document_loaders\parsers\pdf.py", line 127, in <listcomp>
    + self._extract_images_from_page(page),
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "envs\xxx\Lib\site-packages\langchain_community\document_loaders\parsers\pdf.py", line 142, in _extract_images_from_page
    if xObject[obj]["/Filter"][1:] in _PDF_FILTER_WITHOUT_LOSS:
       ~~~~~~~~~~~~^^^^^^^^^^^
  File "envs\xxx\Lib\site-packages\pypdf\generic\_data_structures.py", line 319, in __getitem__
    return dict.__getitem__(self, key).get_object()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/Filter'
``` 

### Description

![image](https://github.com/user-attachments/assets/e7f98571-b748-490d-bad3-6b723ddbce44)

### System Info

> langchain: 0.2.12
> langchain_community: 0.2.11
Repository: deno
Issue: Deno RAM usage on Linux 5x higher than on Windows
Labels: perf

Hi,
I am developing a deno application that maily uses npm:mqtt.js and a rather big generated openapi REST client to connect to a closed source webserver. Now, when I start my application on windows, it reports a ram usage of ~100Mb which is completely fine for me. However, when I start the same application on Linux (e.g. WSL2, CentOs or on a small ARM machine), the RAM usage is ~500Mb.

I could not find any information on the cause of this. Is this to be expected or can you provide me with some steps to analyze the issue? It is hard for me to share any code as I would need to completely strip the application.

Thank you,
Marius
Repository: pytorch
Issue: [CompiledAutograd] "compiled_args nyi" in CppFunctionTensorPreHook
Labels: triaged,oncall: pt2,module: compiled autograd

### 🐛 Describe the bug

Hi, I met this error when testing compiled autograd:
```
[rank0]:   File "/usr/local/lib/python3.10/dist-packages/torch/autograd/graph.py", line 744, in _engine_run_backward
[rank0]:     return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
[rank0]: RuntimeError: compiled_args nyi, see [Note: Compiled Autograd] N5torch8autograd24CppFunctionTensorPreHookE
```

Part of the using codes are:
```
from torch._dynamo import compiled_autograd
def compiler_fn(gm):
        return torch.compile(gm, fullgraph=True, backend="inductor")
        with compiled_autograd.enable(compiler_fn):
                train_step()
```

How can I locate the hook that will use CppFunctionTensorPreHook? Thanks!

### Error logs

_No response_

### Minified repro

_No response_

### Versions

2.4

cc @ezyang @chauhang @penguinwu @xmfan @yf225
Repository: pytorch
Issue: Fault tolerance with k8s
Labels: oncall: distributed,needs design

### 🚀 The feature, motivation and pitch

I am working on training fault tolerance. 
We want to restart only one training node when there is a hardware failure, but the existing design does not allow the agent exit and will restart the training process. I hope that it can be realized that the agent can exit when an error occurs, and other non-faulty training node agents can survive.

### Alternatives

1. Write the number of restarts to etcd/tcp_store
2. Add configuration parameters. If a training process exits with error, the agent exits

### Additional context

_No response_

cc @XilunWu @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o
Repository: godot
Issue: SurfaceFlinger error messages on Android device using adb logcat
Labels: platform:android

### Tested versions

4.3.stable.mono

### System information

Godot v4.3.stable.mono - Windows 10.0.22631 - Vulkan (Mobile) - integrated Intel(R) Iris(R) Xe Graphics (Intel Corporation; 31.0.101.5590) - 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 Threads)

### Issue description

When running a basic project using Remote Debug on an Android device (Galaxy S10e) the following message continually appears in adb logcat:

606 E SurfaceFlinger: Attempt to update InputPolicyFlags without permission ACCESS_SURFACE_FLINGER

The messages stop when the app is backgrounded or closed so it's definitely not just the device. Almost looks like some kind of inifinite loop, which is making it impossible to find anything else in the debug log.

Have tried checking the "Access Surface Flinger" permission in the export settings but this doesn't seem to make any difference.

### Steps to reproduce

Reproducible with a minimal Godot project.
No code, just a PanelContainer scene containing a Label.

### Minimal reproduction project (MRP)

N/A
Repository: vscode
Issue: MSYS2 git looks broken
Labels: bug,git

<!-- ⚠️⚠️ 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?: No

<!-- 🪓 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.93.1
- OS Version: Win10 home

As I found, actual version of node-js cannot run .bat scripts by default: https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
That means that this receipt #4651 now is not working.

Steps to Reproduce:

follow the original post, or if you don't have MSYS, just do the following:

1. Create a `git-wrap.bat` with a single line `C:\path-to-git\git.exe %*`
2. set `"git.path": "C:/bla-bla/git-wrap.bat",` in the `settings.json`
3. reload vscode and check Output -> Git
```
2024-09-19 13:39:54.871 [info] [main] Log level: Info
2024-09-19 13:39:54.872 [info] [main] Validating found git in: "C:/msys64/git-wrap.bat"
2024-09-19 13:39:54.872 [info] Unable to find git on the PATH: "C:/msys64/git-wrap.bat". Error: spawn EINVAL
2024-09-19 13:39:54.872 [info] [main] Validating found git in: "C:\Program Files\Git\cmd\git.exe"
2024-09-19 13:39:54.872 [info] [main] Validating found git in: "C:\Program Files (x86)\Git\cmd\git.exe"
2024-09-19 13:39:54.872 [info] [main] Validating found git in: "C:\Program Files\Git\cmd\git.exe"
2024-09-19 13:39:54.872 [info] [main] Validating found git in: "C:\Users\esaul\AppData\Local\Programs\Git\cmd\git.exe"
2024-09-19 13:40:00.761 [warning] Unable to find git. Error: not found: git.exe
2024-09-19 13:40:00.776 [warning] [main] Failed to create model: Error: Git installation not found.
```
Repository: TypeScript
Issue: Source mappings are missing for serialized properties
Labels: Bug,Help Wanted

### 🔎 Search Terms

source map declaration map properties symbols navigation definition goto

### 🕗 Version & Regression Information

- This is the behavior in every version I tried

### ⏯ Playground Link

N/A

### 💻 Code

```ts
// api.ts
type ValidateShape<T> = {
  [K in keyof T]: T[K];
};

function test<T>(arg: ValidateShape<T>) {
  function createCaller<T>(arg: T): () => {
    [K in keyof T]: () => T[K];
  } {
    return null as any;
  }
  return {
    createCaller: createCaller(arg),
  };
}

const api = test({
  foo/*target*/: 1,
  bar: "",
});

export const createCaller = api.createCaller;

// main.ts

import { createCaller } from "./api";
const caller = createCaller();
caller.foo/*source*/;
```


### 🙁 Actual behavior

Please consider the 2 files above as 2 separate projects.

When those files are in the same project we can successfully go from the source marker to the target marker with "go to definition" and others like it. The same works with project references on.

However, when `api.ts` gets compiled with declaration maps and consumed through that then this navigation no longer works correctly.

### 🙂 Expected behavior

I'd expect this navigation to continue to work

### Additional information about the issue

_No response_
Repository: go
Issue: proposal: mime: expand on what is covered by builtinTypes
Labels: Proposal

### Proposal Details

Right now,

mime/type.go includes what seems to be a somewhat arbitrary list of built-in types:

```go
var builtinTypesLower = map[string]string{
	".avif": "image/avif",
	".css":  "text/css; charset=utf-8",
	".gif":  "image/gif",
	".htm":  "text/html; charset=utf-8",
	".html": "text/html; charset=utf-8",
	".jpeg": "image/jpeg",
	".jpg":  "image/jpeg",
	".js":   "text/javascript; charset=utf-8",
	".json": "application/json",
	".mjs":  "text/javascript; charset=utf-8",
	".pdf":  "application/pdf",
	".png":  "image/png",
	".svg":  "image/svg+xml",
	".wasm": "application/wasm",
	".webp": "image/webp",
	".xml":  "text/xml; charset=utf-8",
}
```

I think some guidance on what should be included in this would be good, rather than a consumer of the package not realizing there are arbitrary gaps.  In the meantime I will submit a PR that will incorporate all MDN defined ["Common Types"](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) (which also I have to admit is arbitrary, but at least covers more common usecases.)
Repository: stable-diffusion-webui
Issue: Can model sharing be realized for two webui projects? I need to test the effect of different versions, now I have two versions of webui, but my model files need to be migrated a lot, is there any configuration file to support model path sharing? Like comfyui
Labels: asking-for-help-with-local-system-issues

### Checklist

- [ ] The issue exists after disabling all extensions
- [ ] 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
- [ ] 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?

Can model sharing be realized for two webui projects? I need to test the effect of different versions, now I have two versions of webui, but my model files need to be migrated a lot, is there any configuration file to support model path sharing? Like comfyui

### Steps to reproduce the problem

Can model sharing be realized for two webui projects? I need to test the effect of different versions, now I have two versions of webui, but my model files need to be migrated a lot, is there any configuration file to support model path sharing? Like comfyui

### What should have happened?

Can model sharing be realized for two webui projects? I need to test the effect of different versions, now I have two versions of webui, but my model files need to be migrated a lot, is there any configuration file to support model path sharing? Like comfyui

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

Google Chrome

### Sysinfo

Can model sharing be realized for two webui projects? I need to test the effect of different versions, now I have two versions of webui, but my model files need to be migrated a lot, is there any configuration file to support model path sharing? Like comfyui

### Console logs

```Shell
Can model sharing be realized for two webui projects? I need to test the effect of different versions, now I have two versions of webui, but my model files need to be migrated a lot, is there any configuration file to support model path sharing? Like comfyui
```


### Additional information

_No response_
Repository: go
Issue: mime: builtinTypes ".xml" defaults to "text/xml" instead of "application/xml"
Labels: NeedsInvestigation

### Go version

go version go1.23.0 windows/amd64

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

```shell
DNA
```


### What did you do?

DNA

### What did you see happen?

mime/type.go uses `".xml":  "text/xml; charset=utf-8",` for builtinTypes

### What did you expect to see?

[RFC 7303, Section 4.1](https://datatracker.ietf.org/doc/html/rfc7303#section-4.1) states:

> this specification alters the
   handling of character encoding of text/xml and text/xml-external-
   parsed-entity, treating them no differently from the respective
   application/ types.  However, application/xml and application/xml-
   external-parsed-entity are still RECOMMENDED, to avoid possible
   confusion based on the earlier distinction.
   
So, following the recommendatio, in mime/type.go builtinTypesLower should say:

```go
	".xml":  "application/xml; charset=utf-8", 
```