sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: node
Issue: Customize password-based KDF in `KeyObject#export`
Labels: crypto,feature request

### What is the problem this feature will solve?

At the moment, node.js uses [OpenSSL defaults](<https://www.openssl.org/docs/man3.3/man7/EVP_KDF-PBKDF2.html#iter-OSSL_KDF_PARAM_ITER-unsigned-integer>) when exporting a key object
```js
const { privateKey } = generateKeyPairSync("ec", {
  namedCurve: "P-384",
  privateKeyEncoding: {
    type: "pkcs8",
    format: "pem",
    cipher: "aes-256-cbc",
    passphrase: "something secret",
  },
});
```
generates a PEM-encoded encrypted private key with _2048 iterations_ of PBKDF2-HMAC-SHA256. OWASP recommends [**way more (600k)**](<https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2>).

### What is the feature you are proposing to solve the problem?

In OpenSSL CLI [`openssl pkcs8 -topk8`](<https://www.openssl.org/docs/man3.3/man1/openssl-pkcs8.html#iter-count>), the iterations are customizable with the `-iter` option.
Alternatively, one can choose `-scrypt` (and relevant `-scrypt_N/r/p` params) as the KDF in OpenSSL _but not in node.js_.
The PRF can also be a different HMAC-SHAxxx but that's less relevant in my opinion

I open the discussion for extending `KeyObject#export` and related interfaces with one of the following

1. A **`derivedKey` parameter** that excludes `passphrase`. In this case, **no KDF is performed**, and it is strongly emphasised to pass a key derived with `scrypt`, `pbkdf2`, or `argon2id` (node.js support one day :crossed_fingers:) (EDIT: support for argon2id introduced in OpenSSL 3.2.0)
  ```js
  privateKeyEncoding: {
    ...
    cipher: "aes-256-cbc",
    derivedKey: await promisifiedScrypt(weakUserPassphrase, salt, 32, { p: 5 }) // {@link <https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#scrypt>}
  }
  ```
2. Extend `cipher` to be an object
  ```js
  cipher: {
    alg: "aes-256-cbc",
    kdf: "pbkdf2",
    iter: 600_000,
    /* prf: "hmacWithSHA256" */
    
    // mutually exclusive
    alg: "aes-256-cbc",
    kdf: "scrypt",
    cost: ...,
    // same options as with crypto.scrypt
  }
  ```
  3. Change the default iterations count to follow OWASP guidelines. This loses parity with OpenSSL defaults, which can be confusing for users, and there is no extensibility in case OWASP removes pbkdf2 from its recommandation. I am strongly against it, but its implementation would seem the less painful of all

### What alternatives have you considered?

Install OpenSSL on operating systems that don't provide it (hello Windows) and encrypt with its CLI (via `child_process` or a terminal)
Repository: PowerToys
Issue: display went black
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.80.1

### Installation method

PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

General

### Steps to reproduce

wasn't actively using a powertoy
[2024-06-06.txt](https://github.com/user-attachments/files/15597925/2024-06-06.txt)


### ✔️ Expected Behavior

nothing to happen

### ❌ Actual Behavior

display went black

### Other Software

_No response_
Repository: vscode
Issue: Integrated Terminal Distorts Text Upon Restart After Being Terminated
Labels: bug,confirmation-pending,terminal-layout

<!-- ⚠️⚠️ 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?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from the 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.90.0 (Universal)
- OS Version: Darwin arm64 23.5.0

Steps to Reproduce:

1. Open Visual Studio Code and fire up terminal
2. Open all 3 sections of problems, debug console and Terminal
3. Kill the terminal and open it again from the terminal section as shown in the video attached


https://github.com/microsoft/vscode/assets/144288354/8ed093ad-daef-4b5a-bbd0-942572a6b868
Repository: tensorflow
Issue: Aborted (core dumped) in `tf.raw_ops.ResourceApplyFtrl/tf.raw_ops.ResourceApplyFtrlV2/tf.raw_ops.ResourceSparseApplyFtrl/tf.raw_ops.ResourceSparseApplyFtrlV2`
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.16

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf 2.16

### Custom code

Yes

### OS platform and distribution

Linux Ubuntu 22.04.3 LTS (x86_64)

### Mobile device

_No response_

### Python version

3.9.13

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

On specific input, tf.raw_ops.ResourceApplyFtrl/tf.raw_ops.ResourceApplyFtrlV2/tf.raw_ops.ResourceSparseApplyFtrl/tf.raw_ops.ResourceSparseApplyFtrlV2 triggers "Aborted (core dumped)". We ran the code on colab's latest TensorFlow Nightly, which also triggers the crash. We analyzed it, and the cause of this crash is probably the grad parameter.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

var = tf.Variable([1.0, 2.0, 3.0])
accum = tf.Variable([0.1, 0.2, 0.3], dtype=tf.complex64) 
accum2 = tf.Variable([0, 1.2, -3.3], dtype=tf.complex64) 
lr = 0.01
grad = tf.constant([0.1, 0.2, 0.3])
momentum = 0.9

# crash
tf.raw_ops.ResourceApplyFtrl(
    var=var.handle,
    accum=accum.handle,
    linear=var.handle,
    grad=grad,
    lr=lr,
    l1=0.1,
    l2=0.1,
    lr_power=1,
    use_locking=False,
    multiply_linear_by_lr=False,
    name=None
)
# crash
# tf.raw_ops.ResourceApplyFtrlV2(
#     var=var.handle,
#     accum=accum.handle,
#     linear=var.handle,
#     grad=grad,
#     lr=lr,
#     l1=0.1,
#     l2=0.1,
#     lr_power=1,
#     l2_shrinkage=1,
#     use_locking=False,
#     multiply_linear_by_lr=False,
#     name=None
# )
# crash
# tf.raw_ops.ResourceSparseApplyFtrl(
#    var=var.handle,
#     accum=accum.handle,
#     linear=var.handle,
#     grad=grad,
#     lr=lr,
#     l1=0.1,
#     l2=0.1,
#     lr_power=-1,
#     use_locking=False,
#     indices=tf.constant([1,2,2]),
#     multiply_linear_by_lr=False,
#     name=None
# )
# crash
# tf.raw_ops.ResourceSparseApplyFtrlV2(
#     var=var.handle,
#     accum=accum.handle,
#     linear=var.handle,
#     grad=grad,
#     lr=lr,
#     l1=0.1,
#     l2=0.1,
#     lr_power=-1,
#     use_locking=False,
#     indices=tf.constant([1,2,2]),
#     multiply_linear_by_lr=False,
#     l2_shrinkage=1,
#     name=None
# )
```


### Relevant log output

```shell
2024-06-06 00:53:09.467458: I tensorflow/core/platform/cpu_feature_guard.cc:210] 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.
2024-06-06 00:53:10.440397: F tensorflow/core/framework/tensor.cc:844] Check failed: dtype() == expected_dtype (8 vs. 1) float expected, got complex64
Aborted (core dumped)
```
Repository: pytorch
Issue: [inductor] Graph breaks in CohereForAI/aya-23-8b
Labels: triaged,oncall: pt2,module: dynamo,module: graph breaks,empathy-day,dynamo-user-empathy-day,dynamo-triage-june2024

### 🐛 Describe the bug

Huggingface model: https://huggingface.co/CohereForAI/aya-23-8B
Reference code: https://huggingface.co/CohereForAI/aya-23-8B/blob/main/Aya_23_notebook.ipynb

## Graph breaks

There are two types of graph breaks. 
1.  UserWarning: Graph break due to unsupported builtin flash_attn_2_cuda.PyCapsule.fwd. 
2. Skipping frame because there is a graph break in a for/while loop

## To Reproduce

https://github.com/FindHao/ml_scripts/blob/main/inductor/cases/aya_full.py

You may need to add the following code and your own token for the first run to download weights etc.
```python
from huggingface_hub import login
login(token='your_hf_token')
```




### Versions

nightly

cc @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire
Repository: tensorflow
Issue: Aborted (core dumped) in `tf.raw_ops.ResourceApplyKerasMomentum/tf.raw_ops.ResourceSparseApplyKerasMomentum`
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.16

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf 2.16

### Custom code

Yes

### OS platform and distribution

Linux Ubuntu 22.04.3 LTS (x86_64)

### Mobile device

_No response_

### Python version

3.9.13

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

On specific input, tf.raw_ops.ResourceApplyKerasMomentum/tf.raw_ops.ResourceSparseApplyKerasMomentum triggers "Aborted (core dumped)". We ran the code on colab's latest TensorFlow Nightly, which also triggers the crash. We analyzed it, and the cause of this crash is probably the grad parameter.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

var = tf.Variable([1.0, 2.0, 3.0])
accum = tf.Variable([0.1, 0.2, 0.3], dtype=tf.complex64) 
accum2 = tf.Variable([0, 1.2, -3.3], dtype=tf.complex64) 
lr = 0.01
grad = tf.constant([0.1, 0.2, 0.3])
momentum = 0.9

# crash
tf.raw_ops.ResourceApplyKerasMomentum(
    var=var.handle,
    accum=accum.handle,
    grad=grad,
    lr=lr,
    momentum=0.1,
    use_locking=False,
    use_nesterov=False,
    name=None
)

# crash
# tf.raw_ops.ResourceSparseApplyKerasMomentum(
#     var=var.handle,
#     accum=accum.handle,
#     grad=grad,
#     lr=lr,
#     indices=tf.constant([1,2,2]),
#     momentum=0.1,
#     use_locking=False,
#     use_nesterov=False,
#     name=None
# )
```


### Relevant log output

```shell
2024-06-06 00:59:43.994008: I tensorflow/core/platform/cpu_feature_guard.cc:210] 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.
2024-06-06 00:59:44.992853: F tensorflow/core/framework/tensor.cc:844] Check failed: dtype() == expected_dtype (8 vs. 1) float expected, got complex64
Aborted (core dumped)
```
Repository: tensorflow
Issue: Aborted (core dumped) in `tf.raw_ops.ResourceApplyRMSProp/tf.raw_ops.ResourceSparseApplyRMSProp`
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.16

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf 2.16

### Custom code

Yes

### OS platform and distribution

Linux Ubuntu 22.04.3 LTS (x86_64)

### Mobile device

_No response_

### Python version

3.9.13

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

On specific input, tf.raw_ops.ResourceApplyRMSProp/tf.raw_ops.ResourceSparseApplyRMSProp triggers "Aborted (core dumped)". We ran the code on colab's latest TensorFlow Nightly, which also triggers the crash. The cause of the crash may be the grad parameter.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

var = tf.Variable([1.0, 2.0, 3.0])
accum = tf.Variable([0.1, 0.2, 0.3], dtype=tf.complex64) 
accum2 = tf.Variable([0, 1.2, -3.3], dtype=tf.complex64) 
lr = 0.01
grad = tf.constant([0.1, 0.2, 0.3])
momentum = 0.9

# crash
tf.raw_ops.ResourceApplyRMSProp(
    var=var.handle,
    ms=accum.handle,
    mom=accum2.handle,
    lr=lr,
    rho=lr,
    momentum=momentum,
    epsilon=0.9,
    grad=grad,
    use_locking=False,
)

# tf.raw_ops.ResourceSparseApplyRMSProp(
#     var=var.handle,
#     ms=accum.handle,
#     mom=accum2.handle,
#     lr=lr,
#     rho=lr,
#     momentum=momentum,
#     indices=tf.constant([1,2,2]),
#     epsilon=0.9,
#     grad=grad,
#     use_locking=False,
# )
```


### Relevant log output

```shell
2024-06-06 01:07:00.757682: I tensorflow/core/platform/cpu_feature_guard.cc:210] 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.
2024-06-06 01:07:01.835541: F tensorflow/core/framework/tensor.cc:844] Check failed: dtype() == expected_dtype (8 vs. 1) float expected, got complex64
Aborted (core dumped)
```
Repository: tensorflow
Issue: Aborted (core dumped) in `tf.raw_ops.ResourceSparseApplyAdadelta/tf.raw_ops.ResourceApplyAdadelta`
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.16

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf 2.16

### Custom code

Yes

### OS platform and distribution

Linux Ubuntu 22.04.3 LTS (x86_64)

### Mobile device

_No response_

### Python version

3.9.13

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

On specific input, tf.raw_ops.ResourceSparseApplyAdadelta/tf.raw_ops.ResourceApplyAdadelta triggers "Aborted (core dumped)". We ran the code on colab's latest TensorFlow Nightly, which also triggers the crash. The cause of the crash may be the grad parameter.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

var = tf.Variable([1.0, 2.0, 3.0])
accum = tf.Variable([0.1, 0.2, 0.3], dtype=tf.complex64) 
accum2 = tf.Variable([0, 1.2, -3.3], dtype=tf.complex64) 
lr = 0.01
grad = tf.constant([0.1, 0.2, 0.3])
momentum = 0.9

# crash
tf.raw_ops.ResourceSparseApplyAdadelta(
    var=var.handle,
    accum=accum.handle,
    accum_update=accum2.handle,
    lr=lr,
    rho=0.9,
    epsilon=0.9,
    grad=grad,
    indices=tf.constant([1,2,2]),
    use_locking=False,
)
# crash
# tf.raw_ops.ResourceApplyAdadelta(
#     var=var.handle,
#     accum=accum.handle,
#     accum_update=accum2.handle,
#     lr=lr,
#     rho=0.9,
#     epsilon=0.9,
#     grad=grad,
#     use_locking=False,
# )
```


### Relevant log output

```shell
2024-06-06 01:10:09.399119: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-06-06 01:10:09.432483: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-06-06 01:10:10.501032: F tensorflow/core/framework/tensor.cc:844] Check failed: dtype() == expected_dtype (8 vs. 1) float expected, got complex64
Aborted (core dumped)
```
Repository: tensorflow
Issue: Aborted (core dumped) in `tf.raw_ops.ResourceSparseApplyAdagrad/tf.raw_ops.ResourceSparseApplyAdagradDA/tf.raw_ops.ResourceSparseApplyAdagradV2`
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.16

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf 2.16

### Custom code

Yes

### OS platform and distribution

Linux Ubuntu 22.04.3 LTS (x86_64)

### Mobile device

_No response_

### Python version

3.9.13

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

On specific input, tf.raw_ops.ResourceSparseApplyAdagrad/tf.raw_ops.ResourceSparseApplyAdagradDA/tf.raw_ops.ResourceSparseApplyAdagradV2 triggers "Aborted (core dumped)". We ran the code on colab's latest TensorFlow Nightly, which also triggers the crash. The cause of the crash may be the grad parameter.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

var = tf.Variable([1.0, 2.0, 3.0])
accum = tf.Variable([0.1, 0.2, 0.3], dtype=tf.complex64) 
accum2 = tf.Variable([0, 1.2, -3.3], dtype=tf.complex64) 
lr = 0.01
grad = tf.constant([0.1, 0.2, 0.3])
momentum = 0.9

# crash
tf.raw_ops.ResourceSparseApplyAdagrad(
    var=var.handle,
    accum=accum.handle,
    lr=lr,
    grad=grad,
    indices=tf.constant([1,2,3]),
    use_locking=False,
)


# crash only when gpu is available 
# tf.raw_ops.ResourceSparseApplyAdagradDA(var=var.handle,
#                     gradient_accumulator=accum.handle,
#                     gradient_squared_accumulator=accum2.handle,
#                     grad=grad, indices=tf.constant([1,2,3]), lr=lr,
#                     l1=lr, l2=lr, global_step=1000,
#                     use_locking=False)

# crash
# tf.raw_ops.ResourceSparseApplyAdagradV2(var=var.handle,
#                     accum=accum.handle,
#                     epsilon = 0.9,
#                     grad=grad, indices=tf.constant([1,2,3]), lr=lr,
#                     use_locking=False,update_slots=False)
```


### Relevant log output

```shell
2024-06-06 01:14:57.455749: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-06-06 01:14:57.489757: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-06-06 01:14:58.552846: F tensorflow/core/framework/tensor.cc:844] Check failed: dtype() == expected_dtype (8 vs. 1) float expected, got complex64
Aborted (core dumped)
```
Repository: tensorflow
Issue: Aborted (core dumped) in `tf.raw_ops.ResourceApplyAdagrad/tf.raw_ops.ResourceApplyAdagradDA/tf.raw_ops.ResourceApplyAdagradV2`
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.16

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

tf 2.16

### Custom code

Yes

### OS platform and distribution

Linux Ubuntu 22.04.3 LTS (x86_64)

### Mobile device

_No response_

### Python version

3.9.13

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

On specific input, tf.raw_ops.ResourceApplyAdagrad/tf.raw_ops.ResourceApplyAdagradDA/tf.raw_ops.ResourceApplyAdagradV2 triggers "Aborted (core dumped)". We ran the code on colab's latest TensorFlow Nightly, which also triggers the crash. The cause of the crash may be the grad parameter.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

var = tf.Variable([1.0, 2.0, 3.0])
accum = tf.Variable([0.1, 0.2, 0.3], dtype=tf.complex64) 
accum2 = tf.Variable([0, 1.2, -3.3], dtype=tf.complex64) 
lr = 0.01
grad = tf.constant([0.1, 0.2, 0.3])
momentum = 0.9

# crash
tf.raw_ops.ResourceApplyAdagrad(
    var=var.handle,
    accum=accum.handle,
    lr=lr,
    grad=grad,
    use_locking=False,
)

# crash
# tf.raw_ops.ResourceApplyAdagradDA(var=var.handle,
#               gradient_accumulator=accum.handle,
#               gradient_squared_accumulator=accum2.handle,
#               grad=grad,  lr=lr,
#               l1=lr, l2=lr, global_step=1000,
#               use_locking=False)

# crash
# tf.raw_ops.ResourceApplyAdagradV2(var=var.handle,
#                 accum=accum.handle,
#                 epsilon = 0.9,
#                 grad=grad, lr=lr,
#                 use_locking=False,update_slots=False)
```


### Relevant log output

```shell
2024-06-06 01:18:44.797518: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-06-06 01:18:44.829812: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-06-06 01:18:45.875807: F tensorflow/core/framework/tensor.cc:844] Check failed: dtype() == expected_dtype (8 vs. 1) float expected, got complex64
Aborted (core dumped)
```