Re: [Firebird-devel] node-firebird-libfbclient SEG FAULT when nodejs exits

2017-01-18 Thread Denys Khanzhyiev
It works in my Ubuntu VM, travis script needs to set default db password.

2017-01-18 10:38 GMT+01:00 marius adrian popa :

> Could you try with the latest version from ppa ?
>
> https://launchpad.net/~mapopa/+archive/ubuntu/ppa
>
> On Tue, Jan 17, 2017 at 7:46 PM, Denys Khanzhyiev 
> wrote:
>
>> Hi all,
>> trying to setup a kind of CI with travis for  node-firebird-libfbclient.
>> Keep getting SEG FAULT when tests are finished and nodejs exists.
>>
>> Isolated it to one test case:
>> the test tests the case when erronous query is called async, i.e.
>> 1. isc_attach_database is called on some thread from thread pool
>> 2. then after connection is established follwoing functions are called
>> isc_dsql_allocate_statement
>> isc_start_transaction
>> isc_dsql_preparefor "select * from non_existent_table"
>>  all in the same function possibly on another thread (but not at the same
>> time with isc_attach_database).
>>
>> isc_dsql_prepare returns error as expected and everyting works until the
>> process is exiting
>> on process exit i get segfault
>> here is what I get from core dump:
>>
>> Using host libthread_db library "/lib/x86_64-linux-gnu/libthre
>> ad_db.so.1".
>>
>> warning: no loadable sections found in added symbol-file system-supplied
>> DSO at   0x7fff3fd91000
>> Core was generated by `node ./node_modules/.bin/nodeunit
>> tests/def/test-async.js
>> -t AsyncQueryWithErro'.
>> Program terminated with signal 11, Segmentation fault.
>> #0  0x7f1515ab2e84 in pthread_mutex_lock ()
>>from /lib/x86_64-linux-gnu/libpthread.so.0
>> (gdb) where
>> #0  0x7f1515ab2e84 in pthread_mutex_lock ()
>>from /lib/x86_64-linux-gnu/libpthread.so.0
>> #1  0x7f15112481b9 in ?? () from /usr/lib/x86_64-linux-gnu/libf
>> bclient.so.2
>> #2  0x7f1515ab0c83 in __nptl_deallocate_tsd ()
>>from /lib/x86_64-linux-gnu/libpthread.so.0
>> #3  0x7f1515ab0ea8 in start_thread ()
>>from /lib/x86_64-linux-gnu/libpthread.so.0
>> #4  0x7f15157de36d in clone () from /lib/x86_64-linux-gnu/libc.so.6
>> #5  0x in ?? ()
>> (gdb)
>>
>> System info:
>>  Ubuntu 12.04.5 LTS amd64
>>  firebird2.5-superclassic
>>
>> Same code works fine on Windows.
>>
>> I also have tried to call fb_shutdown in exit hook provided by nodejs -
>> with no success, i.e.
>> fb_shutdown(0,1) returns 0 and later I still get SEG FAULT
>>
>> Just have found that I also get SEGFAULT after unsuccessfull async
>> connect too.
>> So it looks like any unsuccessfull (with non zero return value) call on
>> other thread leads to SEG FAULT at process exit.
>>
>> Thanks,
>> Denys
>>
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> Firebird-Devel mailing list, web interface at
>> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>>
>>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] node-firebird-libfbclient SEG FAULT when nodejs exits

2017-01-18 Thread marius adrian popa
Could you try with the latest version from ppa ?

https://launchpad.net/~mapopa/+archive/ubuntu/ppa

On Tue, Jan 17, 2017 at 7:46 PM, Denys Khanzhyiev  wrote:

> Hi all,
> trying to setup a kind of CI with travis for  node-firebird-libfbclient.
> Keep getting SEG FAULT when tests are finished and nodejs exists.
>
> Isolated it to one test case:
> the test tests the case when erronous query is called async, i.e.
> 1. isc_attach_database is called on some thread from thread pool
> 2. then after connection is established follwoing functions are called
> isc_dsql_allocate_statement
> isc_start_transaction
> isc_dsql_preparefor "select * from non_existent_table"
>  all in the same function possibly on another thread (but not at the same
> time with isc_attach_database).
>
> isc_dsql_prepare returns error as expected and everyting works until the
> process is exiting
> on process exit i get segfault
> here is what I get from core dump:
>
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>
> warning: no loadable sections found in added symbol-file system-supplied
> DSO at   0x7fff3fd91000
> Core was generated by `node ./node_modules/.bin/nodeunit
> tests/def/test-async.js
> -t AsyncQueryWithErro'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x7f1515ab2e84 in pthread_mutex_lock ()
>from /lib/x86_64-linux-gnu/libpthread.so.0
> (gdb) where
> #0  0x7f1515ab2e84 in pthread_mutex_lock ()
>from /lib/x86_64-linux-gnu/libpthread.so.0
> #1  0x7f15112481b9 in ?? () from /usr/lib/x86_64-linux-gnu/libf
> bclient.so.2
> #2  0x7f1515ab0c83 in __nptl_deallocate_tsd ()
>from /lib/x86_64-linux-gnu/libpthread.so.0
> #3  0x7f1515ab0ea8 in start_thread ()
>from /lib/x86_64-linux-gnu/libpthread.so.0
> #4  0x7f15157de36d in clone () from /lib/x86_64-linux-gnu/libc.so.6
> #5  0x in ?? ()
> (gdb)
>
> System info:
>  Ubuntu 12.04.5 LTS amd64
>  firebird2.5-superclassic
>
> Same code works fine on Windows.
>
> I also have tried to call fb_shutdown in exit hook provided by nodejs -
> with no success, i.e.
> fb_shutdown(0,1) returns 0 and later I still get SEG FAULT
>
> Just have found that I also get SEGFAULT after unsuccessfull async connect
> too.
> So it looks like any unsuccessfull (with non zero return value) call on
> other thread leads to SEG FAULT at process exit.
>
> Thanks,
> Denys
>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel