glibc

using std::thread in a library loaded with dlopen leads to a sigsev

家住魔仙堡 提交于 2020-07-15 04:42:09
问题 I recently discovered a strange behaviour using std::thread and dlopen . Basically, when I execute a std::thread in a library which is loaded using dlopen I receive a sigsev. The library itself is linked against pthread, the executable that calls dlopen is not. Once I link the executable against pthread or the library itself everything works fine. However, we are using a plugin based infrastructure, where we do not know if the application itself is linked against pthread or not. Therefore, it

GLIBC install failed, programs are missing or too old

妖精的绣舞 提交于 2020-07-09 05:36:08
问题 I had tried to install glibc-2.15 with non-root, after googling and trying two days, I am looking help here. After configure, it output following error: ../glibc-2.15/configure --prefix=${PWD/objDir/destDir} checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc

dlopen works second time on bad shared library on ubuntu 11.04; does the right thing on centos 5.5

大憨熊 提交于 2020-06-27 05:03:28
问题 I have bad shared library (undefined symbol). When I call dlopen() on it the first time, I get a NULL result with correct error message from dlerror(). If I ignore the error message and call dlopen() using the same arguments, I get a non-null handle the second time (which indicates that the library was successfully loaded). This is obviously wrong. This problem occurs under Ubuntu 11.04 (IIRC, 10.10 did not have this problem). Centos 5.5 doesn't exhibit this problem. In particular, this

what's the difference between fallocate and ftruncate

江枫思渺然 提交于 2020-06-16 02:10:05
问题 They can all change file size according to my test. why can they all change file to larger and to shorter? what's the difference between fallocate and ftruncate? 回答1: ftruncate is a simple, single-purpose function. Per the POSIX documentation, it simply sets the file to the requested length: If fildes refers to a regular file, the ftruncate() function shall cause the size of the file to be truncated to length . ... ftruncate() is also a standard POSIX function and is portable. Note that POSIX

libm.so.6: cannot open shared object file: No such file or directory

社会主义新天地 提交于 2020-06-12 11:43:18
问题 I've install a program in Centos 6.8, While running the program, I receive error "error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory" when I checked the linked library to the program using ldd command, I can see libm.so.6 with correct 64bit "libm.so.6 => /lib64/libm.so.6 (0x0000003a19000000)" That means, library is installed and already added in environment variable, LD_LIBRARY_PATH Another program, which uses libm.so.6, works fine. Can

libm.so.6: cannot open shared object file: No such file or directory

别来无恙 提交于 2020-06-12 11:40:09
问题 I've install a program in Centos 6.8, While running the program, I receive error "error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory" when I checked the linked library to the program using ldd command, I can see libm.so.6 with correct 64bit "libm.so.6 => /lib64/libm.so.6 (0x0000003a19000000)" That means, library is installed and already added in environment variable, LD_LIBRARY_PATH Another program, which uses libm.so.6, works fine. Can

Understanding “corrupted size vs. prev_size” glibc error

 ̄綄美尐妖づ 提交于 2020-06-07 04:59:30
问题 I have implemented a JNA bridge to FDK-AAC. Source code can be found in here When bench-marking my code, I can get hundreds of successful runs on the same input, and then occasionally a C-level crash that'll kill the entire process, causing a core-dump to be generated: Looking at the core dump, it looks like this: #1 0x00007f3e92e00f5d in __GI_abort () at abort.c:90 #2 0x00007f3e92e4928d in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7f3e92f70528 "*** Error in `%s': %s: 0x%s

What is the difference between glibc's MALLOC_CHECK_, M_CHECK_ACTION, and mcheck?

元气小坏坏 提交于 2020-05-12 14:06:35
问题 glibc seems to have more than one way of doing some heap checking: mallopt with the M_CHECK_ACTION parameter the MALLOC_CHECK_ environment variable the mcheck family of functions I find the available documentation to be confusing. The manual doesn't list M_CHECK_ACTION at all when describing mallopt. This mallopt man page, however, does describe M_CHECK_ACTION. Additionally, it says it's equivalent to the environment variable MALLOC_CHECK_: MALLOC_CHECK_ This environment variable controls the

Docker从入门到DevOps,看完这个系列就够了(三)

橙三吉。 提交于 2020-05-09 10:42:40
文章索引 Docker从入门到DevOps系列目录 Docker从入门到DevOps| 第一篇:DevOps工程的基石 —— Docker Docker从入门到DevOps| 第二篇:Docker常用命令 —— 镜像与容器操作 Docker从入门到DevOps| 第三篇:Docker镜像封装以及提交镜像至阿里云镜像库 Docker从入门到DevOps| 第四篇:用Docker部署一个基于SpringBoot + vue 前后端分离的应用 Docker从入门到DevOps| 第五篇:一键部署你的应用 —— docker-compose初体验 Docker从入门到DevOps| 第六篇:初探DevOps思想,DevOps利器walle介绍 Docker从入门到DevOps| 第七篇:Docker + walle + SpringBoot + Git实现项目的DevOps(一) Docker从入门到DevOps| 第八篇:Docker + walle + SpringBoot + Git实现项目的DevOps(二) Docker从入门到DevOps| 第九篇:Docker + walle + SpringBoot + Git实现项目的DevOps(三) Docker从入门到DevOps| 第十篇:初探Docker、Kubernetes与微服务思想 前言

【MySQL】时区设置引发的卡顿

你。 提交于 2020-05-08 09:53:06
作者:田杰 查询执行时间长引发应用感知 “卡顿” 的场景在数据库的日常支持和使用中并不少见,但由于时区设置引发的 SQL 执行“卡顿”仍然是一个有趣的现象,之前没有具体关注过。 这次客户的细致与坚持让我们找到了问题的源头。 1. 名词解释 序列号 名词 说明 1 CPU 使用率 非空闲的 CPU 时间占比。 2 User CPU 使用率 用户空间(user-space)应用代码消耗的 CPU 时间占比。 3 Sys CPU 使用率 系统空间(sys-space)内核代码消耗 CPU 时间占比。 4 Futex Linux 内核提供的快速用户态锁/信号量;在无竞争场景完全在用户空间中运行,但在存在竞争场景会引发系统调用。 2. 问题现象 客户 MySQL 8.0 实例在 2020-03-19 22:03 ~ 22:04 出现大量活跃连接堆积,慢日志中出现大量低成本查询,并且 CPU 使用率不高但系统 SYS CPU 使用率出现异常波动。 3. 问题排查 3.1 OS 层面 我们来考虑一下有哪些因素可能会导致卡顿: • 物理机 OS 层面波动(通过 IO_WAIT 指标排除)。 • MySQL 自身机制。 3.2 MySQL 层面 排除掉 OS 层面异常类因素,我们开始聚焦在 mysqld 进程调用栈的分析。 为了更好的分析 MySQL 的行为,阿里数据库提供了扁鹊系统来跟踪