Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mdb_test.lua:41: bad argument #2 to 'open' #2

Closed
ad1862 opened this issue Jan 19, 2014 · 4 comments
Closed

mdb_test.lua:41: bad argument #2 to 'open' #2

ad1862 opened this issue Jan 19, 2014 · 4 comments
Assignees

Comments

@ad1862
Copy link

ad1862 commented Jan 19, 2014

When I try to run test file:
/usr/bin/lua: mdb_test.lua:41: bad argument #2 to 'open' (number expected, got nil)
stack traceback:
[C]: in function 'open'
mdb_test.lua:41: in function 'mtest'
mdb_test.lua:237: in main chunk
[C]: in ?

/usr/bin/lua test.lua
Lightning MDB version: MDB 0.9.11: (January 15, 2014)
Lightning error: Successful return: 0
-- globals --
MDB_KEYEXIST -30799
MDB_VERSION_MISMATCH -30794
MDB_PREV 12
MDB_RESERVE 65536
MDB_NEXT 8
MDB_PREV_NODUP 14
MDB_NOSUBDIR 16384
MDB_NEXT_MULTIPLE 10
MDB_TXN_FULL -30788
env_create function: 0xb7777940
MDB_SET_RANGE 17
MDB_READERS_FULL -30790
MDB_SET_KEY 16
version function: 0xb77779f0
MDB_DUPSORT 4
MDB_LAST_DUP 7
MDB_PAGE_NOTFOUND -30797
MDB_PREV_DUP 13
MDB_MAP_RESIZED -30785
strerror function: 0xb7777670
MDB_NEXT_NODUP 11
MDB_NODUPDATA 32
MDB_APPENDDUP 262144
MDB_NOSYNC 65536
MDB_INTEGERKEY 8
MDB_NOMETASYNC 262144
MDB_REVERSEDUP 64
MDB_SET 15
MDB_NOOVERWRITE 16
MDB_FIRST 0
MDB_TLS_FULL -30789
MDB_LAST 6
MDB_GET_MULTIPLE 5
MDB_GET_CURRENT 4
MDB_SUCCESS 0
MDB_WRITEMAP 524288
MDB_MULTIPLE 524288
MDB_NOTFOUND -30798
MDB_MAP_FULL -30792
MDB_RDONLY 131072
MDB_FIRST_DUP 1
MDB_REVERSEKEY 2
MDB_CURRENT 64
MDB_MAPASYNC 1048576
MDB_NEXT_DUP 9
MDB_GET_BOTH_RANGE 3
MDB_GET_BOTH 2
MDB_CURSOR_FULL -30787
MDB_FIXEDMAP 1
MDB_INCOMPATIBLE -30784
MDB_PANIC -30795
MDB_INTEGERDUP 32
MDB_CREATE 262144
MDB_DUPFIXED 16
MDB_DBS_FULL -30791
MDB_CORRUPTED -30796
MDB_PAGE_FULL -30786
MDB_APPEND 131072
MDB_INVALID -30793
userdata: 0x9623524
userdata: 0x9623524
fixedmap 1
read only 131072
-- stats --
ms_leaf_pages 0
ms_overflow_pages 0
ms_entries 0
ms_branch_pages 0
ms_psize 4096
ms_depth 0
-- info --
me_numreaders 0
me_last_txnid 0
me_maxreaders 126
ms_last_pgno 1
me_mapsize 1048576
get_path ./temp/foo
txn userdata: 0x9623704
txn userdata: 0x9623744
-- txn stat --
ms_leaf_pages 0
ms_overflow_pages 0
ms_entries 0
ms_branch_pages 0
ms_psize 4096
ms_depth 0
--- grow_db ---
userdata: 0x9623804
userdata: 0x9623804
making more room at 505
userdata: 0x962b424
userdata: 0x962b424

lua 5.2, MDB 0.9.11, Debian sid i686,

@ghost ghost assigned shmul Jan 19, 2014
shmul pushed a commit that referenced this issue Jan 19, 2014
@shmul
Copy link
Owner

shmul commented Jan 19, 2014

This is probably due to a failure to create the ./temp/testdb directory. I added the -p flag and pushed an updated version. Please tell me whether it works.

@shmul shmul closed this as completed Jan 19, 2014
@ad1862
Copy link
Author

ad1862 commented Jan 19, 2014

I think the problem in something else, because ./temp/testdb directory is successfully created, but still not work..

upd: my lmdb installation crashes with segfault after mtest`s

@shmul
Copy link
Owner

shmul commented Jan 19, 2014

Can you please provide me environment details - what OS you are using? What lmdb version?
When you say mtest segfaults, you mean that lmdb's own tests fail?

@shmul shmul reopened this Jan 19, 2014
@ad1862
Copy link
Author

ad1862 commented Jan 19, 2014

lua 5.2, LMDB 0.9.11, Debian sid i686
Yes, I built, installed and tried to run lmdb tests (mtest1, 2, 3 ...)
all these tests return "segmentation fault", and now I'm trying to contact the author

upd: found http://www.openldap.org/its/index.cgi/Incoming?id=7586;page=22

All tests crash with Segmentation Fault...
This is normal behavior. The tests do no error checking. The tests are not
meant to be run blindly, you are expected to read their source code.
Ordinarily I only "run" them by single-stepping under gdb so I can examine the
library state at each point.

@shmul shmul closed this as completed Dec 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants