V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  liuxu  ›  全部回复第 42 页 / 共 145 页
回复总数  2897
1 ... 38  39  40  41  42  43  44  45  46  47 ... 145  
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 在不信任的机器上使用和敏感机器相同的公钥安全吗?
安全
2021-03-31 21:04:59 +08:00
回复了 irongerx 创建的主题 程序员 Nebula Pi 公测用户募集活动
@Livid 分享创造
2021-03-31 21:03:45 +08:00
回复了 irongerx 创建的主题 程序员 Nebula Pi 公测用户募集活动
J9 、J10 没焊单排针么
2021-03-29 10:38:17 +08:00
回复了 onice 创建的主题 随想 代码不是一切
@20015jjw 整面墙落地窗,但是朝东 /dog
2021-03-28 21:44:10 +08:00
回复了 onice 创建的主题 随想 代码不是一切
996 真的不是人做的,以前有一次突然 6 点下班,6 点的夕阳,感觉世界有点陌生感
2021-03-25 12:21:42 +08:00
回复了 fxjson 创建的主题 Java 灵魂拷问之是否适合 Java 开发
@yeqizhang go 我现在基本都直接用 linode 国外的服务器做环境,vscode 用 ssh 远程开发
2021-03-23 22:46:27 +08:00
回复了 lrvinye 创建的主题 Kubernetes K8S 的 Helm 太难啦
从 Bitnami 的 helm 包开始学习不明智,值太多了,而且有的还一堆 help 函数,直接 create 一个空包开始写,可以看看 gitbook 的一些教程

https://whmzsu.github.io/helm-doc-zh-cn/
2021-03-19 19:10:38 +08:00
回复了 huangmingyou 创建的主题 Linux chrome 网页里面的下拉菜单不能点
js 被墙了,f12 看看
1 ... 38  39  40  41  42  43  44  45  46  47 ... 145  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1013 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 43ms · UTC 21:59 · PVG 05:59 · LAX 14:59 · JFK 17:59
Developed with CodeLauncher
♥ Do have faith in what you're doing.