V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  liuxu  ›  全部回复第 19 页 / 共 145 页
回复总数  2896
1 ... 15  16  17  18  19  20  21  22  23  24 ... 145  
2022-02-11 20:20:02 +08:00
回复了 FenixVu 创建的主题 Linux inode 没满,但是会随机报磁盘空间不足是啥问题?
@FenixVu #4

结合楼主之前的帖子和 strace ,是因为你测试的目录是 minio 所管理的空间,然后 minio 服务器使用的.minio.sys
/目录磁盘爆了

mkdir(".minio.sys/buckets/nethospitalserver/HISREPORT2022011300000686_7a1db02f905b445aa52e6e43134adfc6.xml", 0777) = -1 ENOSPC (No space left on device)
open("/usr/lib/x86_64-linux-gnu/charset.alias", O_RDONLY|O_NOFOLLOW) = -1 ENOENT (No such file or directory)
write(2, "mkdir: ", 7mkdir: ) = 7
write(2, "cannot create directory \342\200\230.mini"..., 129cannot create directory ‘.minio.sys/buckets/nethospitalserver/HISREPORT2022011300000686_7a1db02f905b445aa52e6e43134adfc6.xml’) = 129
write(2, ": No space left on device", 25: No space left on device) = 25
write(2, "\n", 1
) = 1


创建.minio.sys/buckets/nethospitalserver/HISREPORT2022011300000686_7a1db02f905b445aa52e6e43134adfc6.xml 没空间了

给你看看我的 strace


liuxu@liuxu-Inspiron-7559:/tmp$ strace mkdir 123456789
execve("/usr/bin/mkdir", ["mkdir", "123456789"], 0x7ffd98b5c8c8 /* 60 vars */) = 0
brk(NULL) = 0x5568f5d55000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffc7dca4820) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
...
...
access("/etc/selinux/config", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=14537584, ...}) = 0
mmap(NULL, 14537584, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff0d0e1e000
close(3) = 0
mkdir("123456789", 0777) = 0
close(1) = 0
close(2) = 0
exit_group(0) = ?
+++ exited with 0 +++


最下面 access("/etc/selinux/config", F_OK) 后直接 mkdir("123456789", 0777) ,楼主的连 mkdir("123456789", 0777)都没执行



楼上的大哥们虽然都是好心,但是别乱指路啊
emm....楼主可能需要的是类似 digitalocean 的应用服务器,可以直接拉 github 的 python 项目直接跑,google 和新浪也有,不知道下线没
@zoharSoul 对的,楼主只是为了没用过 linux 管道的人方便理解,类比了中间件的思想,要是楼主也写过 java ,原话应该会是:

可以理解成 laravel 的中间件,java 的 filter

插件名,类名 /结构名写的就是管道 pipeline


顺便给 phper 提一下,laravel 有中间件,而调用中间件方法和 controller 是框架底层的 Pipeline 类
@zoharSoul 其实没必要这么抠字眼,中间件是个思想,不是具体组件

可以看看红帽的文档
https://www.redhat.com/zh/topics/middleware/what-is-middleware

中间件是为应用提供通用服务和功能的软件。数据管理、应用服务、消息传递、身份验证和 API 管理通常都要通过中间件。
@bthulu shell 里叫管道,iptables 叫表 /链,都不是以 java 的标准起的名字
2022-01-27 12:19:36 +08:00
回复了 jiayouniu 创建的主题 Linux 求助 Linux 内核异常,帮忙分析一下异常日志
@liuxu 后面 2 个函数调用不涉及写回磁盘,只涉及写完后释放内存中的 inode 缓存
2022-01-27 12:17:45 +08:00
回复了 jiayouniu 创建的主题 Linux 求助 Linux 内核异常,帮忙分析一下异常日志
@jiayouniu

从你贴的内核调用栈看,kswapd 是 swap 交换进程,作用是把内存的的 cache 缓存到 swap 。
它在执行了 shrink_slab ,slab 是内核内存管理层,linux 内核在获取物理内存后,使用结束不会释放,而是自己管理,放在 xxx_slab 链中

然后内部调用了 prune_icache_sb ,icache_sb 应该是磁盘的 superblock ,superblock 存放着文件系统统计信息,而它是缓存在内存中的,这里执行 prune_icache_sb ,也就是刷写 superbolck 到磁盘上

之后执行了 fsverity_cleanup_inode ,也就是把内存中的 inode 缓存也全部写回磁盘
https://elixir.bootlin.com/linux/v5.10.70/source/fs/verity/open.c#L346

void fsverity_cleanup_inode(struct inode *inode)
{
fsverity_free_info(inode->i_verity_info);
inode->i_verity_info = NULL;
}
EXPORT_SYMBOL_GPL(fsverity_cleanup_inode)


最后这个函数最终调用 fsverity_free_info ,抛出了异常
https://elixir.bootlin.com/linux/v5.10.70/source/fs/verity/open.c#L240

void fsverity_free_info(struct fsverity_info *vi)
{
if (!vi)
return;
kfree(vi->tree_params.hashstate);
kmem_cache_free(fsverity_info_cachep, vi);
}

结果这个时候内核抛了异常,general protection fault, probably for non-canonical address

大致可以猜到,此时的 inode->i_verity_info 地址已经被污染了,不再是有效内存地址了

我猜测可能是所谓的 SMP 多核 cpu 执行清除的时候没有对此数据结构锁上,导致其他 cpu 核心已经清除了它,地址已经置 NULL ,然后此时 cpu0 执行清除此数据导致 free 了 0x100000000000000: 0000 非法地址(此地址在此内存架构上可能是 c 语言的 NULL ?)

以上只是我不专业的推测,具体还是看你操作是否有效,希望解决问题后能 at 我,让我看看具体是啥问题,咋解决的
2022-01-26 21:56:16 +08:00
回复了 jiayouniu 创建的主题 Linux 求助 Linux 内核异常,帮忙分析一下异常日志
看了下,内核 bug 你需要贴给 debian bug report ,https://www.debian.org/Bugs/Reporting

我查了下和你差不多的 bug ,都是让升级内核到 5.11-5.13 以上,建议更高试试
2022-01-26 21:32:37 +08:00
回复了 qq1340691923 创建的主题 Go 编程语言 最近看到 v2 好多人喷 GO 语言,我现在有点困惑
@Akiya C#和 Go 都是非常优秀的语言,有各自的设计理念,没有缺点,特别是 C#,即使使用的人不多,但是语言本身的优秀是不能否定的,特别是已经开源,可以在 linux 上运行

你看我这个彩虹屁拍的怎么样
2022-01-26 21:17:44 +08:00
回复了 EyebrowsWhite 创建的主题 程序员 关于国内技术社区的一点随想
你可能不知道 v2 的 linux 节点有多少大佬多友好,从内核寻址原理到怎么改密码,都有人答你,不过你如果你用 debian/ubuntu 的话应该会更友好 /doge
2022-01-26 19:18:11 +08:00
回复了 Jmui114 创建的主题 Linux Debian 安装完成后 root 密码错误
@liuxu #7 sudo passwd debian 也是通用的
2022-01-26 19:16:42 +08:00
回复了 Jmui114 创建的主题 Linux Debian 安装完成后 root 密码错误
sudo passwd 可以改 root 密码,ubuntu 默认 root 是随机密码,必须手动改改
2022-01-26 18:38:18 +08:00
回复了 qq1340691923 创建的主题 Go 编程语言 最近看到 v2 好多人喷 GO 语言,我现在有点困惑
@qq1340691923 你可以 append 帖子,会在你帖子内容下面跟着显示
2022-01-26 17:58:59 +08:00
回复了 qq1340691923 创建的主题 Go 编程语言 最近看到 v2 好多人喷 GO 语言,我现在有点困惑
放心发出来小兄弟,好好一个技术社区玩尼玛尬黑,歪风邪气,发出来谁敢喷你我喷他
2022-01-26 15:32:02 +08:00
回复了 lcj2class 创建的主题 程序员 播客 RustTalk: 001. 与 Folyd 聊他的 Rust 使用经历
牛逼,代码预测都要处理

polkadot:
Compiling the rust compiler without this commit and using the self-built compiler to compile our node showed that the native runtime produced the correct data and we could sync the chain. The commit changed the `binary_search_by` function in a way that it could return a different index when there are multiple matches. As we use this function in the runtime, it can lead to a slightly different ordering of the data that is stored in the state, which leads to a different storage root.

binary_search_by:
If the value is found then Result::Ok is returned, containing the index of the matching element. If there are multiple matches, then any one of the matches could be returned. The index is chosen deterministically, but is subject to change in future versions of Rust.
2022-01-26 14:06:09 +08:00
回复了 lcj2class 创建的主题 程序员 播客 RustTalk: 001. 与 Folyd 聊他的 Rust 使用经历
听听
2022-01-26 13:53:13 +08:00
回复了 aljun 创建的主题 程序员 2022 年最适合写业务代码的编程语言是哪个?
@3dwelcome 你这耿直的小老弟,8 位 MCU 32 字节内存的芯片做 web 服务器,这话你都信
把你的站发到隔壁 loc ,200k/s cc 满足你的愿望
2022-01-25 22:53:34 +08:00
回复了 liuxu 创建的主题 Kubernetes 腾讯的 k8s pod ip 怎么和 node ip 平级的
@Aliencn 好的多谢,原来最下面有说明,没注意到

集群内容器与 云数据库 TencentDB 、云数据库 Redis 、云数据库 Memcached 等资源在同一 VPC 下内网互通。
1 ... 15  16  17  18  19  20  21  22  23  24 ... 145  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   949 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 42ms · UTC 18:54 · PVG 02:54 · LAX 11:54 · JFK 14:54
Developed with CodeLauncher
♥ Do have faith in what you're doing.