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

openssl: add SSL_ERROR_SYSCALL case #6489

Merged
merged 1 commit into from
Dec 3, 2022

Conversation

nokute78
Copy link
Collaborator

@nokute78 nokute78 commented Dec 1, 2022

This patch is to print errno when openssl API returns SSL_ERROR_SYSCALL.
There are several issues that SSL_ERROR_SYSCALL(=5) returned. #6431 #5705

Example SSL error log

[2022/11/21 11:57:45] [error] [tls] error: error:00000005:lib(0):func(0):DH lib

The value of SSL_ERROR_SYSCALL

$ grep SSL_ERROR_SYSCALL /usr/include/openssl/*
/usr/include/openssl/ssl.h:# define SSL_ERROR_SYSCALL               5/* look at error stack/return

OpenSSL man page

https://www.openssl.org/docs/man3.1/man3/SSL_get_error.html

SSL_ERROR_SYSCALL
Some non-recoverable, fatal I/O error occurred. The OpenSSL error queue may contain more information on the error. 
For socket I/O on Unix systems, consult errno for details. 
If this error occurs then no further I/O operations should be performed on the connection and SSL_shutdown() must not be called.

This value can also be returned for other errors, check the error queue for details.

Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • [N/A] Example configuration file for the change
  • [N/A] Debug log output from testing the change
  • [N/A] Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

Documentation

  • [N/A] Documentation required for this feature

Backporting

  • [N/A] Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Signed-off-by: Takahiro Yamashita <nokute78@gmail.com>
@nokute78 nokute78 temporarily deployed to pr December 1, 2022 10:19 Inactive
@nokute78 nokute78 temporarily deployed to pr December 1, 2022 10:19 Inactive
@nokute78 nokute78 temporarily deployed to pr December 1, 2022 10:38 Inactive
@edsiper edsiper merged commit 7ea4fd3 into fluent:master Dec 3, 2022
@nokute78 nokute78 deleted the handle_SSL_ERROR_SYSCALL branch December 3, 2022 04:49
sumitd2 pushed a commit to sumitd2/fluent-bit that referenced this pull request Feb 8, 2023
Signed-off-by: Takahiro Yamashita <nokute78@gmail.com>
Signed-off-by: root <root@sumit-acs.novalocal>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants