node-mariasql icon indicating copy to clipboard operation
node-mariasql copied to clipboard

Hard crash when ssl=true and connecting to offline server

Open cb1kenobi opened this issue 11 years ago • 3 comments

When connecting to the database over SSL, but the server is offline, mariasql emits an error event with the following message:

Error: Can't connect to MySQL server on '127.0.0.1' (61)

Then before the close event is emitted, the following crash occurs:

node(28217,0x7fff75026310) malloc: *** error for object 0x103c55180: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

This will cause the Node.js process to exit. No bueno.

I'm on OS X 10.9.3, Node.js 0.10.28, mariasql v0.1.21, libmariadbclient 5.5.30.

cb1kenobi avatar Jun 04 '14 10:06 cb1kenobi

If server is online, it's also crash with breakpoint:

node(27758,0x7fff79d85300) malloc: *** error for object 0x101ccf20e: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

huncode avatar Apr 15 '15 14:04 huncode

@egavrilov Can you please try with the rewrite branch?

mscdex avatar Apr 15 '15 14:04 mscdex

@mscdex nothing happens on default example, neither connect, nor error message.

huncode avatar Apr 15 '15 15:04 huncode