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

SIGSEGV, Segmentation fault #29

Closed
pabx06 opened this issue Jul 5, 2018 · 2 comments
Closed

SIGSEGV, Segmentation fault #29

pabx06 opened this issue Jul 5, 2018 · 2 comments

Comments

@pabx06
Copy link

pabx06 commented Jul 5, 2018

Very good idea to bring tdlibs in nodejs realm.

running an example with phone +app_id+app_hash

i used tdlibs ins the same directory ...
i get

`
[New Thread 0x7ffff5333700 (LWP 62410)]
[New Thread 0x7ffff7ff6700 (LWP 62411)]
[New Thread 0x7fffe7fff700 (LWP 62412)]
[New Thread 0x7fffe77fe700 (LWP 62413)]
[New Thread 0x7fffe6ffd700 (LWP 62414)]
[New Thread 0x7fffe67fc700 (LWP 62415)]
[New Thread 0x7fffe4c55700 (LWP 62416)]
[New Thread 0x7fffdbfff700 (LWP 62417)]
[New Thread 0x7fffdb7fe700 (LWP 62418)]
[New Thread 0x7fffdaffd700 (LWP 62419)]

Thread 14 "node" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdaffd700 (LWP 62419)]
0x0000000001344a26 in EVP_MD_CTX_clear_flags ()
(gdb) bt
#0 0x0000000001344a26 in EVP_MD_CTX_clear_flags ()
#1 0x000000000132e95e in EVP_DigestInit_ex ()
#2 0x000000000134e113 in HMAC_Init_ex ()
#3 0x00007fffe56f5d2b in sqlcipher_openssl_hmac () from /tmp/js/libtdjson.so
#4 0x00007fffe5700d80 in sqlcipher_page_cipher () from /tmp/js/libtdjson.so
#5 0x00007fffe57278dd in sqlite3Codec () from /tmp/js/libtdjson.so
#6 0x00007fffe5743adf in pager_write_pagelist () from /tmp/js/libtdjson.so
#7 0x00007fffe5752e20 in sqlite3PagerCommitPhaseOne.part.591 () from /tmp/js/libtdjson.so
#8 0x00007fffe5752fbf in sqlite3BtreeCommitPhaseOne.part.592 () from /tmp/js/libtdjson.so
#9 0x00007fffe5757da7 in sqlite3VdbeHalt () from /tmp/js/libtdjson.so
#10 0x00007fffe578d101 in sqlite3VdbeExec () from /tmp/js/libtdjson.so
#11 0x00007fffe578e547 in sqlite3_step () from /tmp/js/libtdjson.so
#12 0x00007fffe578f7f2 in sqlcipher_execExecSql () from /tmp/js/libtdjson.so
#13 0x00007fffe578fa96 in sqlcipher_exportFunc () from /tmp/js/libtdjson.so
#14 0x00007fffe5784619 in sqlite3VdbeExec () from /tmp/js/libtdjson.so
#15 0x00007fffe578e547 in sqlite3_step () from /tmp/js/libtdjson.so
#16 0x00007fffe5781daa in sqlite3_exec () from /tmp/js/libtdjson.so
#17 0x00007fffe56d91cc in td::SqliteDb::exec(td::CSlice) () from /tmp/js/libtdjson.so
#18 0x00007fffe56db770 in td::SqliteDb::change_key(td::CSlice, td::DbKey const&, td::DbKey const&) () from /tmp/js/libtdjson.so
#19 0x00007fffe510fdd0 in td::TdDb::init_sqlite(int, td::TdParameters const&, td::DbKey, td::DbKey, td::BinlogKeyValuetd::Binlog&) () from /tmp/js/libtdjson.so
#20 0x00007fffe511141b in td::TdDb::init(int, td::TdParameters const&, td::DbKey, td::TdDb::Events&) () from /tmp/js/libtdjson.so
#21 0x00007fffe5111e41 in td::TdDb::open(int, td::TdParameters const&, td::DbKey, td::TdDb::Events&) () from /tmp/js/libtdjson.so
#22 0x00007fffe50dcd07 in td::Td::init(td::DbKey) () from /tmp/js/libtdjson.so
#23 0x00007fffe50e204c in td::Td::request(unsigned long, std::unique_ptr<td::td_api::Function, std::default_deletetd::td_api::Function >) () from /tmp/js/libtdjson.so
#24 0x00007fffe4fdcdbc in td::ClosureEvent<td::DelayedClosure<td::Td, void (td::Td::)(unsigned long, std::unique_ptr<td::td_api::Function, std::default_deletetd::td_api::Function >), unsigned long&, std::unique_ptr<td::td_api::Function, std::default_deletetd::td_api::Function >&&> >::run(td::Actor) () from /tmp/js/libtdjson.so
#25 0x00007fffe56e5cff in td::Scheduler::do_event(td::ActorInfo*, td::Event&&) () from /tmp/js/libtdjson.so
#26 0x00007fffe56ea27a in void td::Scheduler::flush_mailbox<void ()(td::ActorInfo), td::Event ()()>(td::ActorInfo, void (* const&)(td::ActorInfo*), td::Event (* const&)()) ()
from /tmp/js/libtdjson.so
#27 0x00007fffe56ea5e9 in td::Scheduler::run_mailbox() () from /tmp/js/libtdjson.so
#28 0x00007fffe56ead78 in td::Scheduler::run_no_guard(double) () from /tmp/js/libtdjson.so
#29 0x00007fffe56e2d02 in td::ConcurrentScheduler::run_main(double) () from /tmp/js/libtdjson.so
#30 0x00007fffe4fdcbc1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<td::detail::ThreadStl::ThreadStltd::Client::Impl::init()::{lambda()#1}(td::Client::Impl::init()::{lambda()#1}&&)::{lambda()#1}> > >::_M_run() () from /tmp/js/libtdjson.so
#31 0x00007ffff76fc57f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#32 0x00007ffff6f086ba in start_thread (arg=0x7fffdaffd700) at pthread_create.c:333
#33 0x00007ffff6c3e41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

`

latest tdlibs version:
image

gdb output:
image

@nodegin
Copy link
Owner

nodegin commented Jul 5, 2018

This sounds like issue #18, will you try build from stable release or open an issue in tdlib/td for help?

@nodegin
Copy link
Owner

nodegin commented Jul 15, 2018

I have added a basic guide for building & running TDLib on Linux servers, make sure all libraries linked correctly to prevent Segfault errors.

@nodegin nodegin closed this as completed Jul 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants