提交钩子失败

发布于 2024-07-09 08:32:43 字数 1733 浏览 13 评论 0原文

我正在尝试实现一些钩子,但是前和后都失败了。 当我尝试提交时,我得到了相同的错误消息:

'*-commit' hook failed (did not exit cleanly: apr_exit_why_e was 2, exitcode was
-1073741515).   with no output.

Exitcode -1073741515 看起来很奇怪,快速的 google-fu 给了我这个:

被视为十六进制 DWORD,您看到的错误代码是 0xC0000135。

即 Sev=11、C=0、R=0、Facility=0、Code=0x0135。

可以在 NtStatus.h 中找到值 0xC0000135,其定义如下

//
// MessageId: STATUS_DLL_NOT_FOUND
//
// MessageText:
//
//  {Unable To Locate Component}
//  This application has failed to start because %hs was not found.
// Re-installing the application may fix this problem.
//
#define STATUS_DLL_NOT_FOUND             ((NTSTATUS)0xC0000135L)

好的,找不到 dll,应该不会太困难吧? 我有一个带有 svn 的虚拟机,它与这些钩子保持和平。 所以我在两台机器上运行 Filemon.exe 和 Depends.exe。

我仍在艰难地浏览两台服务器的 filemon 日志,并且 dependent 并没有给我任何我认为被 Commit Hook 击中的可执行文件带来任何独特的问题。

我决定快速浏览一下事件日志,天哪!

“预提交”挂钩失败(未完全退出:apr_exit_why_e 为 2,退出代码为 -1073741515)。 没有输出。 [409,#165001]

额外的信息,这个[409,#165001]遍布谷歌,但我并没有真正找到任何有用的东西。

该钩子显式调用具有三个参数的可执行文件。

C:\SubversionNotify\SubversionNotify.exe %1 %2 -pre

我什至也尝试过使用变量。

SET REPOS=%1
SET REV=%2
C:\SubversionNotify\SubversionNotify.exe %REPOS% %REV% -pre

查看 filemon 日志表明它永远不会进入 SubversionNotify.exe

它已经到了我无法真正花费更多时间来尝试实现这一点的地步,请帮助我,所以,你是我唯一的希望。

服务器规格:

Windows XP,运行 VisualSVN Server,最新版本。

编辑: 看起来 SubversionNotify 正在抛出异常,返回 Depends.exe 以检查哪个 dll 失败。

错误如下:

应用程序无法正确初始化(0xc0000135)。

那个 0xC0000135 之前已经见过了,dll 狩猎啊嘿!

I'm trying to implement some hooks, both pre and post fail however. I get the same error message for both when I try to commit:

'*-commit' hook failed (did not exit cleanly: apr_exit_why_e was 2, exitcode was
-1073741515).   with no output.

Exitcode -1073741515 looks to be an odd one, and a quick bit of google-fu got me this:

Treated as a hex DWORD, the error code you are seeing is 0xC0000135.

That is Sev=11, C=0, R=0, Facility=0, Code=0x0135.

The value 0xC0000135 can be found in NtStatus.h with the following definition

//
// MessageId: STATUS_DLL_NOT_FOUND
//
// MessageText:
//
//  {Unable To Locate Component}
//  This application has failed to start because %hs was not found.
// Re-installing the application may fix this problem.
//
#define STATUS_DLL_NOT_FOUND             ((NTSTATUS)0xC0000135L)

Ok, dll not found, shouldn't be too difficult right? I have a VM with svn on it that's being peaceful with these hooks. So I run Filemon.exe and Depends.exe on both machines.

I'm still slogging through the filemon logs for both servers, and depends isn't giving me any unique problems with any executable that I can think of being hit by a Commit Hook.

I decided to take a quick peek in the event logs, and Oh Boy!

'pre-commit' hook failed (did not exit cleanly: apr_exit_why_e was 2, exitcode was -1073741515). with no output. [409, #165001]

Extra smidgens of information, this [409, #165001] is all over google, but I'm not really picking up anything helpful.

The hook is explicitly calling an executable with three parameters.

C:\SubversionNotify\SubversionNotify.exe %1 %2 -pre

I've even tried to use variables as well.

SET REPOS=%1
SET REV=%2
C:\SubversionNotify\SubversionNotify.exe %REPOS% %REV% -pre

Looking in the filemon logs shows me that it never makes it to SubversionNotify.exe

It's getting to the point where I can't really spend much more time trying to implement this, help me SO, you're my only hope.

Server Specs:

Windows XP, running VisualSVN Server, latest release.

Edit:
It seems as though SubversionNotify is throwing the exception, back to Depends.exe to check to see what dll is failing.

Error is as follows:

The application failed to initialize properly (0xc0000135).

That 0xC0000135 was seen earlier, dll hunt ahoy!

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

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

发布评论

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

评论(3

无法回应 2024-07-16 08:32:43

通常,提交挂钩的问题是绝对没有环境(因此没有路径),因此所有引用都必须非常明确。 我通常最终会制作一个小批处理文件,将目录更改为正确的目录并执行命令。

编辑:

尝试将目录更改为 C:\SubversionNotify

也许您缺少运行程序所需的一些运行时 dll。
记住:没有路。 您可以通过在命令行窗口中将路径设置为 NOTHING 来模拟这一点。
设置路径=。

验证记事本等简单命令不起作用。 那么你的exe可以工作吗? 找出丢失的 dll 的位置并在批处理文件的开头构建路径。

Normally the problem with commit hooks is that there is ABSOLUTELY no environment (thus no path), so all references have to be painfully explicit. I usually end up making a small batch file that changes directory to the proper directory and executes the command.

Edit:

TRY CHANGING DIRECTORY TO C:\SubversionNotify

Maybe you are missing some runtime dll that is required to run the program.
Remember: There is NO path. You can simulate this by setting path to NOTHING in a command line window.
set PATH=.

Verify that simple commands like notepad do not work. Does your exe work then? Find out where the missing dlls are and build a path at the start of the batch file.

可爱暴击 2024-07-16 08:32:43

我想我应该在这里分享解决方案,因为我从中得到了很大的笑声。

SubversionNotify 是用 .NET 编写的。
服务器未安装 .NET Framework。
虚拟机做到了。

我现在戴着一顶傻瓜帽。

I'd thought I'd share the Solution here, as I got a great laugh out of it.

The SubversionNotify was written in .NET.
The Server did not have the .NET Framework installed.
The VM did.

I am wearing a dunce cap now.

墨洒年华 2024-07-16 08:32:43

感谢您发布您的答案。 如果你不这样做,我会花更多的时间试图解决这个问题,并且感觉比现在更愚蠢。 刚刚炸毁了一个盒子并安装了 VisualSVN 和 SubversionNotify,但不明白为什么它不起作用。

Thanks for posting your answer. If you didn't I would have spent a lot more time trying to run this down and feeling even more stupid than I do now. Just blew out a box and did an install of VisualSVN and SubversionNotify and couldn't figure out why it wasn't working.

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