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

Updated version do not work #185

Closed
juev opened this issue Sep 24, 2021 · 7 comments
Closed

Updated version do not work #185

juev opened this issue Sep 24, 2021 · 7 comments
Labels
question Further information is requested

Comments

@juev
Copy link

juev commented Sep 24, 2021

Describe the bug
I used godror version v0.25.3, after updating to version v0.26.3 without changes in code I have errors in my logs: context deadline exceeded.

To Reproduce
Just:

go get -u
go mod tidy

in my project directory.

Expected behavior
After updating all work correctly.

Error output
Copy the error output (panic, stack trace),
or the output of running with DPI_DEBUG_LEVEL=92.

Your oracle client version
19.8

Your godror version
v0.26.3

Your go version
1.17.1

Your gcc version

Machine (please complete the following information):

  • OS: Linux
  • Architecture: x86_64
  • Version: alpine-3.13_glibc-2.32

Additional context
Add any other context about the problem here.

What happened? What changed on these versions?

@tgulacsi tgulacsi added the question Further information is requested label Sep 24, 2021
@tgulacsi
Copy link
Contributor

Yes, v0.26.3 contains some deadline handling changes, but more info is needed:
what kind of statement, after how long, and with that context.Deadline ?

@juev
Copy link
Author

juev commented Sep 24, 2021

I use connection with:

user="%s" password="%s" connectString="%s"

and I do not used context.Deadline.

My connectString just connect descriptor like (DESCRIPTION=...)

I open connection and setting with:

database.pool, err = sql.Open(database.Driver, database.Dsn)
...
database.pool.SetMaxIdleConns(database.MaxIdleCons)
database.pool.SetMaxOpenConns(database.MaxOpenCons)

I use ping for checking connection:

db.pool.PingContext(ctx)

and query with context:

ctx, cancel := context.WithTimeout(context.Background(), time.Duration(query.Timeout)*time.Second)
defer cancel()

rows, err := database.pool.QueryContext(ctx, query.SQL)

Version v0.25.3 worked fine, but new version do not work.

Ping and query return error about context deadline.

I tried to use query.Timeout more than 60 seconds, but this not resolve my issue. Version v0.25.3 proceeded query less than second.

@sudarshan12s
Copy link
Collaborator

sudarshan12s commented Sep 25, 2021

I use connection with:

user="%s" password="%s" connectString="%s"

and I do not used context.Deadline.

My connectString just connect descriptor like (DESCRIPTION=...)

I open connection and setting with:

database.pool, err = sql.Open(database.Driver, database.Dsn)
...
database.pool.SetMaxIdleConns(database.MaxIdleCons)
database.pool.SetMaxOpenConns(database.MaxOpenCons)

I use ping for checking connection:

db.pool.PingContext(ctx)

and query with context:

ctx, cancel := context.WithTimeout(context.Background(), time.Duration(query.Timeout)*time.Second)
defer cancel()

rows, err := database.pool.QueryContext(ctx, query.SQL)

Version v0.25.3 worked fine, but new version do not work.

Ping and query return error about context deadline.

I tried to use query.Timeout more than 60 seconds, but this not resolve my issue. Version v0.25.3 proceeded query less than second.

Can you provide output after setting this environment variable.

export DPI_DEBUG_LEVEL=92

on shell, after setting above variable, you can run the program. you should see something like this in console, can you share your console output. I tried simple query, ping with v0.25.3 , latest version, could not see difference . may be something i am missing.

ODPI [670121] 2021-09-25 11:15:11.827: ODPI-C 4.2.1
ODPI [670121] 2021-09-25 11:15:11.828: debugging messages initialized at level 92
Time now 2021-09-25 11:15:11.829907 +0530 IST m=+0.000468375
ODPI [670121] 2021-09-25 11:15:11.830: fn start dpiContext_createWithParams
ODPI [670121] 2021-09-25 11:15:11.830: Context Parameters:
ODPI [670121] 2021-09-25 11:15:11.830: Environment Variables:
ODPI [670121] 2021-09-25 11:15:11.830: ORACLE_HOME => "/Users/sudarshs/ociissuereleasedbin/instantclient_19_3/"
ODPI [670121] 2021-09-25 11:15:11.830: TNS_ADMIN => "/Users/sudarshs/ociissuereleasedbin/instantclient_19_3/"
ODPI [670121] 2021-09-25 11:15:11.830: DYLD_LIBRARY_PATH => "/Users/sudarshs/ociissuereleasedbin/instantclient_19_3"
ODPI [670121] 2021-09-25 11:15:11.830: check module directory
ODPI [670121] 2021-09-25 11:15:11.830: module name is /Users/sudarshs/Oracle Content - Accounts/Oracle Content/backupdata/macwork/Work/github25.3/godror/examples/./examples
ODPI [670121] 2021-09-25 11:15:11.830: load in dir /Users/sudarshs/Oracle Content - Accounts/Oracle Content/backupdata/macwork/Work/github25.3/godror/examples/.
ODPI [670121] 2021-09-25 11:15:11.830: load with name /Users/sudarshs/Oracle Content - Accounts/Oracle Content/backupdata/macwork/Work/github25.3/godror/examples/./libclntsh.dylib
ODPI [670121] 2021-09-25 11:15:11.852: load by OS successful
ODPI [670121] 2021-09-25 11:15:11.852: validating loaded library
ODPI [670121] 2021-09-25 11:15:11.867: fn end dpiContext_createWithParams -> 0
ODPI [670121] 2021-09-25 11:15:11.867: fn start dpiContext_getClientVersion(0xcb069f0)
ODPI [670121] 2021-09-25 11:15:11.867: fn end dpiContext_getClientVersion(0xcb069f0) -> 0
ODPI [670121] 2021-09-25 11:15:11.867: fn start dpiContext_initCommonCreateParams(0xcb069f0)
ODPI [670121] 2021-09-25 11:15:11.867: fn end dpiContext_initCommonCreateParams(0xcb069f0) -> 0
ODPI [670121] 2021-09-25 11:15:11.867: fn start dpiContext_initPoolCreateParams(0xcb069f0)
ODPI [670121] 2021-09-25 11:15:11.867: fn end dpiContext_initPoolCreateParams(0xcb069f0) -> 0
ODPI [670121] 2021-09-25 11:15:11.867: fn start dpiPool_create(0xcb069f0)
ODPI [670121] 2021-09-25 11:15:14.583: fn end dpiPool_create(0xcb069f0) -> 0
ODPI [670121] 2021-09-25 11:15:14.583: fn start dpiPool_setStmtCacheSize(0xcb06ca0)
ODPI [670121] 2021-09-25 11:15:14.583: fn end dpiPool_setStmtCacheSize(0xcb06ca0) -> 0
ODPI [670121] 2021-09-25 11:15:14.583: fn start dpiContext_initConnCreateParams(0xcb069f0)
ODPI [670121] 2021-09-25 11:15:14.583: fn end dpiContext_initConnCreateParams(0xcb069f0) -> 0
ODPI [670121] 2021-09-25 11:15:14.583: fn start dpiConn_create(0xcb069f0)
ODPI [670121] 2021-09-25 11:15:14.583: fn end dpiConn_create(0xcb069f0) -> 0
ODPI [670121] 2021-09-25 11:15:14.583: fn start dpiConn_prepareStmt(0xbb0a3c0)
ODPI [670121] 2021-09-25 11:15:14.583: SQL SELECT DBTIMEZONE as dbTZ, NVL(TO_CHAR(SYSTIMESTAMP, 'tzr'), TO_CHAR(SYSTIMESTAMP, 'TZH:TZM')) AS dbOSTZ FROM DUAL
ODPI [670121] 2021-09-25 11:15:14.584: fn end dpiConn_prepareStmt(0xbb0a3c0) -> 0
ODPI [670121] 2021-09-25 11:15:14.584: fn start dpiStmt_getInfo(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.584: fn end dpiStmt_getInfo(0xcb08160) -> 0
ODPI [670121] 2021-09-25 11:15:14.584: fn start dpiStmt_setFetchArraySize(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.584: fn end dpiStmt_setFetchArraySize(0xcb08160) -> 0
ODPI [670121] 2021-09-25 11:15:14.584: fn start dpiStmt_setPrefetchRows(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.584: fn end dpiStmt_setPrefetchRows(0xcb08160) -> 0
ODPI [670121] 2021-09-25 11:15:14.584: fn start dpiStmt_execute(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiStmt_execute(0xcb08160) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiStmt_getQueryInfo(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiStmt_getQueryInfo(0xcb08160) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiConn_newVar(0xbb0a3c0)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiConn_newVar(0xbb0a3c0) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiStmt_define(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiStmt_define(0xcb08160) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiStmt_getQueryInfo(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiStmt_getQueryInfo(0xcb08160) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiConn_newVar(0xbb0a3c0)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiConn_newVar(0xbb0a3c0) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiStmt_define(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiStmt_define(0xcb08160) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiStmt_addRef(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiStmt_addRef(0xcb08160) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiStmt_fetchRows(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiStmt_fetchRows(0xcb08160) -> 0
godror WARNING: discrepancy between DBTIMEZONE ("+00:00"=0) and SYSTIMESTAMP ("-07:00"=-700) - set connection timezone, see https://github.com/godror/godror/blob/master/doc/timezone.md
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiVar_release(0x440e300)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiVar_release(0x440e300) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiVar_release(0x440cb40)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiVar_release(0x440cb40) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiStmt_release(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiStmt_release(0xcb08160) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiStmt_release(0xcb08160)
ODPI [670121] 2021-09-25 11:15:14.863: fn end dpiStmt_release(0xcb08160) -> 0
ODPI [670121] 2021-09-25 11:15:14.863: fn start dpiConn_setCallTimeout(0xbb0a3c0)
ODPI [670121] 2021-09-25 11:15:14.864: fn end dpiConn_setCallTimeout(0xbb0a3c0) -> 0
ODPI [670121] 2021-09-25 11:15:14.864: fn start dpiConn_ping(0xbb0a3c0)
ODPI [670121] 2021-09-25 11:15:15.145: fn end dpiConn_ping(0xbb0a3c0) -> 0
ODPI [670121] 2021-09-25 11:15:15.145: fn start dpiConn_setCallTimeout(0xbb0a3c0)
ODPI [670121] 2021-09-25 11:15:15.145: fn end dpiConn_setCallTimeout(0xbb0a3c0) -> 0
ODPI [670121] 2021-09-25 11:15:15.145: fn start dpiConn_release(0xbb0a3c0)
ODPI [670121] 2021-09-25 11:15:15.145: fn end dpiConn_release(0xbb0a3c0) -> 0
ODPI [670121] 2021-09-25 11:15:15.145: fn start dpiContext_initConnCreateParams(0xcb069f0)
ODPI [670121] 2021-09-25 11:15:15.145: fn end dpiContext_initConnCreateParams(0xcb069f0) -> 0
ODPI [670121] 2021-09-25 11:15:15.145: fn start dpiConn_create(0xcb069f0)
ODPI [670121] 2021-09-25 11:15:15.146: fn end dpiConn_create(0xcb069f0) -> 0
ODPI [670121] 2021-09-25 11:15:15.146: fn start dpiConn_prepareStmt(0x440e300)
ODPI [670121] 2021-09-25 11:15:15.146: SQL select ENAME from emp
ODPI [670121] 2021-09-25 11:15:15.146: fn end dpiConn_prepareStmt(0x440e300) -> 0
ODPI [670121] 2021-09-25 11:15:15.146: fn start dpiStmt_getInfo(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.146: fn end dpiStmt_getInfo(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.146: fn start dpiStmt_getBindCount(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.146: fn end dpiStmt_getBindCount(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.146: fn start dpiStmt_setFetchArraySize(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.146: fn end dpiStmt_setFetchArraySize(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.146: fn start dpiStmt_setPrefetchRows(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.146: fn end dpiStmt_setPrefetchRows(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.146: fn start dpiStmt_execute(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.429: fn end dpiStmt_execute(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.429: fn start dpiStmt_getQueryInfo(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.429: fn end dpiStmt_getQueryInfo(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.429: fn start dpiConn_newVar(0x440e300)
ODPI [670121] 2021-09-25 11:15:15.429: fn end dpiConn_newVar(0x440e300) -> 0
ODPI [670121] 2021-09-25 11:15:15.429: fn start dpiStmt_define(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.429: fn end dpiStmt_define(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.429: fn start dpiStmt_addRef(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.429: fn end dpiStmt_addRef(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.429: fn start dpiStmt_fetchRows(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.429: fn end dpiStmt_fetchRows(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.429: fn start dpiStmt_fetchRows(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.429: fn end dpiStmt_fetchRows(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.429: fn start dpiVar_release(0xbb0a480)
ODPI [670121] 2021-09-25 11:15:15.429: fn end dpiVar_release(0xbb0a480) -> 0
ODPI [670121] 2021-09-25 11:15:15.429: fn start dpiStmt_release(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.429: fn end dpiStmt_release(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.429: fn start dpiStmt_release(0x440cad0)
ODPI [670121] 2021-09-25 11:15:15.429: fn end dpiStmt_release(0x440cad0) -> 0
ODPI [670121] 2021-09-25 11:15:15.429: fn start dpiConn_release(0x440e300)
ODPI [670121] 2021-09-25 11:15:15.430: fn end dpiConn_release(0x440e300) -> 0

@juev
Copy link
Author

juev commented Sep 25, 2021

Sorry for delay.

Something strange. I wrote new simple program, like:

package main

import (
	"context"
	"database/sql"
	"fmt"
	_ "github.com/godror/godror"
	"log"
	"time"
)

// Database struct.
type Database struct {
	Dsn           string
	ID            string `yaml:"id"`
	Host          string `yaml:"host"`
	User          string `yaml:"user"`
	Password      string `yaml:"password"`
	Database      string `yaml:"database"`
	Port          int    `yaml:"port"`
	Driver        string `yaml:"driver"`
	MaxIdleCons   int    `yaml:"maxIdleCons"`
	MaxOpenCons   int    `yaml:"maxOpenCons"`
	ConnectString string `yaml:"connectString"`
	connection    string
	pool          *sql.DB
}

var (
	database Database
	err error
)

func main() {
	database = Database{
             // setup my structure with auth data
	}

	database.Dsn = fmt.Sprintf(
		`user="%s" password="%s" connectString="%s"`,
		database.User, database.Password, database.ConnectString)

	log.Printf("Setup connection for DB: %s", database.connection)
	database.pool, err = sql.Open(database.Driver, database.Dsn)

	if err != nil {
		log.Fatalf("Error on setting connection to database (%s): %v", database.connection, err)
	}
	
	database.pool.SetMaxIdleConns(database.MaxIdleCons)
	database.pool.SetMaxOpenConns(database.MaxOpenCons)

	ctx, cancel := context.WithTimeout(context.Background(), time.Duration(5)*time.Second)
	defer cancel()

	if err := database.pool.PingContext(ctx); err != nil {
		log.Fatalf("Error on check connection (ping) on db (%v): %v", database.ID, err)
	}
	log.Printf("Ping successful")
}

and I got successful ping:

GOROOT=/usr/local/opt/go/libexec #gosetup
GOPATH=/Users/d.evsyukov/go #gosetup
/usr/local/opt/go/libexec/bin/go build -o /private/var/folders/8b/299kg2l104n7nmw3pvqtrbqm0000gp/T/GoLand/___1go_build_godror . #gosetup
/private/var/folders/8b/299kg2l104n7nmw3pvqtrbqm0000gp/T/GoLand/___1go_build_godror
ODPI [24694050] 2021-09-25 18:46:34.996: ODPI-C 4.3.0-dev
ODPI [24694050] 2021-09-25 18:46:34.997: debugging messages initialized at level 92
2021/09/25 18:46:34 Setup connection for DB: 
ODPI [24694050] 2021-09-25 18:46:34.999: fn start dpiContext_createWithParams
ODPI [24694050] 2021-09-25 18:46:34.999: Context Parameters:
ODPI [24694050] 2021-09-25 18:46:34.999: Environment Variables:
ODPI [24694050] 2021-09-25 18:46:34.999:     LD_LIBRARY_PATH => "/Users/d.evsyukov/Downloads/instantclient_19_8"
ODPI [24694050] 2021-09-25 18:46:34.999: check module directory
ODPI [24694050] 2021-09-25 18:46:34.999: module name is /private/var/folders/8b/299kg2l104n7nmw3pvqtrbqm0000gp/T/GoLand/___1go_build_godror
ODPI [24694050] 2021-09-25 18:46:34.999: load in dir /private/var/folders/8b/299kg2l104n7nmw3pvqtrbqm0000gp/T/GoLand
ODPI [24694050] 2021-09-25 18:46:34.999: load with name /private/var/folders/8b/299kg2l104n7nmw3pvqtrbqm0000gp/T/GoLand/libclntsh.dylib
ODPI [24694050] 2021-09-25 18:46:34.999: load by OS failure: dlopen(/private/var/folders/8b/299kg2l104n7nmw3pvqtrbqm0000gp/T/GoLand/libclntsh.dylib, 1): image not found
ODPI [24694050] 2021-09-25 18:46:34.999: load with OS search heuristics
ODPI [24694050] 2021-09-25 18:46:34.999: load with name libclntsh.dylib
ODPI [24694050] 2021-09-25 18:46:35.065: load by OS successful
ODPI [24694050] 2021-09-25 18:46:35.065: validating loaded library
ODPI [24694050] 2021-09-25 18:46:35.108: fn end dpiContext_createWithParams -> 0
ODPI [24694050] 2021-09-25 18:46:35.108: fn start dpiContext_getClientVersion(0x4506810)
ODPI [24694050] 2021-09-25 18:46:35.108: fn end dpiContext_getClientVersion(0x4506810) -> 0
ODPI [24694050] 2021-09-25 18:46:35.108: fn start dpiContext_initCommonCreateParams(0x4506810)
ODPI [24694050] 2021-09-25 18:46:35.108: fn end dpiContext_initCommonCreateParams(0x4506810) -> 0
ODPI [24694050] 2021-09-25 18:46:35.108: fn start dpiContext_initPoolCreateParams(0x4506810)
ODPI [24694050] 2021-09-25 18:46:35.108: fn end dpiContext_initPoolCreateParams(0x4506810) -> 0
ODPI [24694050] 2021-09-25 18:46:35.108: fn start dpiPool_create(0x4506810)
ODPI [24694050] 2021-09-25 18:46:35.526: fn end dpiPool_create(0x4506810) -> 0
ODPI [24694050] 2021-09-25 18:46:35.526: fn start dpiPool_setStmtCacheSize(0x4506af0)
ODPI [24694050] 2021-09-25 18:46:35.526: fn end dpiPool_setStmtCacheSize(0x4506af0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.526: fn start dpiContext_initConnCreateParams(0x4506810)
ODPI [24694050] 2021-09-25 18:46:35.526: fn end dpiContext_initConnCreateParams(0x4506810) -> 0
ODPI [24694050] 2021-09-25 18:46:35.526: fn start dpiConn_create(0x4506810)
ODPI [24694050] 2021-09-25 18:46:35.526: fn end dpiConn_create(0x4506810) -> 0
ODPI [24694050] 2021-09-25 18:46:35.526: fn start dpiConn_prepareStmt(0x4508460)
ODPI [24694050] 2021-09-25 18:46:35.526: SQL SELECT DBTIMEZONE as dbTZ, NVL(TO_CHAR(SYSTIMESTAMP, 'tzr'), TO_CHAR(SYSTIMESTAMP, 'TZH:TZM')) AS dbOSTZ FROM DUAL
ODPI [24694050] 2021-09-25 18:46:35.527: fn end dpiConn_prepareStmt(0x4508460) -> 0
ODPI [24694050] 2021-09-25 18:46:35.527: fn start dpiStmt_getInfo(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.527: fn end dpiStmt_getInfo(0x45086a0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.527: fn start dpiStmt_setFetchArraySize(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.527: fn end dpiStmt_setFetchArraySize(0x45086a0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.527: fn start dpiStmt_setPrefetchRows(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.527: fn end dpiStmt_setPrefetchRows(0x45086a0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.527: fn start dpiStmt_execute(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.536: fn end dpiStmt_execute(0x45086a0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.536: fn start dpiStmt_getQueryInfo(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.536: fn end dpiStmt_getQueryInfo(0x45086a0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.536: fn start dpiConn_newVar(0x4508460)
ODPI [24694050] 2021-09-25 18:46:35.536: fn end dpiConn_newVar(0x4508460) -> 0
ODPI [24694050] 2021-09-25 18:46:35.536: fn start dpiStmt_define(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.536: fn end dpiStmt_define(0x45086a0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.536: fn start dpiStmt_getQueryInfo(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.536: fn end dpiStmt_getQueryInfo(0x45086a0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.536: fn start dpiConn_newVar(0x4508460)
ODPI [24694050] 2021-09-25 18:46:35.536: fn end dpiConn_newVar(0x4508460) -> 0
ODPI [24694050] 2021-09-25 18:46:35.536: fn start dpiStmt_define(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.537: fn end dpiStmt_define(0x45086a0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.537: fn start dpiStmt_addRef(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.537: fn end dpiStmt_addRef(0x45086a0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.537: fn start dpiStmt_fetchRows(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.537: fn end dpiStmt_fetchRows(0x45086a0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.537: fn start dpiVar_release(0x4508750)
ODPI [24694050] 2021-09-25 18:46:35.537: fn end dpiVar_release(0x4508750) -> 0
ODPI [24694050] 2021-09-25 18:46:35.537: fn start dpiVar_release(0x4508b30)
ODPI [24694050] 2021-09-25 18:46:35.537: fn end dpiVar_release(0x4508b30) -> 0
ODPI [24694050] 2021-09-25 18:46:35.537: fn start dpiStmt_release(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.537: fn end dpiStmt_release(0x45086a0) -> 0
ODPI [24694050] 2021-09-25 18:46:35.537: fn start dpiStmt_release(0x45086a0)
ODPI [24694050] 2021-09-25 18:46:35.537: fn end dpiStmt_release(0x45086a0) -> 0
ODPI [24694072] 2021-09-25 18:46:35.537: fn start dpiConn_setCallTimeout(0x4508460)
ODPI [24694050] 2021-09-25 18:46:35.537: fn start dpiConn_ping(0x4508460)
ODPI [24694073] 2021-09-25 18:46:35.537: fn start dpiConn_setCallTimeout(0x4508460)
ODPI [24694086] 2021-09-25 18:46:35.537: fn start dpiConn_setCallTimeout(0x4508460)
ODPI [24694050] 2021-09-25 18:46:35.546: fn end dpiConn_ping(0x4508460) -> 0
ODPI [24694072] 2021-09-25 18:46:35.546: fn end dpiConn_setCallTimeout(0x4508460) -> 0
ODPI [24694072] 2021-09-25 18:46:35.546: fn start dpiConn_setCallTimeout(0x4508460)
ODPI [24694073] 2021-09-25 18:46:35.546: fn end dpiConn_setCallTimeout(0x4508460) -> 0
ODPI [24694086] 2021-09-25 18:46:35.546: fn end dpiConn_setCallTimeout(0x4508460) -> 0
ODPI [24694072] 2021-09-25 18:46:35.546: fn end dpiConn_setCallTimeout(0x4508460) -> 0
ODPI [24694073] 2021-09-25 18:46:35.546: fn start dpiConn_setCallTimeout(0x4508460)
ODPI [24694073] 2021-09-25 18:46:35.546: fn end dpiConn_setCallTimeout(0x4508460) -> 0
ODPI [24694086] 2021-09-25 18:46:35.546: fn start dpiConn_setCallTimeout(0x4508460)
ODPI [24694086] 2021-09-25 18:46:35.546: fn end dpiConn_setCallTimeout(0x4508460) -> 0
ODPI [24694086] 2021-09-25 18:46:35.546: fn start dpiConn_release(0x4508460)
ODPI [24694086] 2021-09-25 18:46:35.546: fn end dpiConn_release(0x4508460) -> 0
2021/09/25 18:46:35 Ping successful

Process finished with the exit code 0

One more. I tried to use github.com/sirupsen/logrus library for logging. And got errors on running program:

GOROOT=/usr/local/opt/go/libexec #gosetup
GOPATH=/Users/d.evsyukov/go #gosetup
/usr/local/opt/go/libexec/bin/go build -o /private/var/folders/8b/299kg2l104n7nmw3pvqtrbqm0000gp/T/GoLand/___1go_build_godror . #gosetup
/private/var/folders/8b/299kg2l104n7nmw3pvqtrbqm0000gp/T/GoLand/___1go_build_godror
ODPI [24730893] 2021-09-25 18:51:44.891: ODPI-C 4.3.0-dev
ODPI [24730893] 2021-09-25 18:51:44.891: debugging messages initialized at level 92
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff2051dc9e]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff2051dc9e
stack: frame={sp:0x7ffeefbfef08, fp:0x7ffeefbfef58} stack=[0x7ffeefb7ffa8,0x7ffeefbff010)
0x00007ffeefbfee08:  0x01007ffeefbfee28  0x0000000000000004 
0x00007ffeefbfee18:  0x000000000000001f  0x00007fff2051dc9e 
0x00007ffeefbfee28:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbfee38:  0x0000000004035151 <runtime.throw+0x0000000000000071>  0x00007ffeefbfeed8 
0x00007ffeefbfee48:  0x00000000041b9097  0x00007ffeefbfee90 
0x00007ffeefbfee58:  0x0000000004035408 <runtime.fatalthrow.func1+0x0000000000000048>  0x00000000042d5520 
0x00007ffeefbfee68:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbfee78:  0x00007ffeefbfeed8  0x0000000004035151 <runtime.throw+0x0000000000000071> 
0x00007ffeefbfee88:  0x00000000042d5520  0x00007ffeefbfeec8 
0x00007ffeefbfee98:  0x0000000004035390 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbfeea8 
0x00007ffeefbfeea8:  0x00000000040353c0 <runtime.fatalthrow.func1+0x0000000000000000>  0x00000000042d5520 
0x00007ffeefbfeeb8:  0x0000000004035151 <runtime.throw+0x0000000000000071>  0x00007ffeefbfeed8 
0x00007ffeefbfeec8:  0x00007ffeefbfeef8  0x0000000004035151 <runtime.throw+0x0000000000000071> 
0x00007ffeefbfeed8:  0x00007ffeefbfeee0  0x0000000004035180 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbfeee8:  0x00000000041bb921  0x000000000000002a 
0x00007ffeefbfeef8:  0x00007ffeefbfef48  0x000000000404a836 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbfef08: <0x00000000041bb921  0x0000000000000011 
0x00007ffeefbfef18:  0x00007ffeefbfef88  0x00000000040285e6 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x00007ffeefbfef28:  0x000000c000156000  0x0000000000002000 
0x00007ffeefbfef38:  0x0000000000000008  0x00000000040651a0 <runtime.walltime_trampoline+0x0000000000000000> 
0x00007ffeefbfef48:  0x00007ffeefbfef90 !0x00007fff2051dc9e 
0x00007ffeefbfef58: >0x00007ffeefbfef90  0x00000000042b8000 
0x00007ffeefbfef68:  0x00000000000001ed  0x00000000041295c5 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x00007ffeefbfef78:  0x00000000040657df <runtime.syscall+0x000000000000001f>  0x000000c000060560 
0x00007ffeefbfef88:  0x00007ffeefbfefd0  0x000000c000060530 
0x00007ffeefbfef98:  0x0000000004063670 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001 
0x00007ffeefbfefa8:  0x0000000004000c00  0x0c00000000000030 
0x00007ffeefbfefb8:  0x0000000000000010  0x0000000004306fe0 
0x00007ffeefbfefc8:  0x0000000000000af8  0x000000c0000001a0 
0x00007ffeefbfefd8:  0x0000000004061789 <runtime.systemstack+0x0000000000000049>  0x0000000000000004 
0x00007ffeefbfefe8:  0x00000000041e2f40  0x00000000042d5520 
0x00007ffeefbfeff8:  0x00007ffeefbff048  0x0000000004061685 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff008:  0x000000000406163d <runtime.rt0_go+0x000000000000013d> 
runtime.throw({0x41bb921, 0x11})
        /usr/local/opt/go/libexec/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff2051dc9e
stack: frame={sp:0x7ffeefbfef08, fp:0x7ffeefbfef58} stack=[0x7ffeefb7ffa8,0x7ffeefbff010)
0x00007ffeefbfee08:  0x01007ffeefbfee28  0x0000000000000004 
0x00007ffeefbfee18:  0x000000000000001f  0x00007fff2051dc9e 
0x00007ffeefbfee28:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbfee38:  0x0000000004035151 <runtime.throw+0x0000000000000071>  0x00007ffeefbfeed8 
0x00007ffeefbfee48:  0x00000000041b9097  0x00007ffeefbfee90 
0x00007ffeefbfee58:  0x0000000004035408 <runtime.fatalthrow.func1+0x0000000000000048>  0x00000000042d5520 
0x00007ffeefbfee68:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbfee78:  0x00007ffeefbfeed8  0x0000000004035151 <runtime.throw+0x0000000000000071> 
0x00007ffeefbfee88:  0x00000000042d5520  0x00007ffeefbfeec8 
0x00007ffeefbfee98:  0x0000000004035390 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbfeea8 
0x00007ffeefbfeea8:  0x00000000040353c0 <runtime.fatalthrow.func1+0x0000000000000000>  0x00000000042d5520 
0x00007ffeefbfeeb8:  0x0000000004035151 <runtime.throw+0x0000000000000071>  0x00007ffeefbfeed8 
0x00007ffeefbfeec8:  0x00007ffeefbfeef8  0x0000000004035151 <runtime.throw+0x0000000000000071> 
0x00007ffeefbfeed8:  0x00007ffeefbfeee0  0x0000000004035180 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbfeee8:  0x00000000041bb921  0x000000000000002a 
0x00007ffeefbfeef8:  0x00007ffeefbfef48  0x000000000404a836 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbfef08: <0x00000000041bb921  0x0000000000000011 
0x00007ffeefbfef18:  0x00007ffeefbfef88  0x00000000040285e6 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x00007ffeefbfef28:  0x000000c000156000  0x0000000000002000 
0x00007ffeefbfef38:  0x0000000000000008  0x00000000040651a0 <runtime.walltime_trampoline+0x0000000000000000> 
0x00007ffeefbfef48:  0x00007ffeefbfef90 !0x00007fff2051dc9e 
0x00007ffeefbfef58: >0x00007ffeefbfef90  0x00000000042b8000 
0x00007ffeefbfef68:  0x00000000000001ed  0x00000000041295c5 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x00007ffeefbfef78:  0x00000000040657df <runtime.syscall+0x000000000000001f>  0x000000c000060560 
0x00007ffeefbfef88:  0x00007ffeefbfefd0  0x000000c000060530 
0x00007ffeefbfef98:  0x0000000004063670 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001 
0x00007ffeefbfefa8:  0x0000000004000c00  0x0c00000000000030 
0x00007ffeefbfefb8:  0x0000000000000010  0x0000000004306fe0 
0x00007ffeefbfefc8:  0x0000000000000af8  0x000000c0000001a0 
0x00007ffeefbfefd8:  0x0000000004061789 <runtime.systemstack+0x0000000000000049>  0x0000000000000004 
0x00007ffeefbfefe8:  0x00000000041e2f40  0x00000000042d5520 
0x00007ffeefbfeff8:  0x00007ffeefbff048  0x0000000004061685 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff008:  0x000000000406163d <runtime.rt0_go+0x000000000000013d> 
runtime.sigpanic()
        /usr/local/opt/go/libexec/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall]:
syscall.syscall(0x41295c0, 0x2, 0x40487413, 0xc0000605f0)
        /usr/local/opt/go/libexec/src/runtime/sys_darwin.go:22 +0x3b fp=0xc000060560 sp=0xc000060540 pc=0x406051b
syscall.syscall(0x4019326, 0xd0, 0x203000, 0x203000)
        <autogenerated>:1 +0x26 fp=0xc0000605a8 sp=0xc000060560 pc=0x4065f06
golang.org/x/sys/unix.ioctl(0x2, 0xc00011eb60, 0xba33318)
        /Users/d.evsyukov/go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/zsyscall_darwin_amd64.go:746 +0x39 fp=0xc0000605d8 sp=0xc0000605a8 pc=0x4129259
golang.org/x/sys/unix.IoctlGetTermios(...)
        /Users/d.evsyukov/go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/ioctl.go:63
github.com/sirupsen/logrus.isTerminal(0xc0000606c8)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/terminal_check_bsd.go:11 +0x50 fp=0xc000060648 sp=0xc0000605d8 pc=0x412b6f0
github.com/sirupsen/logrus.checkIfTerminal({0x41e53e0, 0xc000130010})
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/terminal_check_notappengine.go:13 +0x75 fp=0xc000060660 sp=0xc000060648 pc=0x412b795
github.com/sirupsen/logrus.(*TextFormatter).init(0xc000132120, 0xba33b10)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/text_formatter.go:106 +0x34 fp=0xc0000606e0 sp=0xc000060660 pc=0x412b874
github.com/sirupsen/logrus.(*TextFormatter).Format.func1()
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/text_formatter.go:196 +0x25 fp=0xc000060700 sp=0xc0000606e0 pc=0x412cf25
sync.(*Once).doSlow(0x41e6de0, 0xc00012c030)
        /usr/local/opt/go/libexec/src/sync/once.go:68 +0xd2 fp=0xc000060768 sp=0xc000060700 pc=0x406c532
sync.(*Once).Do(...)
        /usr/local/opt/go/libexec/src/sync/once.go:59
github.com/sirupsen/logrus.(*TextFormatter).Format(0xc000132120, 0xc00014a0e0)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/text_formatter.go:196 +0xebe fp=0xc000060cd8 sp=0xc000060768 pc=0x412c8de
github.com/sirupsen/logrus.(*Entry).write(0xc00014a0e0)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:279 +0x56 fp=0xc000060d68 sp=0xc000060cd8 pc=0x412a476
github.com/sirupsen/logrus.(*Entry).log(0xc000060e30, 0x4, {0xc000152020, 0x19})
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:251 +0x219 fp=0xc000060dd8 sp=0xc000060d68 pc=0x412a079
github.com/sirupsen/logrus.(*Entry).Log(0xc00014a070, 0x4, {0xc000060e30, 0x1, 0x1})
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:293 +0x4f fp=0xc000060e08 sp=0xc000060dd8 pc=0x412a6cf
github.com/sirupsen/logrus.(*Entry).Logf(0xc00014a070, 0x4, {0x41b7f2a, 0xc000060e90}, {0xc000060ee8, 0xb3, 0xc0001500c0})
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:338 +0x85 fp=0xc000060e50 sp=0xc000060e08 pc=0x412a7a5
github.com/sirupsen/logrus.(*Entry).Infof(...)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:351
github.com/sirupsen/logrus.(*Entry).Printf(...)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:355
github.com/sirupsen/logrus.(*Logger).Printf(0xc00014a000, {0x41b7f2a, 0x1b}, {0xc000060ee8, 0x1, 0x1})
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/logger.go:170 +0x65 fp=0xc000060ea0 sp=0xc000060e50 pc=0x412b265
github.com/sirupsen/logrus.Printf(...)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/exported.go:194
main.main()
        /Users/d.evsyukov/Projects/Github/godror/main.go:55 +0x1c6 fp=0xc000060f80 sp=0xc000060ea0 pc=0x412e346
runtime.main()
        /usr/local/opt/go/libexec/src/runtime/proc.go:255 +0x227 fp=0xc000060fe0 sp=0xc000060f80 pc=0x40377e7
runtime.goexit()
        /usr/local/opt/go/libexec/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000060fe8 sp=0xc000060fe0 pc=0x4063961

Process finished with the exit code 2

These library I use in my application. Can this affect?

I was disable debug, add simple query, (used logrus for logging again), I got errors again:

GOROOT=/usr/local/opt/go/libexec #gosetup
GOPATH=/Users/d.evsyukov/go #gosetup
/usr/local/opt/go/libexec/bin/go build -o /private/var/folders/8b/299kg2l104n7nmw3pvqtrbqm0000gp/T/GoLand/___2go_build_godror . #gosetup
/private/var/folders/8b/299kg2l104n7nmw3pvqtrbqm0000gp/T/GoLand/___2go_build_godror
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff2051dc9e]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff2051dc9e
stack: frame={sp:0x70000d50fe58, fp:0x70000d50fea8} stack=[0x70000d490338,0x70000d50ff38)
0x000070000d50fd58:  0x010070000d50fd78  0x0000000000000004 
0x000070000d50fd68:  0x000000000000001f  0x00007fff2051dc9e 
0x000070000d50fd78:  0x0b01dfacedebac1e  0x0000000000000001 
0x000070000d50fd88:  0x0000000004034a31 <runtime.throw+0x0000000000000071>  0x000070000d50fe28 
0x000070000d50fd98:  0x00000000041c00bc  0x000070000d50fde0 
0x000070000d50fda8:  0x0000000004034ce8 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000c0000821a0 
0x000070000d50fdb8:  0x0000000000000001  0x0000000000000001 
0x000070000d50fdc8:  0x000070000d50fe28  0x0000000004034a31 <runtime.throw+0x0000000000000071> 
0x000070000d50fdd8:  0x000000c0000821a0  0x000070000d50fe18 
0x000070000d50fde8:  0x0000000004034c70 <runtime.fatalthrow+0x0000000000000050>  0x000070000d50fdf8 
0x000070000d50fdf8:  0x0000000004034ca0 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000c0000821a0 
0x000070000d50fe08:  0x0000000004034a31 <runtime.throw+0x0000000000000071>  0x000070000d50fe28 
0x000070000d50fe18:  0x000070000d50fe48  0x0000000004034a31 <runtime.throw+0x0000000000000071> 
0x000070000d50fe28:  0x000070000d50fe30  0x0000000004034a60 <runtime.throw.func1+0x0000000000000000> 
0x000070000d50fe38:  0x00000000041c2a1d  0x000000000000002a 
0x000070000d50fe48:  0x000070000d50fe98  0x000000000404a116 <runtime.sigpanic+0x0000000000000396> 
0x000070000d50fe58: <0x00000000041c2a1d  0x0000000000000000 
0x000070000d50fe68:  0x000070000d50fed8  0x0000000004027ec6 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x000070000d50fe78:  0x000000c0001a6000  0x0000000000002000 
0x000070000d50fe88:  0x0000000000000008  0x000000000bc059b0 
0x000070000d50fe98:  0x000070000d50fee0 !0x00007fff2051dc9e 
0x000070000d50fea8: >0x000070000d50fee0  0x00000000042c4000 
0x000070000d50feb8:  0x00000000000001ed  0x000000000412ef65 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x000070000d50fec8:  0x00000000040650bf <runtime.syscall+0x000000000000001f>  0x000000c0001514b0 
0x000070000d50fed8:  0x000070000d50ff20  0x000000c000151480 
0x000070000d50fee8:  0x0000000004062f50 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001 
0x000070000d50fef8:  0x000000c000110600  0x06000000040375a6 
0x000070000d50ff08:  0x0000000000000000  0x000000c0000821a0 
0x000070000d50ff18:  0x0000000000000ba8  0x000000c0000001a0 
0x000070000d50ff28:  0x0000000004061069 <runtime.systemstack+0x0000000000000049>  0x000070000d50ff50 
runtime.throw({0x41c2a1d, 0x0})
        /usr/local/opt/go/libexec/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff2051dc9e
stack: frame={sp:0x70000d50fe58, fp:0x70000d50fea8} stack=[0x70000d490338,0x70000d50ff38)
0x000070000d50fd58:  0x010070000d50fd78  0x0000000000000004 
0x000070000d50fd68:  0x000000000000001f  0x00007fff2051dc9e 
0x000070000d50fd78:  0x0b01dfacedebac1e  0x0000000000000001 
0x000070000d50fd88:  0x0000000004034a31 <runtime.throw+0x0000000000000071>  0x000070000d50fe28 
0x000070000d50fd98:  0x00000000041c00bc  0x000070000d50fde0 
0x000070000d50fda8:  0x0000000004034ce8 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000c0000821a0 
0x000070000d50fdb8:  0x0000000000000001  0x0000000000000001 
0x000070000d50fdc8:  0x000070000d50fe28  0x0000000004034a31 <runtime.throw+0x0000000000000071> 
0x000070000d50fdd8:  0x000000c0000821a0  0x000070000d50fe18 
0x000070000d50fde8:  0x0000000004034c70 <runtime.fatalthrow+0x0000000000000050>  0x000070000d50fdf8 
0x000070000d50fdf8:  0x0000000004034ca0 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000c0000821a0 
0x000070000d50fe08:  0x0000000004034a31 <runtime.throw+0x0000000000000071>  0x000070000d50fe28 
0x000070000d50fe18:  0x000070000d50fe48  0x0000000004034a31 <runtime.throw+0x0000000000000071> 
0x000070000d50fe28:  0x000070000d50fe30  0x0000000004034a60 <runtime.throw.func1+0x0000000000000000> 
0x000070000d50fe38:  0x00000000041c2a1d  0x000000000000002a 
0x000070000d50fe48:  0x000070000d50fe98  0x000000000404a116 <runtime.sigpanic+0x0000000000000396> 
0x000070000d50fe58: <0x00000000041c2a1d  0x0000000000000000 
0x000070000d50fe68:  0x000070000d50fed8  0x0000000004027ec6 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x000070000d50fe78:  0x000000c0001a6000  0x0000000000002000 
0x000070000d50fe88:  0x0000000000000008  0x000000000bc059b0 
0x000070000d50fe98:  0x000070000d50fee0 !0x00007fff2051dc9e 
0x000070000d50fea8: >0x000070000d50fee0  0x00000000042c4000 
0x000070000d50feb8:  0x00000000000001ed  0x000000000412ef65 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x000070000d50fec8:  0x00000000040650bf <runtime.syscall+0x000000000000001f>  0x000000c0001514b0 
0x000070000d50fed8:  0x000070000d50ff20  0x000000c000151480 
0x000070000d50fee8:  0x0000000004062f50 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001 
0x000070000d50fef8:  0x000000c000110600  0x06000000040375a6 
0x000070000d50ff08:  0x0000000000000000  0x000000c0000821a0 
0x000070000d50ff18:  0x0000000000000ba8  0x000000c0000001a0 
0x000070000d50ff28:  0x0000000004061069 <runtime.systemstack+0x0000000000000049>  0x000070000d50ff50 
runtime.sigpanic()
        /usr/local/opt/go/libexec/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall]:
syscall.syscall(0x412ef60, 0x2, 0x40487413, 0xc000151540)
        /usr/local/opt/go/libexec/src/runtime/sys_darwin.go:22 +0x3b fp=0xc0001514b0 sp=0xc000151490 pc=0x405fdfb
syscall.syscall(0x4018c06, 0x0, 0xc000140128, 0x1bc5e1)
        <autogenerated>:1 +0x26 fp=0xc0001514f8 sp=0xc0001514b0 pc=0x40657e6
golang.org/x/sys/unix.ioctl(0x41bb15e, 0xf, 0x4712a00)
        /Users/d.evsyukov/go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/zsyscall_darwin_amd64.go:746 +0x39 fp=0xc000151528 sp=0xc0001514f8 pc=0x412ebf9
golang.org/x/sys/unix.IoctlGetTermios(...)
        /Users/d.evsyukov/go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/ioctl.go:63
github.com/sirupsen/logrus.isTerminal(0x2)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/terminal_check_bsd.go:11 +0x50 fp=0xc000151598 sp=0xc000151528 pc=0x4131090
github.com/sirupsen/logrus.checkIfTerminal({0x41ecec0, 0xc000010020})
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/terminal_check_notappengine.go:13 +0x75 fp=0xc0001515b0 sp=0xc000151598 pc=0x4131135
github.com/sirupsen/logrus.(*TextFormatter).init(0xc00002e180, 0x4712a00)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/text_formatter.go:106 +0x34 fp=0xc000151630 sp=0xc0001515b0 pc=0x4131214
github.com/sirupsen/logrus.(*TextFormatter).Format.func1()
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/text_formatter.go:196 +0x25 fp=0xc000151650 sp=0xc000151630 pc=0x41328c5
sync.(*Once).doSlow(0x41ee940, 0xc0001a6000)
        /usr/local/opt/go/libexec/src/sync/once.go:68 +0xd2 fp=0xc0001516b8 sp=0xc000151650 pc=0x406be12
sync.(*Once).Do(...)
        /usr/local/opt/go/libexec/src/sync/once.go:59
github.com/sirupsen/logrus.(*TextFormatter).Format(0xc00002e180, 0xc00019c070)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/text_formatter.go:196 +0xebe fp=0xc000151c28 sp=0xc0001516b8 pc=0x413227e
github.com/sirupsen/logrus.(*Entry).write(0xc00019c070)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:279 +0x56 fp=0xc000151cb8 sp=0xc000151c28 pc=0x412fe16
github.com/sirupsen/logrus.(*Entry).log(0xc000151d80, 0x4, {0xc0001a0020, 0xf})
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:251 +0x219 fp=0xc000151d28 sp=0xc000151cb8 pc=0x412fa19
github.com/sirupsen/logrus.(*Entry).Log(0xc00019c000, 0x4, {0xc000151d80, 0x0, 0x0})
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:293 +0x4f fp=0xc000151d58 sp=0xc000151d28 pc=0x413006f
github.com/sirupsen/logrus.(*Entry).Logf(0xc00019c000, 0x4, {0x41baff6, 0xc00002a088}, {0x0, 0xc000110dd0, 0x40b7b80})
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:338 +0x85 fp=0xc000151da0 sp=0xc000151d58 pc=0x4130145
github.com/sirupsen/logrus.(*Entry).Infof(...)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:351
github.com/sirupsen/logrus.(*Entry).Printf(...)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:355
github.com/sirupsen/logrus.(*Logger).Printf(0xc000132000, {0x41baff6, 0xf}, {0x0, 0x0, 0x0})
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/logger.go:170 +0x65 fp=0xc000151df0 sp=0xc000151da0 pc=0x4130c05
github.com/sirupsen/logrus.Printf(...)
        /Users/d.evsyukov/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/exported.go:194
main.main()
        /Users/d.evsyukov/Projects/Github/godror/main.go:72 +0x3ab fp=0xc000151f80 sp=0xc000151df0 pc=0x4133ecb
runtime.main()
        /usr/local/opt/go/libexec/src/runtime/proc.go:255 +0x227 fp=0xc000151fe0 sp=0xc000151f80 pc=0x40370c7
runtime.goexit()
        /usr/local/opt/go/libexec/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000151fe8 sp=0xc000151fe0 pc=0x4063241

goroutine 6 [select]:
database/sql.(*DB).connectionOpener(0xc000110dd0, {0x41f0ef8, 0xc00007c040})
        /usr/local/opt/go/libexec/src/database/sql/sql.go:1196 +0x93
created by database/sql.OpenDB
        /usr/local/opt/go/libexec/src/database/sql/sql.go:794 +0x188

Process finished with the exit code 2

After that i just replace logrus with log, and ping was successful.

This is conflict with other library?

@tgulacsi
Copy link
Contributor

https://github.com/sirupsen/logrus/blob/master/terminal_check_bsd.go seems to cause the SIGSEGV.
What is your log target? How do you initialize logrus? (main.go line 72)

@tgulacsi
Copy link
Contributor

Just avoid logrus: see sirupsen/logrus#1275

@juev
Copy link
Author

juev commented Sep 25, 2021

:(

my bad. I forgot to initialize logrus. After that all is working. Ping and query.

I will check again my main application. I will close issue later, if you do not mind.

@juev juev closed this as completed Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants