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

Version 1.5.7 - Frequent 'SSL SYSCALL error: EOF detected' #658

Closed
jopotts opened this issue May 30, 2019 · 13 comments

Comments

Projects
None yet
5 participants
@jopotts
Copy link

commented May 30, 2019

Frequently showing 'SSL SYSCALL error: EOF detected' errors since update to 1.5.7. I have no further details other than the connection is via SSH. I can't say for sure that it's not environmental but thought I'd post in case others are also experiencing the same issue.

Postico version: 1.5.7 (4775)
macOS version: 10.14.5 (18F132)
PostgreSQL version: 9.3.18

@mdelete

This comment has been minimized.

Copy link

commented May 31, 2019

Same here!

Postico Version: Version 1.5.7 (4775) (Licensed)
macOS: latest
PostgresSQL version: 9.6 and 11.2 (Connection is via SSH pubkey)

  • Normal tables (I would say <1kb per row) work fine even with tens of millions rows
  • Tables with some data in them (I would say >4kb and <8kb per row) yield 'SSL SYSCALL error: EOF detected' after about 50 to 150 returned rows, even if the table consists only of a few hundred or thousand rows.

This did not happen with any previous versions of postico!

@jakob

This comment has been minimized.

Copy link
Owner

commented Jun 3, 2019

Sorry for the slow response. Unfortunately I have not been able to reproduce the issue. The only change between 1.5.6 and 1.5.7 that sounds like it would cause something like this is that I've updated libssh2 and OpenSSL. There's nothing suspicious in the OpenSSL change logs, but there is one bugfix in libssh2 that looks suspicious.

I made a new build of Postico with a new version of libssh2. Could you try if this build works?

https://eggerapps-downloads.s3.amazonaws.com/postico-4816.zip

If this build exhibits the same symptoms, could you try to come up with a sample query that reproduces the bug? Something like this:

select repeat('a',5*1000*1000) from generate_series(1,150);

(the above query does not cause issues for me, but I'd love to hear if it works for you)

@jopotts

This comment has been minimized.

Copy link
Author

commented Jun 3, 2019

Thanks Jakob. I tried the sample query and it works fine, and I've also been trying to reproduce the general issue (on the original build) but so far things are working as expected! If/when it happens again, I'll try the new build to see if that solves things. Perhaps it was a one-off networking issue and nothing to do with Postico. I'll keep you posted.

@jakob

This comment has been minimized.

Copy link
Owner

commented Jun 3, 2019

@jopotts I don't think it's a "one off" issue since I've received more than one report. If it is caused by the bug fixed here libssh2/libssh2@f5e84ae it would probably depend a lot on network conditions, and only happen in certain circumstances (making it difficult to reproduce)

@jakob jakob changed the title Version 1.4.7 - Frequent 'SSL SYSCALL error: EOF detected' Version 1.5.7 - Frequent 'SSL SYSCALL error: EOF detected' Jun 3, 2019

@guillaumealgis

This comment has been minimized.

Copy link

commented Jun 3, 2019

I also have a problem with 1.5.7 which seems to be related to this error (even though I don't have this specific error message).

When doing select * from my_table limit 100; things work fine, but with limit 1000 I get:

server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

Using the build you posted here (postico-4816) fixes the problem.

Postico Version: Version 1.5.7 (4775)
macOS: 10.14.3 (18D109)
PostgreSQL 10.7 on x86_64-pc-linux-gnu
Connecting via SSH using pubkey, over a VPN

@mdelete

This comment has been minimized.

Copy link

commented Jun 3, 2019

I just did a side-by-side comparison with 1.5.7 and 4812, and I can confirm, that the issue is gone with 4812.

I can also confirm that the SQL statement would trigger the bug, as it immediately yields 'SSL SYSCALL error: EOF detected' with the 1.5.7 and works fine with 4816

@jakob

This comment has been minimized.

Copy link
Owner

commented Jun 3, 2019

We were able to reproduce the issue in the mean time as well. The problem indeed seems to be caused by the bug in libssh2.

We will release Postico 1.5.8 with this fix right away.

One thing we should also consider is to improve the error message. This is clearly a problem with the SSH tunnel, but Postico does not display the SSH tunnel error message. Unfortunately fixing this is not trivial, so we will fix the error message at a later date.

@jakob

This comment has been minimized.

Copy link
Owner

commented Jun 3, 2019

Postico 1.5.8 is now available for download at https://eggerapps.at/postico/! Thanks a lot for testing @jopotts @guillaumealgis and @mdelete!

@jakob jakob closed this Jun 3, 2019

@guillaumealgis

This comment has been minimized.

Copy link

commented Jun 3, 2019

Thanks for the quick fix @jakob !

@mdelete

This comment has been minimized.

Copy link

commented Jun 3, 2019

Also thanks from me! Great job!

@m-gendi

This comment has been minimized.

Copy link

commented Jun 6, 2019

I'm still having the 'SSL SYSCALL error: EOF detected' message frequently:

Postico version: 1.5.8 (4819)
macOS version: 10.14.5 (18F132)
PostgreSQL version: 9.6.10

@jakob

This comment has been minimized.

Copy link
Owner

commented Jun 6, 2019

@m-gendi The "EOF detected" message is pretty generic, it just means that the connection was lost or closed unexpectedly. If you still see this message in 1.5.8, it's most likely a separate issue. A common reason for this are overly eager firewalls that close idle connections after a short timeout, or unstable connections.

Just to make sure I'm not missing anything, can you check two things:

  1. Which versions of Postico show the "EOF detected" message? Do you see the error for 1.5.6, 1.5.7 and for 1.5.8?

Download Links:
https://eggerapps-downloads.s3.amazonaws.com/postico-1.5.6.zip
https://eggerapps-downloads.s3.amazonaws.com/postico-1.5.7.zip
https://eggerapps-downloads.s3.amazonaws.com/postico-1.5.8.zip

(you can check the version that is currently running by going to Postico -> About Postico)

  1. Does the "EOF detected" message also occur when you open an SSH tunnel manually from Terminal?
@m-gendi

This comment has been minimized.

Copy link

commented Jun 17, 2019

I still have the EOF problem using the terminal so it's probably the firewall config. Thanks a lot @jakob !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.