带有 svn post-commit 挂钩的 trac-admin 会导致分段错误

发布于 2024-10-31 01:59:12 字数 944 浏览 0 评论 0原文

我刚刚在我的 Fedora 机器上通过 sqlite 设置了 trac 0.12.2,并且 trac 通过 Web 浏览器和命令行运行良好。我的问题是实现 svn 钩子,其中运行此命令时提交后钩子因分段错误而死亡:

/usr/bin/trac-admin /var/trac/myproject 变更集添加了 "$1" "$2"

其中 $1 是本地文件系统上的 svn 存储库路径,$2 是修订版本。

该命令的输出是这样的:

/path/to/svn/hooks/post-commit: line 9: 3874 Segmentation failure /usr/bin/trac-admin /var/trac/myproject Changeset added "$1" " $2"

我将如何调试这个?有谁知道为什么全新安装时可能会发生这种情况(我没有升级,它是干净的)?

我对运行此命令的用户(apache)进行了一些基本检查。我还尝试以 apache 身份运行此命令以查看它是否会失败,但这只需从命令行中找到即可:

sudo -u apache /usr/bin/trac-admin /var/ trac/ujaweb 变更集添加了 /path/to/svn/repo 750

我在这里有点没有想法。有谁知道为什么会发生这种情况?

这里有一些有用的进一步信息:

Linux:Linux hostname.com 2.6.18-028stab069.5 #1 SMP Tue May 18 17:26:16 MSD 2010 x86_64 x86_64 x86_64 GNU/Linux< br> Apache:2.2.17 带 mod_wsgi
Python:2.6.4
Trac:0.12.2(通过带有 mod_wsgi 的 Apache)

I just set up trac 0.12.2 over sqlite on my Fedora box and trac is working fine through the web browser and command line. My issue is with implementing svn hooks where the post-commit hook dies on a segmentation fault when running this command:

/usr/bin/trac-admin /var/trac/myproject changeset added "$1" "$2"

Where $1 is the svn repository path on the local file system and $2 is the revision.

The output of this command is this:

/path/to/svn/hooks/post-commit: line 9: 3874 Segmentation fault /usr/bin/trac-admin /var/trac/myproject changeset added "$1" "$2"

How would I go about debugging this? Does anyone know why this might be happening on a fresh install (I did not upgrade, it's clean)?

I did some basic checking with regards to the user running this command which is apache. I also tried running this command as apache to see if it would fail, but this works just find from the command line:

sudo -u apache /usr/bin/trac-admin /var/trac/ujaweb changeset added /path/to/svn/repo 750

I'm somewhat out of ideas here. Does anyone have any ideas why this might be happening?

Here is some further information in case it's useful:

Linux: Linux hostname.com 2.6.18-028stab069.5 #1 SMP Tue May 18 17:26:16 MSD 2010 x86_64 x86_64 x86_64 GNU/Linux
Apache: 2.2.17 w/ mod_wsgi
Python: 2.6.4
Trac: 0.12.2 (over Apache w/ mod_wsgi)

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

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

发布评论

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

评论(2

眸中客 2024-11-07 01:59:12

您可以尝试在 strace 下运行 trac-admin,并保存输出:

/usr/bin/strace -o /var/trac/myproject/log/trace.log /usr/bin/trac-admin /var/trac/myproject changeset added "$1" "$2"

然后,在 /var/trac/myproject/log 中查看生成的日志/trace.log

另一种选择是让您的系统生成核心转储(您可能必须在 /etc/limits 和/或 /etc/security/limits.conf 中启用它),然后使用 gdb 打开转储。

You could try running trac-admin under strace, and save the output:

/usr/bin/strace -o /var/trac/myproject/log/trace.log /usr/bin/trac-admin /var/trac/myproject changeset added "$1" "$2"

Then, have a look at the generated log in /var/trac/myproject/log/trace.log.

Another option would be to have your system generate a core dump (you may have to enable it in your /etc/limits and/or /etc/security/limits.conf), and open the dump with gdb.

匿名。 2024-11-07 01:59:12

我的第一个尝试是关闭 selinux 一段时间并测试它是否仍然发生。
如果没有 - 您必须弄清楚如何配置 selinux 以允许该进程因分段错误而失败而打开 /proc/mount 。

My first try would be to turn off the selinux for a while and test if it still happens.
If not - you have to figure out how to configure selinux to allow opening /proc/mount by that process failing with segmentation fault.

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