V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  liuxu  ›  全部回复第 42 页 / 共 146 页
回复总数  2904
1 ... 38  39  40  41  42  43  44  45  46  47 ... 146  
2021-04-20 14:19:33 +08:00
回复了 PepperEgg 创建的主题 Linux 一个奇怪的关于 UDP 包的问题
@PepperEgg 据我所知,centos7 有防火墙,默认是 policy 默认是 drop,所以你的 UDP 包收不到
2021-04-20 12:55:13 +08:00
回复了 PepperEgg 创建的主题 Linux 一个奇怪的关于 UDP 包的问题
@PepperEgg virtualbox+ubuntu18.04 默认环境
2021-04-20 11:00:08 +08:00
回复了 PepperEgg 创建的主题 Linux 一个奇怪的关于 UDP 包的问题
console1: vagrant@homestead:~/work/helms$ echo 010000003b0017000000000058626f78204f6e65204563686f205465737400 |xxd -r -p| socat - udp4-datagram:65.55.42.21:3074

console2: vagrant@homestead:~$ sudo tcpdump host 65.55.42.21 -n -X
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
10:58:04.620184 IP 10.0.2.15.37715 > 65.55.42.21.3074: UDP, length 31
0x0000: 4500 003b 0ea3 4000 4011 b4b4 0a00 020f E..;..@.@.......
0x0010: 4137 2a15 9353 0c02 0027 7793 0100 0000 A7*..S...'w.....
0x0020: 3b00 1700 0000 0000 5862 6f78 204f 6e65 ;.......Xbox.One
0x0030: 2045 6368 6f20 5465 7374 00 .Echo.Test.
10:58:04.783278 IP 65.55.42.21.3074 > 10.0.2.15.37715: UDP, length 59
0x0000: 4500 0057 48a1 0000 4011 ba9a 4137 2a15 [email protected]*.
0x0010: 0a00 020f 0c02 9353 0043 08ac 09d4 5a99 .......S.C....Z.
0x0020: 12f6 b33e 2578 1c1e 5a5d 7119 a1ab 4951 ...>%x..Z]q...IQ
0x0030: 35a6 d0fb 9035 d701 3a22 732a 7a02 1700 5....5..:"s*z...
0x0040: 0000 0000 5862 6f78 204f 6e65 2045 6368 ....Xbox.One.Ech
0x0050: 6f20 5465 7374 00 o.Test.
2021-04-20 10:41:34 +08:00
回复了 PepperEgg 创建的主题 Linux 一个奇怪的关于 UDP 包的问题
我不信,你拿 wireshark/tcpdump 抓个包发出来
2021-04-18 03:48:22 +08:00
回复了 weifan 创建的主题 Linux 请教下 centos 依赖的问题
拉鸡 centos,看我 gentoo

localhost ~ # equery belongs /lib64/libcrypt.so.1
* Searching for /lib64/libcrypt.so.1 ...
sys-libs/glibc-2.32-r5 (/lib64/libcrypt-2.32.so)
sys-libs/glibc-2.32-r5 (/lib64/libcrypt.so.1 -> libcrypt-2.32.so)

localhost ~ # equery belongs /usr/lib64/libssl.so
* Searching for /usr/lib64/libssl.so ...
dev-libs/openssl-1.1.1i (/usr/lib64/libssl.so.1.1)
dev-libs/openssl-1.1.1i (/usr/lib64/libssl.so -> libssl.so.1.1)


直接装 sys-libs/glibc 和 dev-libs/openssl 就可以了
curl 说了不算,老夫不信还能有这么奇怪的问题

找到你 php 的 curl.so 模块,然后 ldd curl.so
liuxu@liuxu-Inspiron-7559:~$ ldd /usr/lib/php/20190902/curl.so
libcurl.so.4 => /lib/x86_64-linux-gnu/libcurl.so.4 (0x00007f9491b3d000)
libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f94917cb000)

然后看看你的 libcurl.so.4
liuxu@liuxu-Inspiron-7559:~$ ldd /lib/x86_64-linux-gnu/libcurl.so.4
libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f300fde8000)

最后检查一下 php 的配置文件,php --ini 找到 php.ini
liuxu@liuxu-Inspiron-7559:~$ php --ini
Configuration File (php.ini) Path: /etc/php/7.4/cli
Loaded Configuration File: /etc/php/7.4/cli/php.ini

liuxu@liuxu-Inspiron-7559:~$ grep "disable_" /etc/php/7.4/cli/php.ini
disable_functions =
disable_classes =


再不行用 vagrant 装 ubuntu 吧,mac 做开发屁事多
2021-04-17 17:53:15 +08:00
回复了 zhoudaiyu 创建的主题 Linux 大家有没有分析过红帽系 Linux 内核崩溃日志?
https://termbin.com/n303

这是我 ubuntu 的 crash 文件,teamviewerd 崩过,可以用 apport-retrace 分析
正常的话编译的二进制文件如果带有符号文件,得到的输出可以从源码级分析,但是由于 apt 安装的 teamviewerd 没有带符号文件,所以用 gdb 只能输出汇编和内存地址

liuxu@liuxu-Inspiron-7559:/tmp$ apport-retrace -g log.crash
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
...
Type "apropos word" to search for commands related to "word".
Reading symbols from /opt/teamviewer/tv_bin/teamviewerd...
(No debugging symbols found in /opt/teamviewer/tv_bin/teamviewerd)
[New LWP 1649]
[New LWP 1663]
...
warning: Error reading shared library list entry at 0x448b4800081b92e8
warning: Error reading shared library list entry at 0xab868358d48fb89
Core was generated by `/opt/teamviewer/tv_bin/teamviewerd -d'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007ff64976b18b in ?? ()
[Current thread is 1 (LWP 1649)]


如果你是用 gcc 自己编译的程序,可以用-g 选项带上符号文件
liuxu@liuxu-Inspiron-7559:/tmp$ emacs helloworld.c
liuxu@liuxu-Inspiron-7559:/tmp$ cat helloworld.c
#include <stdio.h>

int main()
{
printf("helloworld");
return 0;
}


liuxu@liuxu-Inspiron-7559:/tmp$ gcc -g -o helloworld helloworld.c
liuxu@liuxu-Inspiron-7559:/tmp$ ls -l helloworld
-rwxrwxr-x 1 liuxu liuxu 19160 4 月 17 17:43 helloworld


liuxu@liuxu-Inspiron-7559:/tmp$ readelf -h ./helloworld
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1060
Start of program headers: 64 (bytes into file)
Start of section headers: 16856 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 13
Size of section headers: 64 (bytes)
Number of section headers: 36
Section header string table index: 35


liuxu@liuxu-Inspiron-7559:/tmp$ gdb ./helloworld
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./helloworld...
(gdb) list
1 #include <stdio.h>
2
3 int main()
4 {
5 printf("helloworld");
6 return 0;
7 }
(gdb) quit


这个时候如果 printf 崩了的话,apport-retrace 通过 gdb 可以直接输出代码了,不过一般也还需要内核的符号文件,https://wiki.ubuntu.com/Debug%20Symbol%20Packages
2021-04-09 16:50:22 +08:00
回复了 likangr 创建的主题 程序员 直播录像服务公有云产品推荐
阿里腾讯,5 毛 1GB 流量好像,推流基本忽略不计,主要算拉流的 CDN 费用,m3u8 得算上转码的钱,不算贵
2021-04-06 22:59:08 +08:00
回复了 zhoudaiyu 创建的主题 FreeBSD FreeBSD 现在通常在什么场景下使用?
不知道是不是我的帖子影响到了你,把你带偏了

你没特别的兴趣别入坑了,现在容器云时代,linux 就对了,从桌面到服务器,ubuntu 一把梭,不会有什么毛病,信不过 ubuntu server 就 debian

我用 freebsd 就是为了好玩,增进一下视野,也不是日常用,就像我现在用的 ubuntu20.04.2 给你回的帖

主要还是想以学院派的风格学习下 freebsd,总说 linux 牛逼,没个对比不知道牛逼在哪,freebsd 有很多大佬会从很深的技术角度评价 linux 和 freebsd,有批评有对比再反思反思就会有进步

而且它们圈子小大佬多,对技术比较纯粹的人才会用,你看楼上用了 20 多年的 freebsd,20 多年前 v2 上面很多人就是颗精子,我还在玩泥巴,而他已经在用上了 freebsd /dog
2021-04-06 19:48:10 +08:00
回复了 Mr0C 创建的主题 程序员 一年经验用十年在程序员圈子是指什么概念
@xuanbg 笑死老子了
2021-04-04 20:41:08 +08:00
回复了 king888 创建的主题 程序员 所谓的不用写服务器代码了!老哥们是怎么看的?
ddos 是打不起,cc 看看你有多少钱
2021-04-04 18:23:55 +08:00
回复了 zhoudaiyu 创建的主题 Linux Apache httpd 引发的丢包问题求解
@zhoudaiyu 没有当时情况的具体分析,很难说是什么问题
2021-04-04 17:37:41 +08:00
回复了 zhoudaiyu 创建的主题 Linux Apache httpd 引发的丢包问题求解
其实没有业务场景的话我能假设一种情况,你前面有负载均衡 lb,后面 3 台服务器 abc,假设某种原因,ab 服务器当机几分钟后正常,导致 lb 将流量全部给了服务器 c,服务器 c 连接太多,当你重启 c 后,lb 有均分给 3 台服务器了,所以就出现了你这种情况
2021-04-04 17:18:57 +08:00
回复了 zhoudaiyu 创建的主题 Linux Apache httpd 引发的丢包问题求解
TCPLISTENOVERFLOW 的问题在于 backlog 的队列满了没能及时消费掉,所以 tcp 协议栈会停止接收新连接(不返回任何 tcp 包,而是服务端过一会返回 syn ack 装傻告诉客户端没收到 ack,客户端会重发 ack 建立连接),引发这个问题在于为什么你的 apache 的 accept()没有快速消费掉 backlog 的队列

你当时的情况应该是 ESTABLISHED 的连接是满的,只是新连接建立不起来

流量非常低,是因为服务端重复返回 syn ack,装成没收到客户端的 ack,这会导致客户端根据间隔时间指数增加的方式重复发送 ack/psh ack 业务数据包,所以没有正常的入网流量,出网流量会根据你的业务情况,如果不是下载和推送数据类,由于 ESTABLISHED 的连接没能及时处理,也就没有什么出网数据包了,所以出网流量也会很低

重启一下就能好的很难事后分析,自己看看你的业务逻辑和代码吧
2021-04-03 21:48:21 +08:00
回复了 liuxu 创建的主题 Linux freebsd 触摸板没法使用, ubuntu 可以用
@Cooky 驱动是 ig4
2021-04-01 19:21:03 +08:00
回复了 thisismr2 创建的主题 程序员 https://ipip.ooo
haha.ooo 路过
2021-03-31 21:15:58 +08:00
回复了 naoh1000 创建的主题 Linux 在不信任的机器上使用和敏感机器相同的公钥安全吗?
安全
1 ... 38  39  40  41  42  43  44  45  46  47 ... 146  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   5109 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 67ms · UTC 07:16 · PVG 15:16 · LAX 23:16 · JFK 02:16
♥ Do have faith in what you're doing.