sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: kubernetes
Issue: panic encoding the same object from multiple goroutines concurrently
Labels: kind/bug,sig/api-machinery,priority/important-longterm,lifecycle/frozen

Seen in https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/69821/pull-kubernetes-integration/1170241808647589890

Serialization using `WithVersionEncoder#Encode` (the default for output) mutates objects. More details in https://github.com/kubernetes/kubernetes/pull/117174

https://github.com/kubernetes/kubernetes/blob/58e6e903b71580e52925ce630a15e4df4d9f7f47/staging/src/k8s.io/apimachinery/pkg/runtime/helper.go#L239-L241


This happens to be triggered from a test, but other contexts that encoded the same object from multiple goroutines could hit the same issue

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x402f95]

goroutine 105737 [running]:
strings.Count(0x0, 0x2, 0x46fdf46, 0x1, 0x1)
	/usr/local/go/src/strings/strings.go:84 +0xf2
k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema.ParseGroupVersion(0x0, 0x2, 0x8744b2, 0x3dfe500, 0xc000231410, 0xc01f8d4b38, 0xaf88cc0, 0x434c200)
	/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go:222 +0x99
k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema.FromAPIVersionAndKind(0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go:296 +0x5a
k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1.(*TypeMeta).GroupVersionKind(0xc04cfdfc00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go:128 +0x5e
k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime.WithVersionEncoder.Encode(0x7d611c0, 0xc04cf533c0, 0x7fc20274a3e8, 0xc00010fc00, 0x7d741a0, 0xc000214690, 0x7d71be0, 0xc04cfdfc00, 0x7d56f00, 0xc04cfba450, ...)
	/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/helper.go:231 +0x177
k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime.Encode(0x7d61120, 0xc04cf8b260, 0x7d71be0, 0xc04cfdfc00, 0xc04cfdfc00, 0x1, 0x0, 0x0, 0x0)
	/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/codec.go:46 +0x74
k8s.io/kubernetes/vendor/k8s.io/client-go/rest.(*Request).Body(0xc04cfca600, 0x46ca1c0, 0xc04cfdfc00, 0xc04cfca600)
	/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/client-go/rest/request.go:400 +0x238
k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/core/v1.(*pods).Create(0xc04cfccd20, 0xc04cfdfc00, 0xc, 0x7e5d9a0, 0xc04cfccd20)
	/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go:120 +0xd4
```

this can cause a race condition, or concurrent modification errors
Repository: go
Issue: x/build/devapp: handle module dependencies more intelligently in Dockerfile
Labels: Builders,NeedsInvestigation

The x/build/devapp [Dockerfile](https://github.com/golang/build/blob/master/devapp/Dockerfile) contains [extra steps](https://github.com/golang/build/blob/a2cf19446e2ca6ac8153b261ab49f9be9394b5f4/devapp/Dockerfile#L20-L29) to optimize the speed of repeated docker builds when the `go.mod` or `go.sum` files have not changed. It would be nice to have a more automated way of doing this that doesn't require us to remember to add some our dependencies manually inside of our Dockerfile.

See [golang.org/cl/193878](https://golang.org/cl/193878).
Repository: godot
Issue: Editor thinks singleton is not in scopeuntil code is reloaded
Labels: bug,topic:editor

**Godot version:**
Godot v3.1.1

**OS/device including version:**

Debian 9 64 bits

**Issue description:**

When you add a new .gd script to the project's autoload list and begin using it the editor flags your use of the singleton's name as an error, because it thinks it isn't on scope (even though, of course, it is always in scope).

**Steps to reproduce:**

Create a new script.

Add it to the project's autoload list.

Use the singleton's name anywhere in your project. Editor marks it as an error and tells you that the name of the singleton is not defined on this scope. Running the project works fine, though.

Close Godot, open it again and load your project. The editor now recognizes singletons are always in scope and doesn't warn you about the "error" anymore.

**Minimal reproduction project:**

N/A
Repository: flutter
Issue: PointerEvent should have meta info (isShiftPressed, isCommandPressed etc.) 
Labels: c: new feature,framework,f: gestures,P3,team-framework,triaged-framework

`PointerEvent` should have meta info `isControlPressed`, `isAltPressed` similar to `RawKeyEvent`. This will allow to handle more "types" of clicks. Example use-case: shift + click = add to selection
Repository: TypeScript
Issue: Signature help not select correct overload for partially completed function
Labels: Suggestion,Experience Enhancement

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

From https://github.com/microsoft/vscode/issues/80570

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.7.0-dev.20190907

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
- SignatureHelp
- parameter hints

**Code**
For the code

```ts
declare function addEventHandler(event: "onPlayerJoin", x: number): void;
declare function addEventHandler(event: "onPlayerQuit", y: string): void;

addEventHandler('onPlayerQuit')
```

1. Trigger signature help after the closing `'` in the call to `addEventHandler`

**Expected behavior:**
Signature help for the second overload is returned

**Actual behavior:**
Signature help for both overloads is returned. We end up showing the one for `onPlayerJoin ` first

![Screen Shot 2019-09-09 at 11 24 08 AM](https://user-images.githubusercontent.com/12821956/64556487-5d427380-d2f4-11e9-92b8-f2cacc4c8728.png)
Repository: flutter
Issue: Embedder should prevent engine initialization if the ICU data file is not provided
Labels: engine,a: quality,e: embedder,P3,team-engine,triaged-engine

Currently, via the embedder API, if the Shell is initialized without an ICU data file, it is assumed that the embedder has initialized ICU before the first instantiation of the shell. The engine does not warn of this implicit fallback in non-verbose launch modes.

The model works this way because ICU setup has to be done once per process and the mobile and Fuchsia shells have access to Fuchsia directly (and may need ICU initialized before shell initialization **and** not have the shell blow away the embedder set configuration). This is not the case for custom embedders and embedders can only initialize ICU via the Flutter engine (ICU symbols are hidden).

If embedders forget to pass a valid ICU data file, the engine crashes during first text layout with an obscure error. This is poor UX and we should just prevent engine launches without embedder provided ICU data files.
Repository: go
Issue: crypto/tls: Dial error message does not give much context
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
go version go1.11.13 linux/amd64
</pre>

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mbirc/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mbirc/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib64/go/1.11"
GOTMPDIR=""
GOTOOLDIR="/usr/lib64/go/1.11/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build241684230=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
<details><summary>tls-client.go code</summary><br><pre>
package main

import (
    "crypto/tls"
    "os"
    "log"
)

func main() {
    args:= os.Args

    config := tls.Config{}
    conn, err := tls.Dial("tcp", args[1] + ":" + args[2], &config)
    if err != nil {
        log.Fatalf("client: dial: %s", err)
    }
    defer conn.Close()
    log.Println("client: connected to: ", conn.RemoteAddr())
}
</pre></details>
This does not work for the successful case but in error case it prints:
<pre>
client: dial: remote error: tls: handshake failure
</pre>
### What did you expect to see?

Message that allows diagnosing the failure. Why has it failed to connect? Other clients connect fine.

### What did you see instead?

Unexplained failure.
Repository: godot
Issue: MIDI Input in iOS is not implemented
Labels: bug,platform:ios,confirmed,topic:audio,topic:input

**Godot version:**
3.1

**OS/device including version:**
iPhone 6, iOS 11.2.5

**Issue description:**
This code should produce a result when input is received from a MIDI-interface. It has been confirmed to work on desktop. For some reason it does not work on iOS.
```
OS.open_midi_inputs()
OS.get_connected_midi_inputs()
set_process_unhandled_input(true)
func _unhandled_input(event : InputEvent):
    if (event is InputEventMIDI):
        if (event.get_channel() == 1):
            print ("MIDI Action Received")
```

**Steps to reproduce:**
Use above code on iOS device with MIDI-interface attached. (Or use the example below that should react to input from a MIDI device sending on channel 1.)

**Minimal reproduction project:**
[MIDI-Example.zip](https://github.com/godotengine/godot/files/3593079/MIDI-Example.zip)
Repository: pytorch
Issue: Forward/backward hooks for C++ torch::nn modules
Labels: module: cpp,module: autograd,triaged

## 🚀 Feature
As part of the Python/C++ API parity work, we would like to provide forward/backward hooks for C++ `torch::nn` modules:
(left: Python API, right: C++ API)
- `torch.nn.Module.register_forward_pre_hook` -> `torch::nn::Module::register_forward_pre_hook`
- `torch.nn.Module.register_forward_hook` -> `torch::nn::Module::register_forward_hook`
- `torch.nn.Module.register_backward_hook` -> `torch::nn::Module::register_backward_hook`

## Possible Steps
- Implement `torch::utils::hooks::RemovableHandle` in C++ API, which mirrors `torch.utils.hooks.RemovableHandle` in Python API.
- Implement `register_forward_pre_hook`, `register_forward_hook` and `register_backward_hook` methods for `torch::nn::Module`.
    - We might need to add `_backward_hooks`, `_forward_pre_hooks` and `_forward_hooks` to `torch::nn::Module` (torch/csrc/api/include/torch/nn/module.h).
- Add appropriate C++ tests for the new API, similar to Python tests.

cc @ezyang @SsnL @albanD @zou3519 @yf225
Repository: vscode
Issue: removeSecondaryCursors should leave the cursor added last
Labels: feature-request,editor-multicursor,editor-commands

`removeSecondaryCursors` (i.e. clicking "Escape" after selecting multiple cursors), should leave the cursor which was added last. This allows fast searching for other uses in the file (`ctrl-d ctrl-d esc` as opposed to `ctrl-d ctrl-c ctrl-f ctrl-v enter esc`).
Repository: pytorch
Issue: load_state_dict on CPU first
Labels: module: serialization,triaged

## 🚀 Feature
When calling load_state_dict on model and optimizer, we should load to CPU first then copy to GPU

## Motivation
load_state_dict currently has a call to deepcopy which doubles the RAM for those weights. Thus when a model is already pushing the limit of RAM it cannot be loaded back in memory.

## Pitch
If we load on CPU first, the deepcopy can happen on CPU memory before going to GPU

## Alternatives
Building smaller models

@ezyang
Repository: TypeScript
Issue: Incorrect error message on export assignment in `.d.ts` file
Labels: Suggestion,In Discussion

**TypeScript Version:**  3.5.3

**Search Terms:**

An export assignment cannot be used in a namespace.

**Code**

This is pretty niche, but I think it has general implications...

The current `/lib/typescript.d.ts` file is modelled as essentially a CommonJS file where at the end of the file, it has `export = ts;` which exports the whole namespace.  The actual `/lib/typescript.js` though will place itself in the global scope as `ts` if it isn't loaded as a CommonJS module.  In order to express that `ts` is available as a global variable, it requires code like this to be placed in a `.d.ts` file:

```ts
import * as _ts from "typescript";

declare global {
  namespace ts {
    export = _ts;
  }
}
```

Other methods of expressing this, like `declare var ts: typeof _ts;` only make the function shape of `ts` available, while the interfaces and type aliases and other type information is not accessible.

**Expected behavior:**

No errors.

**Actual behavior:**

The error `TS1063: An export assignment cannot be used in a namespace` occurs, but in VSCode, if the file is named `globals.d.ts` this error does not occur. 🤷‍♂  In all cases the code above does work like expected, making both the functional and type exports of the namespace available for code to be checked against.
Repository: pytorch
Issue: Python hang after using torch.exp()
Labels: needs reproduction,triaged,module: deadlock

## 🐛 Bug

Using function torch.exp() makes python hang. I test some other functions like torch.sum(), torch.abs(), these functions can return right results.
<!-- A clear and concise description of what the bug is. -->

## To Reproduce

Steps to reproduce the behavior:

```
torch.exp(torch.Tensor([0, math.log(2)]))
```
Python just hang, python cannot be closed by using CTRL+C under Ubuntu 16.04.

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

Out[2]: Tensor([1, 2])
<!-- A clear and concise description of what you expected to happen. -->

## Environment

Collecting environment information...
PyTorch version: 1.2.0
Is debug build: No
CUDA used to build PyTorch: 10.0.130

OS: Ubuntu 16.04.5 LTS
GCC version: (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413
CMake version: version 3.5.1

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 9.0.176
GPU models and configuration: 
GPU 0: GeForce GTX 1080 Ti
GPU 1: GeForce GTX 1080 Ti

Nvidia driver version: 410.93
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] numpy==1.16.2
[pip] numpydoc==0.9.1
[pip] torch==1.2.0
[pip] torch-cluster==1.4.2
[pip] torch-geometric==1.2.1
[pip] torch-scatter==1.2.0
[pip] torch-sparse==0.4.0
[pip] torch-spline-conv==1.1.0
[pip] torchsummaryX==1.3.0
[pip] torchvision==0.4.0a0+6b959ee
[conda] blas                      1.0                         mkl  
[conda] cuda90                    1.0                  h6433d27_0    pytorch
[conda] mkl                       2018.0.3                      1  
[conda] mkl-service               1.1.2            py36h90e4bf4_5  
[conda] torch                     1.2.0                    pypi_0    pypi
[conda] torch-cluster             1.4.2                    pypi_0    pypi
[conda] torch-geometric           1.2.1                    pypi_0    pypi
[conda] torch-scatter             1.2.0                    pypi_0    pypi
[conda] torch-sparse              0.4.0                    pypi_0    pypi
[conda] torch-spline-conv         1.1.0                    pypi_0    pypi
[conda] torchsummaryx             1.3.0                    pypi_0    pypi
[conda] torchvision               0.2.2.post2              pypi_0    pypi
Repository: flutter
Issue: Don't rely on global `pod` installation, use bundled version
Labels: platform-ios,tool,customer: crowd,c: proposal,P3,team-ios,triaged-ios

## Use case

In addition to stock Cococapods we have some plugins required in our Podfile. 

Cocoapods itself and the plugins are version controlled using `bundler`, and when running `bundle exec pod install` in the `ios/` directory everything works fine.

But when executing `flutter run` it tried to use the global `pod` binary, which doesn't pick up the locally installed plugin we want to use.

## Proposal

I am not super familiar with Cocoapods, so there might be a better solution to this.

What I would propose is to remove the hardcoded `pod install` in places like this: https://github.com/flutter/flutter/blob/b7c714e84c1e085e068ec1b8b2b18d4cbada76d0/packages/flutter_tools/lib/src/macos/cocoapods.dart#L280

…and instead do some discovery to find out whether pod is locally available via `bundle exec` and in that case use that instead.

If there is any other workaround to make `pod install` aware of the local plugins that would also be fine.

I think in general it would be much better though not even to require the global `pod` installation, and do everything through bundled versions. (In our team we constantly have noise due to different people upgrading Cocoapods at different times and hence modifying the version string in the `Podfile.lock` file)
Repository: TypeScript
Issue: Automated Migration for Breaking Changes to the Type System
Labels: Suggestion,Needs Proposal

Automated Migration for Breaking Changes to the Type System

## Search Terms

codemod, migration, upgrade

## Suggestion

semi-automated migration when there are breaking changes in the type system

One way of implementing this would be via codemods (could use the TS Compiler API) that do trivial update tasks as described in https://github.com/microsoft/TypeScript/issues/33272

## Use Cases

- Would make it easier for users to upgrade to the latest TypeScript
- Would make it easier for the TS team to upgrade TypeScript
- Might enable TS to evolve faster, as the pain from these "breaking" changes will be smaller

The changes described in https://github.com/microsoft/TypeScript/issues/33272, for example, were mostly trivial, and ideally would not need much human intervention.

Type-only changes are especially amenable to this kind of treatment, because no one's app will misbehave at runtime if there is a bug in the transformation.

I say 'semi-automated' because in cases where the tool can't figure out the problem, the tool could yield to human judgment. Tooling for this doesn't have to be perfect, but a small amount of automation could go a long way.

## Examples

example.ts

```ts
const myPromise: Promise<{}> = dontCarePromise();
```

tsc --upgrade --from=3.5 --to=3.6 example.ts


```ts
const myPromise: Promise<unknown> = dontCarePromise();
```

The example is from https://github.com/microsoft/TypeScript/issues/33272.

In a case where the conversion *would* lead to a new type error, I'd expect the tool to bail out, explain the situation, and let the human decide what to do.

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: kubernetes
Issue: Document that some specific properties may not be removed when using kubectl apply
Labels: kind/documentation,sig/cli,sig/docs

Per #72519, serviceAccountName (and serviceAccount) are not removed when they are deleted from a resource spec. which is then passed to `kubectl apply`.

I hit this exact bug, and there is nothing in the docs at https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/#kubectl-apply to warn about the existence of special cases like that.

If there is no obvious fix that would address non-removal of special cases, then this caveat should be mentioned.
Repository: vue
Issue: `$forceUpdate` do not update checked status of checkbox-
Labels: regression

### Version
2.6.10

### Reproduction link
[https://jsfiddle.net/ahy27vu3/](https://jsfiddle.net/ahy27vu3/)







### Steps to reproduce
1. input[type="text"] value is forced to` ''`, which is controlled completely
2. input[type="checkbox"] checked does not work

### What is expected?
input[type="checkbox"] checked is forced to `false`

### What is actually happening?
input[type="checkbox"] checked keep the value last entered

---
Maybe this is designed on purpose，Could you please explain why？
https://github.com/vuejs/vue/blob/dev/src/platforms/web/runtime/modules/dom-props.js#L67
https://github.com/vuejs/vue/blob/dev/src/platforms/web/runtime/modules/dom-props.js#L42

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: flutter
Issue: webview_flutter plugin does not support "setNetworkAvailable" method from android webview
Labels: c: new feature,platform-android,d: stackoverflow,p: webview,package,P3,team-android,triaged-android

I have a flutter application that needs to display a web page that uses the "navigator.onLine" property. At the moment it only returns true no matter what. After some google searches it looks like this is a common issue with the android webview, and that there is a method you can call on the webview to change the property (https://stackoverflow.com/a/18746271/3407591). But this method does not exist for the webview_flutter plugin. Is there a another way for me to change this property in flutter or a way to call this function?
Repository: rust
Issue: `ManuallyDrop` should be a dyn-compatible receiver type
Labels: T-lang,F-arbitrary_self_types,A-trait-objects

We should extend the set of library-defined self types on stable to include types involving `ManuallyDrop`. `ManuallyDrop` is a transparent wrapper around another type which is completely unconstrained; there should be no technical limitations on making it an dyn-compatible[^1] receiver type.

To be explicit, I am proposing to make the following types valid self types on stable, and all but the first would be dyn-compatible:

* `ManuallyDrop<Self>`
* `&ManuallyDrop<Self>`
* `&mut ManuallyDrop<Self>`
* `Box<ManuallyDrop<Self>>`
* `Rc<ManuallyDrop<Self>>`
* `Arc<ManuallyDrop<Self>>`
* `Pin<&ManuallyDrop<Self>>`
* `Pin<&mut ManuallyDrop<Self>>`
* `Pin<Box<ManuallyDrop<Self>>>`
* `Pin<Rc<ManuallyDrop<Self>>>`
* `Pin<Arc<ManuallyDrop<Self>>>`

This is similar to but distinct from #56193, which is about making coercions valid involving a manually drop wrapped around a pointer type.

In particular, I am personally interested in having `Pin<&mut ManuallyDrop<Self>>` as a dyn-compatible receiver type for an unsafe trait method in my code, as it assists users in understanding the guarantees the caller is giving them - that it will never access or move this value again, even to drop it, do with that what you will.

cc @mikeyhew @rust-lang/lang @rust-lang/wg-unsafe-code-guidelines 

[^1]: Formerly known as "object safe".