Oracle db and panics on interrupt

264 views
Skip to first unread message

pierre...@gmail.com

unread,
Apr 26, 2017, 2:33:13 PM4/26/17
to golang-nuts
Hello,

I am unsure where to log the following issue:
whenever I send an interrupt signal to a go process running an Oracle query, it panics with either "fatal: morestack on g0" or "fatal error: runtime: stack split at bad time".

A sample code reproducing the issue is here. Of course an Oracle instance and libs are required for it to work.

Should it be reported to the maintainers of the Oracle package or the Go team?
It seems to me it should be the later, but I want to make sure.

Tamás Gulácsi

unread,
Apr 26, 2017, 4:25:09 PM4/26/17
to golang-nuts

You can report it at rana/ora, but I'll ask it here anyway: is this avoidable?
My first instinct says no, we don't know what interrupt handlers are in use in the OCI library - maybe re-install/shield some after instantiating the library?

Didier Spezia

unread,
Apr 27, 2017, 12:18:19 PM4/27/17
to golang-nuts

I'm not sure it can help with the problem, but starting with Oracle 11, OCI installs some custom signal handlers (even catching segmentation faults).
They can be deactivated by setting options in the sqlnet.ora file.
Here, we run all our OCI clients with:

DIAG_SIGHANDLER_ENABLED=FALSE
DIAG_ADR_ENABLED=FALSE
DIAG_DDE_ENABLED=FALSE

Regards,
Didier.

Tamás Gulácsi

unread,
Apr 27, 2017, 3:07:35 PM4/27/17
to golang-nuts

2017. április 27., csütörtök 18:18:19 UTC+2 időpontban Didier Spezia a következőt írta:

I'm not sure it can help with the problem, but starting with Oracle 11, OCI installs some custom signal handlers (even catching segmentation faults).
They can be deactivated by setting options in the sqlnet.ora file.
Here, we run all our OCI clients with:

DIAG_SIGHANDLER_ENABLED=FALSE
DIAG_ADR_ENABLED=FALSE
DIAG_DDE_ENABLED=FALSE

Regards,
Didier.


Thanks a lot, Didier!

pierre...@gmail.com

unread,
Apr 28, 2017, 2:24:56 AM4/28/17
to golang-nuts
Hello,

Thanks a lot indeed, I did not know about those.

I still get crashes on OSX besides the variables being read by the OCI libs (traces shows they are).

The other thing is that when this happens, the process goes into an infinite loop spitting "fatal: morestack on g0" for ever, and kill -9 is the only to put it out of misery. Is *that* expected although I know that custom signal handlers break cgo? Shouldnt it just panic and exit?
Reply all
Reply to author
Forward
0 new messages