Re: [Monotone-devel] Commit error (Possible LUA problem)
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. Greetings, Philipp ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Commit error (Possible LUA problem)
Am 15.02.2010 13:59, schrieb Stephen Leake: 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. I don't think that path is not set, but that no arguments are given, i.e. the magic arg variable is nil instead of a table as the error message suggests. So either there are really no arguments given to this function and this is where the error comes from, or lua has a faulty interpretation of arg. Philipp, try to open lua from command line and enter function foo(...) return unpack(arg) end = foo(1,2,3) Do you see 1 2 3 as output then? If yes, then its not a lua problem. Thomas. -- GPG-Key 0x160D1092 | tommyd3...@jabber.ccc.de | http://thomaskeller.biz Please note that according to the EU law on data retention, information on every electronic information exchange might be retained for a period of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en signature.asc Description: OpenPGP digital signature ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Commit error (Possible LUA problem)
Ahh, we're getting closer. Let's see ... Stephen Leake schrieb: What are OS are you on, and what language settings? Gentoo Linux on all machines, here on the workstation specifically: Linux 2.6.31-gentoo-r6 #1 SMP PREEMPT x86_64 Language setting is german, but Monotone was compiled without NLS. 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'. EDITOR is set to /usr/bin/vim as it should be, but VISUAL does not exist. Thomas Keller schrieb: I can only guess here, but I'd propose you load a custom rc file which contains the current std_hooks.lua contents and debug your way through until you see the problem. The strace should uncover those, right? I didn't create any custom hook scripts, except our server, were everything works just fine. This is by the way the only machine in our network which didn't get heavily updated in the last month. As I stated before, I have been installing KDE4 and my guess is, that this might have caused this situation. I attached a text file with the (nearly complete) trace. (Only the workspace files and some paths have been omitted) Philipp, try to open lua from command line and enter function foo(...) return unpack(arg) end = foo(1,2,3) Do you see 1 2 3 as output then? If yes, then its not a lua problem. No, in fact I see this: Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio function foo(...) return unpack(arg) end = foo(1,2,3) stdin:1: bad argument #1 to 'unpack' (table expected, got nil) stack traceback: [C]: in function 'unpack' stdin:1: in function stdin:1 (tail call): ? [C]: ? I guess we have some clue now :-) execve(/usr/bin/mtn, [mtn, ci], [/* 69 vars */]) = 0 access(/etc/ld.so.preload, R_OK) = -1 ENOENT (No such file or directory) open(/etc/ld.so.cache, O_RDONLY) = 3 open(/lib/libpcre.so.0, O_RDONLY) = 3 open(/usr/lib/libbotan-1.8.2.so, O_RDONLY) = 3 open(/usr/lib/liblua.so.5, O_RDONLY) = 3 open(/usr/lib/libsqlite3.so.0, O_RDONLY) = 3 open(/usr/lib/libidn.so.11, O_RDONLY) = 3 open(/lib/libz.so.1, O_RDONLY)= 3 open(/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/libstdc++.so.6, O_RDONLY) = 3 open(/lib/libm.so.6, O_RDONLY)= 3 open(/lib/libgcc_s.so.1, O_RDONLY)= 3 open(/lib/libc.so.6, O_RDONLY)= 3 open(/lib/libpthread.so.0, O_RDONLY) = 3 open(/lib/libbz2.so.1, O_RDONLY) = 3 open(/usr/lib/libcrypto.so.0.9.8, O_RDONLY) = 3 open(/lib/librt.so.1, O_RDONLY) = 3 open(/lib/libdl.so.2, O_RDONLY) = 3 open(/usr/lib64/locale/locale-archive, O_RDONLY) = 3 open(/usr/lib64/gconv/gconv-modules.cache, O_RDONLY) = 3 getcwd(/, 4096) = 59 stat(//_MTN, {st_mode=S_IFDIR|0755, st_size=144, ...}) = 0 stat(//_MTN, {st_mode=S_IFDIR|0755, st_size=144, ...}) = 0 stat(/, {st_mode=S_IFDIR|0755, st_size=696, ...}) = 0 chdir(/) = 0 stat(//.monotone/monotonerc, 0x7455c580) = -1 ENOENT (No such file or directory) stat(_MTN/monotonerc, 0x7455c580) = -1 ENOENT (No such file or directory) stat(_MTN/format, {st_mode=S_IFREG|0644, st_size=2, ...}) = 0 stat(_MTN/format, {st_mode=S_IFREG|0644, st_size=2, ...}) = 0 open(_MTN/format, O_RDONLY) = 3 stat(_MTN/options, {st_mode=S_IFREG|0644, st_size=162, ...}) = 0 open(_MTN/options, O_RDONLY) = 3 stat(_MTN/options, {st_mode=S_IFREG|0644, st_size=162, ...}) = 0 stat(_MTN/options, {st_mode=S_IFREG|0644, st_size=162, ...}) = 0 open(_MTN/options, O_RDONLY) = 3 stat(//Develop/Test.mtn, {st_mode=S_IFREG|0644, st_size=573440, ...}) = 0 stat(//.monotone/keys, {st_mode=S_IFDIR|0755, st_size=128, ...}) = 0 stat(_MTN, {st_mode=S_IFDIR|0755, st_size=144, ...}) = 0 stat(_MTN/options, {st_mode=S_IFREG|0644, st_size=162, ...}) = 0 stat(_MTN, {st_mode=S_IFDIR|0755, st_size=144, ...}) = 0 open(_MTN/mt5z7qi7.tmp, O_RDWR|O_CREAT|O_EXCL, 0666) = 3 rename(_MTN/mt5z7qi7.tmp, _MTN/options) = 0 stat(_MTN/revision, {st_mode=S_IFREG|0644, st_size=133, ...}) = 0 open(_MTN/revision, O_RDONLY) = 3 stat(//Develop/Test.mtn, {st_mode=S_IFREG|0644, st_size=573440, ...}) = 0 stat(//Develop/Test.mtn, {st_mode=S_IFREG|0644, st_size=573440, ...}) = 0 open(//Develop/Test.mtn, O_RDWR|O_CREAT, 0644) = 3 access(//Develop/Test.mtn-journal, F_OK) = -1 ENOENT (No such file or directory) access(//Develop/Test.mtn-journal, F_OK) = -1 ENOENT (No such file or directory) access(//Develop/Test.mtn-journal, F_OK) = -1 ENOENT (No such file or directory) access(//Develop/Test.mtn-journal, F_OK) = -1 ENOENT (No such file or directory)
Re: [Monotone-devel] Commit error (Possible LUA problem)
Am 15.02.10 17:46, schrieb Philipp Gröschler: Philipp, try to open lua from command line and enter function foo(...) return unpack(arg) end = foo(1,2,3) Do you see 1 2 3 as output then? If yes, then its not a lua problem. No, in fact I see this: Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio function foo(...) return unpack(arg) end = foo(1,2,3) stdin:1: bad argument #1 to 'unpack' (table expected, got nil) stack traceback: [C]: in function 'unpack' stdin:1: in function stdin:1 (tail call): ? [C]: ? I guess we have some clue now :-) I talked with the guys on #lua and they told me that `arg` is deprecated in favour of `...` and that `arg` does no longer works if Lua is compiled without compatibility. So I'll go through our code and replace the occurrences of `arg` accordingly. Thanks for your patience, Thomas. -- GPG-Key 0x160D1092 | tommyd3...@jabber.ccc.de | http://thomaskeller.biz Please note that according to the EU law on data retention, information on every electronic information exchange might be retained for a period of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en signature.asc Description: OpenPGP digital signature ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Commit error (Possible LUA problem)
Am 15.02.10 22:36, schrieb Thomas Keller: I talked with the guys on #lua and they told me that `arg` is deprecated in favour of `...` and that `arg` does no longer works if Lua is compiled without compatibility. So I'll go through our code and replace the occurrences of `arg` accordingly. This should be fixed in 1d1d93c561a8087e893cbd0f3b374400195ad436. Thomas. -- GPG-Key 0x160D1092 | tommyd3...@jabber.ccc.de | http://thomaskeller.biz Please note that according to the EU law on data retention, information on every electronic information exchange might be retained for a period of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en signature.asc Description: OpenPGP digital signature ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Commit error (Possible LUA problem)
Thomas Keller schrieb: This line leads me to the execute() function, apparently it is called with no arguments in place from somewhere. Do you happen to have a custom, not working edit_comment hook lingering around anywhere? Not sure about that. I know that there is no custom LUA script in ~/.monotone, only the key directory. It could be that in the whole system upgrading process some shared LUA script (if there is any at all) was modified, though I doubt that. 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. Seems to be time for an update, finally ;-) Anyway, thanks! Philipp ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
[Monotone-devel] Commit error (Possible LUA problem)
Hello! Recently on my laptop Monotone startet throwing errors when trying to commit. They look like: 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 No, that is not the real branch name. You might have guessed that already ;-) Version of Monotone ist still 0.44 throughout our network. I didn't have the nerve to upgrade yet, the first try bothered me with the demand of a lot of manual labour, so I repelled that for quite a while. Recent changes on that particular machine include an upgrade to KDE 4 and in course of that a recompilation or upgrade of many other packages. Other mtn commands like sync or status work perfectly. Any ideas? Thanks, Philipp ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Commit error (Possible LUA problem)
Am 22.01.10 17:16, schrieb Philipp Gröschler: Hello! Recently on my laptop Monotone startet throwing errors when trying to commit. They look like: 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 This line leads me to the execute() function, apparently it is called with no arguments in place from somewhere. Do you happen to have a custom, not working edit_comment hook lingering around anywhere? Thomas. -- GPG-Key 0x160D1092 | tommyd3...@jabber.ccc.de | http://thomaskeller.biz Please note that according to the EU law on data retention, information on every electronic information exchange might be retained for a period of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en signature.asc Description: OpenPGP digital signature ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel