Closed XMol closed 10 months ago
Hi Xavier,
Hello @marcvs,
you outed yourself as "responsible for Windows" in #521
that's only partly the case
When trying to start
oidc-agent
without any customization, it fails with "Could not make temp socket directory" error, I assume because it constructed an illegal TEMP file path.2023-11-02 16:21:08 oidc-agent.p DEBUG: (src/ipc/serveripc.c:46) Using tmp dir: C:\Users\xavier/Users/xavier/AppData/Local/Temp
Indeed, it looks like it constructs a wrong path. I'll look into it.
I did something that hopefully fixes the issue. (The path things with windows and msys is all a bit weird, so "hopefully" is the best we currently have).
Could you please try to use the binaries at https://git.scc.kit.edu/m-team/oidc-agent/-/jobs/1129259/artifacts/browse/bin/ and report back the result.
Could you please try to use the binaries at https://git.scc.kit.edu/m-team/oidc-agent/-/jobs/1129259/artifacts/browse/bin/ and report back the result.
Shall I just dump them into the install dir of oidc-agent
, replacing the existing binaries?
Yes
Something is still going wrong...
PS U:\> oidc-agent.exe --debug
Error: Could not make temp socket directory
Yet, oidc-agent.log
was written to a different directory now:
PS U:\> type C:\Users\xavier\AppData\Local\oidc-agent\oidc-agent\oidc-agent.log
2023-11-06 10:26:19 oidc-agent.p ALERT: (src/ipc/serveripc.c:64) No such file or directory
2023-11-06 10:26:42 oidc-agent.p DEBUG: (src/ipc/serveripc.c:200) initializing server ipc
2023-11-06 10:26:42 oidc-agent.p DEBUG: (src/ipc/serveripc.c:46) Using tmp dir: C:\Users\xavier/Users/xavier/AppData/Local/Temp
2023-11-06 10:26:42 oidc-agent.p ALERT: (src/ipc/serveripc.c:64) No such file or directory
2023-11-06 10:28:57 oidc-agent.p DEBUG: (src/ipc/serveripc.c:200) initializing server ipc
New link: https://git.scc.kit.edu/m-team/oidc-agent/-/jobs/1129346/artifacts/browse/bin/
I actually forgot to use my newly implemented function, so it could not work before; I also added some debug logging.
Again same outcome
2023-11-06 12:51:25 oidc-agent.p DEBUG: (src/ipc/serveripc.c:200) initializing server ipc
2023-11-06 12:51:25 oidc-agent.p DEBUG: (src/ipc/serveripc.c:46) Using tmp dir: C:\Users\xavier/Users/xavier/AppData/Local/Temp
2023-11-06 12:51:25 oidc-agent.p ALERT: (src/ipc/serveripc.c:64) No such file or directory
mmh, are you sure the correct binary is used?
There should be at least some additional debug message, similar to:
2023-11-06 13:10:11 oidc-agent.p DEBUG: (src/ipc/serveripc.c:200) initializing server ipc
2023-11-06 13:10:11 oidc-agent.p DEBUG: (src/utils/tempenv.c:83) We are in a windows non-msys terminal and determine the tmp dir
2023-11-06 13:10:11 oidc-agent.p DEBUG: (src/utils/tempenv.c:91) $TEMP is '/AppData/Local/Temp/393'
2023-11-06 13:10:11 oidc-agent.p DEBUG: (src/utils/tempenv.c:110) $USERPROFILE is 'C:\Users\ib9131'
2023-11-06 13:10:11 oidc-agent.p DEBUG: (src/ipc/serveripc.c:46) Using tmp dir: C:\Users\ib9131/AppData/Local/Temp/393
No, I'm not, but I don't know how to make sure of that either. I again...
oidc-agent
⇒ I was asked for permission to replace 34 filesoidc-agent
in a new PowerShell session with fully qualified path to oidc-agent.exe
I have not rebooted and the outcome stays the same once more.
2023-11-06 14:08:26 oidc-agent.p DEBUG: (src/ipc/serveripc.c:200) initializing server ipc
2023-11-06 14:08:26 oidc-agent.p DEBUG: (src/ipc/serveripc.c:46) Using tmp dir: C:\Users\uv7044/Users/uv7044/AppData/Local/Temp
2023-11-06 14:08:26 oidc-agent.p ALERT: (src/ipc/serveripc.c:64) No such file or directory
This is the MD5SUM of my binary
PS U:\> Get-FileHash 'C:\Program Files\oidc-agent\oidc-agent.exe' -Algorithm MD5
Algorithm Hash Path
--------- ---- ----
MD5 FBA28FF27A536AA17BC92B3BC4DF3A03 C:\Program Files\oidc-agent\oidc-agent.exe
Yes that's still the old version - the md5 from the above link is 26361ADEF09927840096BA898FB17A56
.
Seems like the binary was not replaced.
Ah, the artifacts archive has the binaries in a bin
subfolder, whereas the binaries installer by the Windows installer are in the top level installation directory. So I moved all of them and now the behavior is different.
PS U:\> 'C:\Program Files\oidc-agent\oidc-agent.exe'
C:\Program Files\oidc-agent\oidc-agent.exe
Cannot use any of the command line options --debug
, -debug
, -d
, --status
or --help
since those trigger an "unexpected token" error. So I continued with wlcg-gen.exe
, but didn't get far... Turns out, running the command with fully qualified path now breaks them, so I have to rely on the environment.
PS U:\> oidc-agent.exe --debug
OIDC_SOCK=C:\Users\uv7044/AppData/Local/Temp/oidc-1BY37y/oidc-agent.1
OIDCD_PID=862
PS U:\> oidc-agent.exe --status
####################################
## oidc-agent status ##
####################################
This agent is running version 5.0.2.
This agent was started with the following options:
Lifetime: Forever
Confirm: false
Autoload: true
Auto Re-authenticate: true
Use custom URI scheme: true
Webserver: true
Allow ID-Token: false
Group: false
Daemon: true
Log Debug: true
Log to stderr: false
Currently there are 0 accounts loaded:
2023-11-06 15:54:48 oidc-agent.p DEBUG: (src/utils/tempenv.c:83) We are in a windows non-msys terminal and determine the tmp dir
2023-11-06 15:54:48 oidc-agent.p DEBUG: (src/utils/tempenv.c:91) $TEMP is '/Users/xavier/AppData/Local/Temp'
2023-11-06 15:54:48 oidc-agent.p DEBUG: (src/utils/tempenv.c:110) $USERPROFILE is 'C:\Users\xavier'
2023-11-06 15:54:48 oidc-agent.p DEBUG: (src/ipc/serveripc.c:46) Using tmp dir: C:\Users\xavier/AppData/Local/Temp
2023-11-06 15:54:48 oidc-agent.p DEBUG: (src/ipc/serveripc.c:248) binding ipc
2023-11-06 15:54:48 oidc-agent.p DEBUG: (src/ipc/serveripc.c:269) listen ipc
Thanks @zachmann, it seems my issue has been resolved. 👍
I fixed our ci pipeline, so there is now also an installer for the fixed version available at:
FYI, I was able to obtain an access-token now just fine. Hence, this issue may be closed, unless you'd like to resolve it in tandem with a commit/pull-request/release.
Hello @marcvs,
you outed yourself as "responsible for Windows" in #521, so maybe you can help me with
oidc-agent
crashing on Windows with STATUS_ACCESS_VIOLATION exception?I'm using
oidc-agent
v5.0.1, installed from repo.data.kit.edu on Windows 10 Enterprise N 22H2 with current updates.When trying to start
oidc-agent
without any customization, it fails with "Could not make temp socket directory" error, I assume because it constructed an illegal TEMP file path.With an explicit socket-path though the above stackdump is generated.
Since there is barely any documentation regarding Windows, can you tell me whether I did something wrong?
Best regards, Xavier.