AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-192641

user2845840's questions

Martin Hope
user2845840
Asked: 2018-10-18 09:05:45 +0800 CST

构建 PHP 5.3.3 时与 OpenSSL 相关的链接器错误

  • 0

在尝试在启用 OpenSSL 扩展的 Debian jessie 上构建 PHP 5.3.3 时(不问原因,节省一些理智),我undefined reference to symbol 'X509_free@@OPENSSL_1.0.0'在 Makefile 的链接步骤中遇到,无法弄清楚为什么 (libssl-dev存在并libssl.so包含请求的符号)。我尝试使用pbuilder包含 Debian jessie 以及更新的库(如 OpenSSL 1.0.1 而不是 0.9.8)的基于 chroot 的环境构建 Debian 挤压中包含的官方 Debian 软件包。我确认 PHP 5.3.3 与 OpenSSL 1.0.1 兼容,方法是在 chroot 环境之外使用./configure --disable-all --with-openssl=/usr; make. 生成的 CGI 和 CLI 二进制文件确实与 OpenSSL 相关联,这可以通过ldd sapi/cli/php. 然而在 chroot 环境中,它失败了。

不要打扰,我已经找出了大部分原因和解决方法/黑客来实现成功的构建。

debian-squeeze
  • 1 个回答
  • 220 Views
Martin Hope
user2845840
Asked: 2018-02-23 08:48:56 +0800 CST

什么会导致 mysqlcheck 错误地将表报告为未损坏?

  • 1

我们正在为我们的一个客户管理一个 MySQL 服务器,该客户拥有超过 100 个数据库,每个数据库大约有 50 个表,其中许多是 InnoDB 表。服务器崩溃了,我正试图找到罪魁祸首。重新启动时innodb_force_recovery = 2,我可以连接并且在 error.log 中看不到任何错误。更重要的是,mysqlcheck --all-databases所有表格都报告“Ok”。但是当我删除时innodb_force_recovery,服务器再次崩溃,将堆栈跟踪写入 error.log 并且只能使用kill -9.

在这些情况下,我应该如何找到有问题的数据库,以及什么会导致 mysqlcheck 错过损坏的表?请不要告诉我忽略它并从转储中恢复所有数据库。这对于一个或两个数据库来说可能是可以接受的,如果它在蓝月亮中只发生一次,但是我不止一次在同一台服务器上遇到问题,从转储中恢复所有内容只需要太多时间和手动工作才能做到这一点时间。

服务器版本为 5.5.46 并且innodb_file_per_table处于活动状态。

按要求摘录 error.log(是否The tablespace free space info is corrupt意味着存在不在特定表中且无法更正的错误?):

180222 17:13:48 mysqld_safe Starting mysqld daemon with databases from /home/mysql
180222 17:13:48 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
180222 17:13:48 [Note] /usr/libexec/mysqld (mysqld 5.5.46) starting as process 26242 ...
180222 17:13:48 [Note] Plugin 'FEDERATED' is disabled.
180222 17:13:48 InnoDB: The InnoDB memory heap is disabled
180222 17:13:48 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
180222 17:13:48 InnoDB: Compressed tables use zlib 1.2.3
180222 17:13:48 InnoDB: Using Linux native AIO
180222 17:13:48 InnoDB: Initializing buffer pool, size = 128.0M
180222 17:13:49 InnoDB: Completed initialization of buffer pool
180222 17:13:49 InnoDB: highest supported file format is Barracuda.
180222 17:13:49  InnoDB: Waiting for the background threads to start
180222 17:13:50 InnoDB: 5.5.46 started; log sequence number 1632912830888
180222 17:13:50 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
180222 17:13:50 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
180222 17:13:50 [Note] Server socket created on IP: '0.0.0.0'.
180222 17:13:50 [Note] Event Scheduler: Loaded 0 events
180222 17:13:50 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.46'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Remi
InnoDB: Dump of the tablespace extent descriptor:  len 40; hex 000000000000000200000000061600000000126e00000004ffffffffffffffffffffffffffffbfaa; asc                    n                    ;
InnoDB: Serious error! InnoDB is trying to free page 512
InnoDB: though it is already marked as free in the tablespace!
InnoDB: The tablespace free space info is corrupt.
InnoDB: You may need to dump your InnoDB tables and recreate the whole
InnoDB: database!
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
180222 17:13:50  InnoDB: Assertion failure in thread 2499464080 in file fsp0fsp.c line 3309
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
16:13:50 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=268435456
read_buffer_size=1048576
max_used_connections=0
max_threads=512
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1314506 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x30000
/usr/libexec/mysqld(my_print_stacktrace+0x33)[0x842a1f3]
/usr/libexec/mysqld(handle_fatal_signal+0x42b)[0x82d9d3b]
[0x7bc420]
[0x7bc410]
/lib/libc.so.6(gsignal+0x50)[0x626b10]
/lib/libc.so.6(abort+0x101)[0x628421]
/usr/libexec/mysqld[0x85012e7]
/usr/libexec/mysqld[0x850147e]
/usr/libexec/mysqld[0x849c0b1]
/usr/libexec/mysqld[0x84a8a61]
/usr/libexec/mysqld[0x8561fef]
/usr/libexec/mysqld[0x85570a9]
/usr/libexec/mysqld[0x847b082]
/usr/libexec/mysqld[0x846bf04]
/usr/libexec/mysqld[0x846dad4]
/lib/libpthread.so.0[0x50d912]
/lib/libc.so.6(clone+0x5e)[0x6d347e]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
180222 17:13:50 mysqld_safe Number of processes running now: 0
180222 17:13:50 mysqld_safe mysqld restarted
innodb
  • 2 个回答
  • 480 Views
Martin Hope
user2845840
Asked: 2014-09-30 09:33:10 +0800 CST

对 mod_security 日志的细粒度控制

  • 0

我在几十台服务器上安装了mod_security2(每台服务器都有几十个 VHost),没有时间为每个 VHost 配置它。在默认配置中,它会在日志文件中产生大量误报,所以我选择让它在DetectionOnly-mode 下运行(它不会阻止任何东西,但我仍然可以获得大多数黑客尝试的详细日志),但只有一个选择几个虚拟主机。

我对这个设置很满意,直到我发现一些服务器上的日志文件在不到 3 周的时间内增长到了几个 GB。我决定关闭生成大部分日志条目的少数 VHost 的日志记录。有几种不同的方法可以做到这一点,我最终决定使用非常具体的触发器制定新规则,这些触发器都有"nolog,phase:1,t:none,ctl:secAuditEngine=Off"作为动作。只要审计日志中的条目数量减少到可管理的水平,就可以成功。

但我仍然得到千兆字节的日志,因为我似乎无法阻止 mod_security2 写入错误日志。我尝试过SecDebugLogLevel 0,因为它是唯一与错误日志有关的配置指令(无论如何我都能找到),但无济于事。唯一似乎有帮助的是SecRuleEngine Off,它首先破坏了安装 mod_security2 的目的。

我错过了什么吗?无论我尝试什么,似乎我只能控制记录到审计日志的数量,而无法控制记录到错误日志的数量。

logging
  • 1 个回答
  • 319 Views
Martin Hope
user2845840
Asked: 2013-10-05 02:08:54 +0800 CST

为什么用 yum 安装两次相同的软件包不会给我相同的文件?

  • 5

我面临的情况:我设置了一台 CentOS 5.9 机器,它应该尽可能接近另一台 CentOS 5.9 机器的副本,但不是克隆。使用 yum,我(尽可能地)在目标机器上安装了所有软件包,这些软件包也安装在源机器上(如 和 报告的那样yum list installed)rpm -qa。之后我使用 md5deep 查找目标机器上仍然丢失的文件。我发现丢失的文件比我预期的要多得多,从而发现了我当前的问题。

在目标和源机器上都安装了包 traceroute-3:2.0.1-6.el5.i386 (说yum list installed)。在两台机器上repoquery --info --show-duplicates traceroute只列出了这个版本的包,并告诉我它可以在基础存储库中找到。在两台机器上rpm -ql traceroute-2.0.1-6.el5.i386列出相同的文件。在两台机器上都rpm -V traceroute-2.0.1-6.el5.i386告诉我安装进展顺利(没有文件修改/丢失)。快速查看 traceroute-2.0.1-6.el5.i386.rpm 仅显示二进制文件 (/bin/traceroute)、符号链接和文档,因此我不希望在安装该软件包时进行编译(但是我不是 RPM 专家,这只是快速查看,而不是彻底检查)。在两台机器上file /bin/traceroute告诉我。/bin/traceroute: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), stripped/bin/traceroute 在两台机器上的大小相同。

然而,当我md5sum /bin/traceroute在两台机器上执行时,我得到了不同的结果。xxd & diff 显示有几十个字节不同,并且差异似乎在实际代码中(尚未对其进行反汇编,但更改的部分不是人类可读的字符串)。traceroute 只是一个随机示例,在 /bin、/sbin 和 /lib 中还有几十个不同的文件。

知道发生了什么吗?我一直认为,只要编译/编辑不是安装的一部分,两次安装相同的包会产生完全相同的文件。至少我希望这rpm -V会告诉我有关已被篡改的文件的信息。如果 yum 能够告诉我它从哪个存储库下载了 RPM 文件,那将会有所帮助,但据我所知,我的 yum (3.2.22) 版本中不存在该工具。需要明确的是:repoquery 不会告诉我从哪个存储库下载了一个包,它只告诉我它在哪里可用。如果相同的包在 2 个或更多已启用的存储库中可用,repoquery 会列出所有包。Yum 可以决定它想要哪些副本,而且它似乎没有在任何日志文件中记录这个决定。

centos
  • 1 个回答
  • 1441 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve