GeezerVison is showing github.com — Windows 9.18: GSSAPI-enabled libpq causes "access violation writing 0x0" on connect, and a missing gssapi64.dll for pg_dump · Issue #10428 · pgadmin-org/pgadmin4
Windows 9.18: GSSAPI-enabled libpq causes "access violation writing 0x0" on connect, and a missing gssapi64.dll for pg_dump #10428DescriptionThe Bug:
Upon upgrading to version 9.18 from 9.17, all the database connections stopped working.
When trying to expand the database's entry in the Object Explorer, I get the "Connect To Server" dialog box with an error message:
exception: access violation writing 0x0000000000000000
Entering the password and clicking "OK" closes the box and re-opens it immediately.
Uninstalling 9.18 and re-installing 9.17 gets rid of the issue.
To Reproduce:
Install pgAdmin 9.18 and run it.
Click on any database in the Object Explorer:
Expected behavior:
It should immediately expand the database's node in the Object Explorer or
ask for the password without showing an error, accept the password and expand the node.
Version info:
OS: Windows 11 Pro
pgAdmin Version: 9.18
 Reacted by carlostorresoaxaca, Regina Obe, epoweripione, Julian Ozel Rose, Franz van Betteraey, Riccardo, psino-skg, Paal Holmen, Serkan YARAR, Adam Langmeyer and 5 more Activitysduffy77 commented on Sep 17, 2026 I just installed pgAdmin4 for the first time on my windows 11 machine and attempting to Register a new server and met with the same error code.
 nandfer881-spec commented on Sep 17, 2026 Tengo el mismo error al actualizar a la versión 9.18 nandfer881-spec commented on Sep 17, 2026 exception: access violation writing 0x0000000000000000 dev-hari-prasad commented on Sep 17, 2026 Thanks everyone for reporting the issue.
I'm Starting a investigation now. I will update my findings soon. Meanwhile if anyone else is facing the same issue please provide more context when possible.
Update: There is no error when it is a fresh install of pgAdmin. Works perfectly fine and as expected. Checking the upgrade behaviour, I'll update in a while. Reacted by carlostorresoaxaca and Riccardo carlostorresoaxaca commented on Sep 17, 2026
exception: access violation writing 0x0000000000000000
igual tengo ese problema con esa actualizacion...ciertamente cada actualizacion la he instalado y si funciona correctamente... pero esta 9.18 me sale exception: access violation writing 0x0000000000000000. he borrado la configuacion de mi servidor y la he vuelto a hacer y me sale lo mismo... Reacted by Hari Prasad and carlostorresoaxaca robe2 commented on Sep 17, 2026
Update: There is no error when it is a fresh install of pgAdmin. Works perfectly fine and as expected. Checking the upgrade behaviour, I'll update in a while.
I tried uninstalling and even wiping out my profile, it still gives the same access violation writing error after I reinstall 9.18.
One observation it seems to work fine with the windows servers (even my remote ones) I have registered, but not the Linux ones. RobertoAtEpoca commented on Sep 17, 2026
One observation it seems to work fine with the windows servers (even my remote ones) I have registered, but not the Linux ones.
In my case, my server is a Linux instance in AWS, so you might be onto something. dev-hari-prasad commented on Sep 17, 2026
One observation it seems to work fine with the windows servers (even my remote ones) I have registered, but not the Linux ones.
In my case, my server is a Linux instance in AWS, so you might be onto something.
@RobertoAtEpoca
Please don’t get me wrong or take this the wrong way. I’m not venting at you. I just want to point out that I have already spent a pretty significant amount of time and tokens investigating this based on the information in the original report.
Finding out only now that the affected server is a Linux instance in AWS changes the entire diagnosis workflow. The issue title and description make this look like a Windows 11 issue, when the latest comments suggest that the server OS may actually be a major part of what’s going on.
This also confuses the other users since they think to have the same problem here in this thread.
It would really help if as much relevant environment and reproduction information as possible could be included upfront, especially details that can completely change the direction of an investigation.
Given this new information, I'd also suggest updating the issue title and description to mention the Linux/AWS aspect and provide more context and information and possibly non sensitive/retracted logs. That should make the scope of the issue much clearer for anyone else looking into it and for me to diagnose this.
Again do not take this as a vent full message (it is not). dev-hari-prasad commented on Sep 17, 2026 Investigation Update 2:
I tried upgrading from 9.17 to 9.18 myself and didn’t run into any issues, everything worked as expected.
This suggests it’s probably not a straightforward Windows client upgrade issue, but something specific to certain environments (possibly the backend server OS/version or local machine config).
@RobertoAtEpoca @sduffy77 @nandfer881-spec @carlostorresoaxaca @robe2 (and anyone reporting the same issue) could you share a bit more about your setup? Would be helpful if you shared:
- Is pgAdmin running on Windows only, or Linux/Mac too?
- What OS/version is the database server running (Windows, Linux, AWS RDS, etc.)?
- Any non-default config like SSH tunnels, SSL, or specific auth methods?
This should help narrow down what’s actually triggering the access violation so we can solve the issue. changed the title [-]Upgrade to 9.18 on Windows 11 Pro can't connect to any DB[/-] [+]Upgrade to 9.18 on Windows 11 Pro can't connect to Aurora PostgreSQL[/+] on Sep 17, 2026RobertoAtEpoca commented on Sep 17, 2026 pgAdmin: 9.18 on Windows 11 Pro.
Server: Aurora PostgreSQL (AWS)
Worked perfectly on 9.17
Stopped working after upgrade to 9.18
Started working again after reverting to 9.17 robe2 commented on Sep 17, 2026 On further inspection, I think the issue might be with GSS, mode.
I noticed on the Linux ones that weren't working, if I set GSS encode mode = disable, then it works..
I tried this with 3 Linux that weren't working and fixed in all cases.
- Uses standard connection - Debian 13
- One uses SSL Tunnel - Debian 13
- One on CrunchyData Dbaas
* Is pgAdmin running on Windows only, or Linux/Mac too?
I'm on Windows 11, 9.18
* What OS/version is the database server running (Windows, Linux, AWS RDS, etc.)?
I have a mix as mentioned the Windows ones all work and they are running PostgreSQL 15 or 18.
The Linux ones are on VMs or Crunchy and don't work
* Any non-default config like SSH tunnels, SSL, or specific auth methods?
As mentioned adding the GSS encmode = disable fixes the issue Reacted by maxboar, epoweripione, 蓝天, Rameenh, Angel Adrian Alcalá Isuiza, psino-skg, JanEgner, jpedrelli, huichochitlan18, bbarqawii and 15 more Reacted by Xiller and Twenty Reacted by Hari Prasad, huichochitlan18, James Morgan, Twenty and Dora dev-hari-prasad commented on Sep 17, 2026 Thanks for updating the title of the issue @RobertoAtEpoca. Would you please update the description to reflect the same issue. This would leave no scope of confusion for anyone visiting the issue. dev-hari-prasad commented on Sep 17, 2026 Yes, I was thinking along the same lines too. Thanks a lot @robe2 for testing and confirming this!
Technical breakdown for later
Why this happens
-
The protocol handshake
PostgreSQL 12+ libpq defaults to gssencmode=prefer. Before authentication, it sends an 8-byte GSSENC_REQ packet (80877104).
- Windows PostgreSQL servers, which are typically built without GSSAPI encryption, reply with
N (declined). Libpq then falls back to standard SSL/password authentication, which explains why connections to Windows-hosted servers work fine.
- Linux and cloud-hosted PostgreSQL servers, such as Debian, Ubuntu, CrunchyData, and AWS Aurora/RDS, are often built with GSSAPI support and reply with
G (accepted).
-
Where the crash occurs
When the server replies with G, libpq enters CONNECTION_GSS_STARTUP and calls gss_init_sec_context through the Kerberos DLLs.
On Windows, MIT Kerberos tries to locate the default credential cache (API: / CCAPI). However, the Windows installer stages the Kerberos DLLs in Make.bat (lines 201–206) without bundling ccapi64.dll.
This seems to leave the CCAPI dispatch table uninitialized. Eventually, krb5_64.dll makes a call through a null function pointer, resulting in the access violation.
Since pgAdmin on Windows uses pq_ctypes in this setup, CPython catches the access violation and raises:
OSError: exception: access violation writing 0x0000000000000000
The error then bubbles up through servers/__init__.py:1718. Since conn.connect() only catches psycopg.Error, the OSError reaches the broader exception handler, which treats it as an HTTP 401 challenge and displays it in the password modal.
Thanks again @robe2! FrVaBe commented on Sep 18, 2026 Same error here since upgrade to 9.17 (if I remember correct). Update to 9.18 does not fix it.
I installed on Windows and I am unsure if I changed the mode ("only for me"/"for all") during update.
Tried to clean up the whole system (uninstalled installations and removed file system folders of pgadmin) und reinstalled 9.18 but error still exists. Try to go back to 9.16 now...
Deinstalled everything and removed folders from c:\Users\xxx\AppData\Local\ and c:\Program Files. Reinstalled 9.16 "for all users". Works now (still see old server configurations by the way). andrusw commented on Sep 18, 2026 Yeah, I uninstall 9.18 and reinstalled 9.17 and got back into my server. Can't wait for a bug fix spiderIT2000 commented on Sep 18, 2026 Hello - currently had this problem with my clients. They downloaded 9.18 and got the exception error. I tried clean uninstall and reinstall 9.18, did not work. I then did another clean uninstall and installed 9.17 instead. Everything works now. ErwinWargocki commented on Sep 18, 2026 Hi, I can confirm that the Error: exception: access violation writing 0x0000000000000000 in version 9.18 is currently there. I uninstalled and installed version 9.17 everything is now working perfectly Raymondo97 commented on Sep 18, 2026 I can confirm this issue as well, with a few additional data points that may help narrow it down.
I tested the following on the same Windows machine and with the same saved PostgreSQL server configurations:
- pgAdmin 9.17, per-user install: all three of my PostgreSQL servers connected successfully.
- pgAdmin 9.18, per-user install: all three servers fail with
exception: access violation writing 0x0000000000000000.
- pgAdmin 9.18, all-users install: same failure.
So in my case, the installation scope (per-user vs. all-users) does not appear to affect the issue. The regression is reproducible specifically with 9.18.
The relevant pgadmin4.log traceback ends here:
File "...\psycopg\pq\pq_ctypes.py", line 127, in connect_poll
return self._call_int(impl.PQconnectPoll)
File "...\psycopg\pq\pq_ctypes.py", line 814, in _call_int
return func(self._pgconn_ptr)
OSError: exception: access violation writing 0x0000000000000000
I also tested the suggested GSS workaround on one of the affected servers:
With that parameter set, pgAdmin 9.18 connects successfully. Removing the parameter immediately reproduces the access violation again.
I additionally checked the browser developer console at verbose logging. The failed connection produces:
POST http://127.0.0.1:<port>/browser/server/connect/... 401 (UNAUTHORIZED)
but I did not find anything there more informative than the Python traceback above.
So my results are:
9.17 + default GSS behavior -> works
9.18 + default GSS behavior -> access violation in PQconnectPoll()
9.18 + gssencmode=disable -> works
This appears consistent with the GSS-related failure already being investigated in this issue. changed the title [-]Upgrade to 9.18 on Windows 11 Pro can't connect to Aurora PostgreSQL[/-] [+]Windows 9.18: GSSAPI-enabled libpq causes "access violation writing 0x0" on connect, and a missing gssapi64.dll for pg_dump[/+] on Sep 21, 2026dpage commented on Sep 21, 2026 Thanks all for the reports, and thanks in particular to @robe2 for spotting the GSS connection and to @dev-hari-prasad for digging into it. #10430, #10435 and #10437 are the same bug, so I've closed those as duplicates and we'll track it here. I've also retitled this one to describe what's actually going on.
Root cause: the PostgreSQL 18 client binaries bundled with 9.18 were built with GSSAPI (MIT Kerberos) support, whilst the 9.17 ones were not. I confirmed that by comparing the import tables of runtime\libpq.dll in the two shipped installers:
- 9.17:
advapi32, kernel32, libcrypto-3-x64, libintl-8, libssl-3-x64, secur32, shell32, vcruntime140, wldap32, ws2_32
- 9.18: the same, plus
gssapi64.dll
That one change produces both of the symptoms reported here.
Connections failing with the access violation. With GSSAPI actually compiled in, libpq's default gssencmode=prefer now offers GSS encryption on every connection. Servers that decline it are unaffected, which is why PostgreSQL on Windows keeps working, whilst servers that accept it (most Linux and cloud builds, Aurora and RDS included) send libpq into the Kerberos DLLs, where it dies writing to a null pointer. Because the Windows build ends up using psycopg's ctypes binding to libpq, CPython catches the access violation and turns it into an OSError rather than taking the process down with it, which is why it surfaces as text in the Connect to Server dialog.
pg_dump unable to find gssapi64.dll (#10435). runtime\pg_dump.exe loads runtime\libpq.dll, which now needs gssapi64.dll, but our installer stages the Kerberos DLLs into the python directory only, and never alongside libpq and the client binaries.
Workarounds until a fix ships: set GSS encmode to disable in the server's connection properties, or add the python directory to PATH for the pg_dump case, or stay on 9.17. I'm working on a proper fix now. Reacted by Thomas and Adam Langmeyer dpage commented on Sep 21, 2026 Fix proposed in #10440. It needs a Windows build to verify, so it is not merged yet; in the meantime the workaround above (setting GSS encmode to disable on the server) still applies. Reacted by JanEgner and Adam Langmeyer Reacted by Franz van Betteraey, Thomas and Adam Langmeyer notjatin commented on Oct 3, 2026 I am facing the same issue, when connecting to a WSL local instance on version 9.18. Downgrading to 9.17 solved this for me. This should still be open. ImBoop commented on Oct 13, 2026
25. Fix proposed in #10440. It needs a Windows build to verify, so it is not merged yet; in the meantime the workaround above (setting GSS encmode to disable on the server) still applies.
That's not a fix when you actually need gssencmode. Is there any reason a hotfix hasn't been released as a minor version change? Leaving a broken release without any notice on the website seems subpar; at the very least, encouragement to use a nightly release or downgrading to 9.17 for windows users would probably be ideal. Reacted by dan-constantinescu, oaewcris-devmgs, Geo-System, Eyedea Recognition, Hannah Vernon, Manuel Verwendel and Parsa Akbari
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|