ShadowsocksR-Live / shadowsocksr-native

翻墙 从容穿越党国敏感日 ShadowsocksR (SSRoT) native implementation for all platforms, GFW terminator
https://github.com/ShadowsocksR-Live/shadowsocksr-native/wiki
GNU General Public License v3.0
2.74k stars 762 forks source link

Latest version does not work on debian 11 #235

Closed kolatv23 closed 1 year ago

kolatv23 commented 1 year ago

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-native are you using?

0.9.3

What operating system are you using?

Debian 11

What did you do?

SSR server process exits with error every time upon client connection, on my debian 11 machine. I tested 0.9.2 and it was fine.

What did you expect to see?

SSR-Server works flawlessly like previous versions.

What did you see instead?

ssr-server 2022/09/01 20:43  info  ==== tunnel created     count   1 ====
ssr-server 2022/09/01 20:43  info  tunnel_stage_initial
ssr-server 2022/09/01 20:43 error  unexpect tunnel terminated. about _client_ "(null)": Unknown system error 465 - tunnel_stage_initial
>>>> memory panic of expected size = 2036497376 and allocated size = 0 in OS  <<<<
>>>> memory panic of expected size = 2036497888 and allocated size = 0 in OS  <<<<
free(): invalid pointer
Aborted

What is your config in detail (with all sensitive info masked)?

info listen address 0.0.0.0:8755 info method none info password [password] info protocol origin info obfs tls1.2_ticket_auth info udp relay no

ssrlive commented 1 year ago

Do you have the environment to debug this program?

https://github.com/ShadowsocksR-Live/shadowsocksr-native/blob/d94883d427e608508834d7a9a1541a31567f75c1/src/ssrbuffer.c#L71

The return value of the malloc_usable_size function behaves differently in different versions of different operating systems.

I don't recall that I would request 2GB of RAM.

I have tested in my ubuntu 18.04, it's fine. image

kolatv23 commented 1 year ago

This is what I got from core files:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  buffer_release (ptr=0x50) at /root/ssr-n/src/ssrbuffer.c:295
295     /root/ssr-n/src/ssrbuffer.c: No such file or directory.

and

Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
ssrlive commented 1 year ago

can you send your VPS login to me? you can email me with ssrlivebox(at)gmail(dot)com

kolatv23 commented 1 year ago

can you send your VPS login to me? you can email me with ssrlivebox(at)gmail(dot)com

Sorry I can't provide login info at the moment. You should be able to reproduce this bug on a new installed debian 11 machine. ** Oh, I can confirm that only v0.9.3 binary file from the release page has this bug, binary compiled from latest code on master branch does not have such problem.

ssrlive commented 1 year ago

I will update the binary package soon.