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

Unexpected Termination #1

Closed
wfjsw opened this issue May 30, 2018 · 23 comments
Closed

Unexpected Termination #1

wfjsw opened this issue May 30, 2018 · 23 comments

Comments

@wfjsw
Copy link

wfjsw commented May 30, 2018

Got terminated immediately after started.

Log:

***mtproto-proxy -u nobody -p *** -H *** -S *** --aes-pwd proxy-sec
et proxy-multi.conf -M 1
[12974][2018-05-30 22:27:35.054276 local] Invoking engine mtproxy-
.01 compiled at May 30 2018 22:18:16 by gcc 6.3.0 20170516 64-bit
fter commit 2fd27cb0753c62e5766c86db28f2acc1d755547f
[12974][2018-05-30 22:27:35.054718 local] config_filename = 'proxy
multi.conf'
[12974][2018-05-30 22:27:35.055146 local] creating 1 workers
[12974][2018-05-30 22:27:35.058921 local] Started as [10.243.233.9
:2094:12974:1527690455]
[12974][2018-05-30 22:27:35.059232 local] configuration file proxy
multi.conf re-read successfully (797 bytes parsed), new configuration active
[12974][2018-05-30 22:27:35.059318 local] main loop
[12975][2018-05-30 22:27:35.059437 local] Started as [10.243.233.9
:2094:12975:1527690455]
[12975][2018-05-30 22:27:35.060119 local] configuration file proxy
multi.conf re-read successfully (797 bytes parsed), new configuration active
[12975][2018-05-30 22:27:35.060322 local] main loop
[12974][2018-05-30 22:27:36.004512 local] Child 12975 terminated, aborting
@wfjsw
Copy link
Author

wfjsw commented May 30, 2018

Died as soon as a connection is made, not on started.

@p1ratrulezzz
Copy link

p1ratrulezzz commented May 30, 2018

ddress 0.0.0.0
[6805][2018-05-30 18:24:39.608161 local] Invoking engine mtproxy-0.01 compiled at May 30 2018 18:06:31 by gcc 7.3.0 64-bit after commit 2fd27cb0753c62e5766c86db28f2acc1d755547f
[6805][2018-05-30 18:24:39.608694 local] config_filename = 'proxy-multi.conf'
[6805][2018-05-30 18:24:39.609523 local] creating 1 workers
[6805][2018-05-30 18:24:39.614245 local] Started as [0.0.0.0:6870:6805:1527697479]
[6805][2018-05-30 18:24:39.616210 local] configuration file proxy-multi.conf re-read successfully (797 bytes parsed), new configuration active
[6805][2018-05-30 18:24:39.618809 local] main loop
[6806][2018-05-30 18:24:39.618502 local] Started as [0.0.0.0:6870:6806:1527697479]
[6806][2018-05-30 18:24:39.624142 local] configuration file proxy-multi.conf re-read successfully (797 bytes parsed), new configuration active
[6806][2018-05-30 18:24:39.624309 local] main loop
mtproto-proxy: net/net-tcp-rpc-client.c:246: tcp_rpcc_send_handshake_packet: Assertion `PID.ip' failed.
[pid 6805] [time 1527697479] 
------- Stack Backtrace -------
mtproto-proxy(print_backtrace+0x2c)[0x556113c3b10c]
mtproto-proxy(extended_debug_handler+0x10)[0x556113c3b290]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f4a02397890]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f4a01fd2e97]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)mtproto-proxy: net/net-tcp-rpc-client.c:246: tcp_rpcc_send_handshake_packet: Assertion `PID.ip' failed.
[pid 6806] [time 1527697479] 
------- Stack Backtrace -------
mtproto-proxy(print_backtrace+0x2c)[0x556113c3b10c]
mtproto-proxy(extended_debug_handler+0x10)[0x[0x556113c3b2907f4a01fd4801]
/lib/x86_64-linux-gnu/libc.so.6]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f4a02397890]
/lib/x86_64-linux-gnu/libc.so.6(+0x3039a)([0xgsignal7f4a01fc439a]
+0xc7/lib/x86_64-linux-gnu/libc.so.6)([0x+0x304127f4a01fd2e97)]
[0x7f4a01fc4412]
mtproto-proxy/lib/x86_64-linux-gnu/libc.so.6(tcp_rpcc_parse_execute+0x899)[0x556113c2d579]
mtproto-proxy(abort+0x141)[0x7f4a01fd4801]
/lib/x86_64-linux-gnu/libc.so.6(+0x(3039acpu_tcp_server_reader)+0x[0x1867f4a01fc439a)]
[0x/lib/x86_64-linux-gnu/libc.so.6556113c2b016]
mtproto-proxy(+0x(30412cpu_server_read_write)+0x[0xb7f4a01fc4412)]
[0xmtproto-proxy556113c1db3b]
mtproto-proxy(tcp_rpcc_parse_execute+0x899)[0x556113c2d579]
mtproto-proxy(cpu_tcp_server_reader+0x186)[0x556113c2b016]
mtproto-proxy(do_connection_job+0x77)[0x556113c20b07(cpu_server_read_write+0xb)[0x556113c1db3b]
]
mtproto-proxymtproto-proxy((do_connection_job+0xunlock_job77)+0x[0x2dd556113c20b07)[0x]
556113c0fe0dmtproto-proxy]
mtproto-proxy(unlock_job+0x2dd)[0x556113c0fe0d]
mtproto-proxy(run_pending_main_jobs+0x(62)[0xrun_pending_main_jobs556113c10a42+0x]
62mtproto-proxy)[0x556113c10a42]
mtproto-proxy(default_engine_server_start+0x157()[0xdefault_engine_server_start556113c35d27+0x]
157)mtproto-proxy[0x556113c35d27]
mtproto-proxy(default_main+0x1b3(default_main)+0x[0x1b3556113c363c3)]
[0x556113c363c3/lib/x86_64-linux-gnu/libc.so.6]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f4a01fb5b97]
mtproto-proxy(__libc_start_main+0xe7)[0x7f4a01fb5b97]
mtproto-proxy((_start_start+0x+0x2a2a)[0x556113c0128a]
[pid 6805] [time 1527697479] -------------------------------
[pid 6805] [time 1527697479] mtproxy-0.01 compiled at May 30 2018 18:06:31 by gcc 7.3.0 64-bit after commit 2fd27cb0753c62e5766c86db28f2acc1d755547f[pid 6805] [time 1527697479] 
)[0x556113c0128a]
[pid 6806] [time 1527697479] -------------------------------
[pid 6806] [time 1527697479] mtproxy-0.01 compiled at May 30 2018 18:06:31 by gcc 7.3.0 64-bit after commit 2fd27cb0753c62e5766c86db28f2acc1d755547froot@p1ratrulezzz:/opt/MTProxy# [pid 6806] [time 1527697479] 

@LDVSOFT
Copy link

LDVSOFT commented May 30, 2018

I have manually specified public adrress, still crashes on first client.

@wfjsw
Copy link
Author

wfjsw commented May 30, 2018

I swapped -p and -H then it works(sort of)

@p1ratrulezzz
Copy link

Haha, yes there is a confusing thing about it. -H is the address which actually used to listen for incoming connections (the port you put in the port field on telegram client) and -p used for something internal. On many servers if you have nginx or any web server set up already with https you can't set it to 443 as it will be already binded by nginx or apache. Just start it with something like -H 6889

@LDVSOFT
Copy link

LDVSOFT commented May 30, 2018

@p1ratrulezzz Crashes for me on unoccupied unpriviledged port, though!

@wfjsw
Copy link
Author

wfjsw commented May 31, 2018

@p1ratrulezzz no both two port is not occupied and I am using port > 30000
gdb didn't show anything helpful.

@stanislavvv
Copy link

Confirm crash at start under Debian 9 (gcc 6.3).
It is not "Address already in use" error.

@wfjsw
Copy link
Author

wfjsw commented Jun 1, 2018

Well, I found the code is highly targeted on Intel while I am using AMD...

@stanislavvv
Copy link

I build on desktop and use virtualized cpu on target. How i can switch off any cpu type locks?

@wfjsw
Copy link
Author

wfjsw commented Jun 4, 2018

I think crc32.c and crc32c.c are the biggest hells.

@coolermister
Copy link

Have the same)

@stek29
Copy link
Collaborator

stek29 commented Jun 7, 2018

@wfjsw @stanislavvv does it work if you pass --crc32c ?

@wfjsw
Copy link
Author

wfjsw commented Jun 7, 2018

@stek29 nop I got illegal instruction

@stanislavvv
Copy link

same result with --crc32c

@stanislavvv
Copy link

Sorry, forgot git pull and make clean && make
Now it's work.

@wfjsw
Copy link
Author

wfjsw commented Jun 8, 2018

🤔 I still have it. weird
let me gdb it

@wfjsw
Copy link
Author

wfjsw commented Jun 8, 2018

Thread 1 "mtproto-proxy" received signal SIGILL, Illegal instruction.
0x000055555557251e in update_thread_stat ()
(gdb) bt
#0  0x000055555557251e in update_thread_stat ()
#1  0x000055555557259f in update_all_thread_stats ()
#2  0x00005555555997f9 in update_job_stats_gw ()
#3  0x000055555557590b in do_timer_job ()
#4  0x000055555557338b in unlock_job ()
#5  0x0000555555573c11 in job_timer_wakeup_gateway ()
#6  0x0000555555580911 in thread_run_timers ()
#7  0x000055555557803a in epoll_work ()
#8  0x000055555559a67d in default_engine_server_start ()
#9  0x000055555559ad13 in default_main ()
#10 0x00007ffff6c842e1 in __libc_start_main (main=0x555555564ff0 <main>, argc=15,
    argv=0x7fffffffe3d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
    stack_end=0x7fffffffe3c8) at ../csu/libc-start.c:291
#11 0x000055555556520a in _start ()

🤔Threads?

@wfjsw
Copy link
Author

wfjsw commented Jun 8, 2018

remove -O3, changed march it finally runs :/
well I run it with proxychains and seems no connection is made through my tunnel.

@stek29
Copy link
Collaborator

stek29 commented Jun 9, 2018

@wfjsw wasn't just removing the march enough?

@wfjsw
Copy link
Author

wfjsw commented Jun 9, 2018

@stek29 didn't remove march but changed it to native

@coolermister
Copy link

Confirm @wfjsw. Changed march to native, O3 to O2, and it works)

@wfjsw
Copy link
Author

wfjsw commented Jun 12, 2018

@stek29 If we remove march crc32.c won't compile.

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

6 participants