通过级别和kill-9的套接字故障来窥视内核

发布于 2024-08-02 21:47:04 字数 484 浏览 4 评论 0原文

Kill-9-signalling 所有 postgres 进程在命令后立即引发错误:

$ psql
psql: could not connect to server: Connection refused
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

长期计算机科学问题

测试的目的是模拟一个严重的致命错误,由于套接字故障而窥视内核。在崩溃恢复等情况下这是一个很好的做法。

  1. 它与 x86 的级别(零级和三级)有关吗?
  2. 9杀对kernel、fs等东西做了什么?
  3. 插座有什么问题?
  4. 在信号传输过程中,文件发生了什么与副作用相关的情况?

Kill-9-signalling all postgres processes ignite errors immediately after the command:

$ psql
psql: could not connect to server: Connection refused
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

Long-term Computer Science problem

The aim of the test is to simulate a serious fatal error, peeking into kernel due to the socket failure. It is good practise in cases such as crash-recovery.

  1. Does it have something to do with the levels, zero and three, of x86?
  2. What did the 9-killing do to things such as kernel and fs?
  3. What is wrong with the socket?
  4. What did happen to files during the signaling, related to side effects?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

烂柯人 2024-08-09 21:47:04

这更像是一种服务器故障类型的问题,但尝试像这样运行 psql:

sudo -u postgres psql

当您安装 PostgreSQL 时,没有为当前用户创建用户帐户,因此您必须创建一个。

可以这样实现(其中masi是想要的用户名):

sudo -u postgres createuser -sdrPE masi

This more a Server Fault kind of question, but try running psql like this:

sudo -u postgres psql

When you install PostgreSQL, there's no user account created for your current user, so you'd have to create one.

That can be achieved like this (where masi is the wanted username):

sudo -u postgres createuser -sdrPE masi
两人的回忆 2024-08-09 21:47:04

跟这个有关系吗?
x86 的第 0 级和第 3 级?

不。

9杀事件对事情做了什么
比如内核和文件系统?

什么都没有——尽管 postgresql 的数据库文件可能处于不一致的状态。

重新安装失败
与副作用有关

没有(?)。

向进程发送信号 9 只是强制其立即退出。对于数据库服务器来说,如果它正在更改数据文件/存储,则可能会有点致命 - 使它们处于不一致的状态。

听起来您要么没有从旧的 postgresql 安装中删除所有内容,要么在重新安装后没有正确配置服务器。

Does it have something to do with the
levels, zero and three, of x86?

No.

What did the 9-killing do to things
such as kernel and fs?

Nothing - though the database files of postgresql might have been left in an inconsistent state.

Has the failure with reinstalling
anything to do with side effects

No (?).

Sending signal 9 to a process simply forces it to exit immediately. For a database server that can be a bit fatal if it was in the middle of altering the data files/storage - leaving them in an inconsistent state.

It sounds like you either haven't removed everything from your old postgresql installation, or you haven't configured the server properly after reinstalling it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文