monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Commit error (Possible LUA problem)


From: Stephen Leake
Subject: Re: [Monotone-devel] Commit error (Possible LUA problem)
Date: Mon, 15 Feb 2010 07:59:48 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt)

Philipp Gröschler <address@hidden> writes:

> Philipp Gröschler schrieb:
>> Too bad the 0.44 ebuild has fallen out of Portage a while ago, otherwise
>> I could just re-emerge Monotone and the error would most probably go
>> away.
>
> A short update on that story:
>
> On my laptop I manually created a 0.44 ebuild and reinstalled that
> version, no effect, the error is still there.
>
> On my workstation I updated to 0.45 (because of 0.46 not yet being in
> Portage tree and me being detered by the amount of severe bug reports
> from the last two weeks) and, damn it, that exact same error is now
> appearing here on a completely different branch.
>
> Here's the message again:
>> mtn: beginning commit on branch '#######'
>> mtn: warning: [string "<std hooks>"]:33: bad argument #1 to 'unpack' (table 
>> expected, got nil)
>> mtn: misuse: edit of log message failed
>
> In the meantime I reinstalled all dependencies, tried with a freshly
> pulled database, no change. I traced all files opened by mtn during the
> commit process, and the only existing LUA script which gets opened is
> "/etc/monotone/hooks.lua" whose sole contents are:
>> include(get_confdir() .. "/passphrase.lua")
>
> When I delete this file, no change.
>
> The trace before the error occurs is:
>> mtn: beginning commit on branch '######'
>> stat("_MTN/log", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
>> stat("_MTN/log", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
>> open("_MTN/log", O_RDONLY)              = 4
>> open("/tmp/mtn.VGM90G", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
>> open("/tmp/mtn.VGM90G", O_RDWR)         = 4
>> --- SIGCHLD (Child exited) @ 0 (0) ---
>> mtn: warning: [string "<std hooks>"]:33: bad argument #1 to 'unpack' (table 
>> expected, got nil)
>> mtn: misuse: edit of log message failed
>
> Same situation as on the laptop, it crashes after opening the temporary
> file which should be passed to vi for editing the commit message.
>
> These are the versions of the installed dependencies:
> dev-libs/libpcre-7.9-r1
> dev-libs/botan-1.8.8
> dev-db/sqlite-3.6.20-r1
> dev-lang/lua-5.1.4-r4
> net-dns/libidn-1.15
> dev-libs/boost-1.35.0-r5
>
> No more ideas here. And my workstation is also broken now, which is ...
> not good.

As a work-around, you can edit the log file before running commit, and
use --message-file to specify it. 

What are OS are you on, and what language settings?

Line 33 in std_hooks is the 'spawn' in:

function execute(path, ...)
   local pid
   local ret = -1
   pid = spawn(path, unpack(arg))
   if (pid ~= -1) then ret, pid = wait(pid) end
   return ret
end

So it looks like the path to the executable is nil (should be 'vi', in
this case). That is in turn specified by the environment variables
"VISUAL" and "EDITOR" (see std_hooks edit_comment). If
those env variables are null, it searches PATH for executables named
'editor' and 'vi'.

So perhaps you have VISUAL or EDITOR set incorrectly. Or if they are
not set, try setting them to a valid editor, that is in Cygwin PATH.

On the other hand, the logic in edit_comment seems safe against bad
env variables, so this is looking like a lua bug.

-- 
-- Stephe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]