Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different parameter interpretation between shell and --exec (shell none) #12649

Open
1 of 2 tasks
arixmkii opened this issue Mar 1, 2025 · 10 comments
Open
1 of 2 tasks

Comments

@arixmkii
Copy link

arixmkii commented Mar 1, 2025

Windows Version

Microsoft Windows [Version 10.0.26100.3194]

WSL Version

2.4.11.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.167.4-microsoft-standard-WSL2

Distro Version

Ubuntu 24.04.2 LTS

Other Software

No response

Repro Steps

Try to use ssh-keygen w/o passphrase.

Run:

wsl --exec ssh-keygen -t ed25519 -q -N "" -C user -f /tmp/user

Error:

The parameter is incorrect.
Error code: Wsl/Service/E_INVALIDARG

Originally this was discovered running the command programmatically spawning child process passing empty string as one of the args.

Expected Behavior

Using shell works as expected

wsl ssh-keygen -t ed25519 -q -N "" -C user -f /tmp/user

Output:

/tmp/user already exists.
Overwrite (y/n)? n

Actual Behavior

Error:

The parameter is incorrect.
Error code: Wsl/Service/E_INVALIDARG

Diagnostic Logs

No response

@arixmkii
Copy link
Author

arixmkii commented Mar 1, 2025

It might be expected behavior, but I could not find any documentation about this discrepancy.

Copy link

github-actions bot commented Mar 1, 2025

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

@arixmkii
Copy link
Author

arixmkii commented Mar 1, 2025

/question

Copy link

github-actions bot commented Mar 1, 2025

Diagnostic information
Found '/question', adding tag 'question'

@arixmkii
Copy link
Author

arixmkii commented Mar 1, 2025

Also reproduced with --shell-type

wsl --shell-type standard ssh-keygen -t ed25519 -q -N "" -C user -f /tmp/user
/tmp/user already exists.
Overwrite (y/n)? n

wsl --shell-type login ssh-keygen -t ed25519 -q -N "" -C user -f /tmp/user
/tmp/user already exists.
Overwrite (y/n)?  n

wsl --shell-type none ssh-keygen -t ed25519 -q -N "" -C user -f /tmp/user
The parameter is incorrect.
Error code: Wsl/Service/E_INVALIDARG

@arixmkii arixmkii changed the title Different parameter interpretation between shell and --exec Different parameter interpretation between shell and --exec (shell none) Mar 1, 2025
Copy link

github-actions bot commented Mar 1, 2025

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@arixmkii
Copy link
Author

arixmkii commented Mar 1, 2025

This was marked as a bug before #6072 (comment) But has not been addressed and issue was closed based on inactivity.

Does this mean that it is not considered as a bug going further?

There is no point collecting logs for this rn as this is a repeat of the old issue, where logs were provided. Marking as question for now.

/question

Copy link

github-actions bot commented Mar 1, 2025

Diagnostic information
Found '/question', adding tag 'question'

@justus-camp-microsoft
Copy link
Collaborator

/logs

Copy link
Contributor

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants