Problem with key

Steve Snyder swsnyder at snydernet.net
Wed Nov 2 23:37:13 GMT 2011


It sounds like your problem is with Lua rather than with ekeyd.

I'm running 2 EntropyKeys, each on CentOS 5.x/i686 systems, and they 
never crash.  Of course, I'm not running the version of Lua on Simtec's 
website (old) or my distribution's Lua (really old).

There is a large patch that should be applied to the current stable 
version of Lua (v5.1.4) that fixes a multitude of bugs:

	http://www.lua.org/ftp/patch-lua-5.1.4-4

In addition to not saying what version of Lua you're running you also 
don't say what version of ekeyd is running on your system.  It is the 
current v1.1.4, right?

I'd say insure that you're running the current code before spending much 
more time on debugging.



On 11/02/2011 04:16 PM, micah anderson wrote:
>
> Every 2 days or so, my entropy key seems to die, segfaults and dumps
> core. I need to restart it to get it back. It seems to say something
> similar to this each time:
>
> ekeyd[3199]: segfault at 7f6874bf57e0 ip 00007f6d93b5ce46 sp 00007fff2e5d0480 error 6 in liblua5.1.so.0.0.0[7f6d93b55000+2a000]
>
> I noticed other people were having this problem[0] as it has been
> reported in a Debian bug log. To try and help I recompiled ekeyd with
> debugging symbols, and got a backtrace and posted it to the bug log, but
> have not heard anything from the maintainer. I'll include the gdb output
> below.
>
> I've tried a different key, and the same result. I wonder if perhaps the
> key is overloaded? If so, it seems odd behavior to segfault in that
> situation.
>
> Here is the gdb backtrace:
>
> (gdb) thread apply all bt
>
> Thread 1 (process 12066):
> #0  0xb7fc71e6 in luaV_gettable (L=0x8064040, t=0x8064088, key=0xbffff040, val=0x8e3d6ffc) at lvm.c:117
> #1  0xb7fb8bbc in lua_getfield (L=0x8064040, idx=-10002, k=0x8057de9 "ENTROPY") at lapi.c:551
> #2  0x0804a21d in lstate_foldback_entropy (
>      eblock=0xbffff180 "\325\064\301\026H\035\362a\022\071\330v\303CTGk\020d\\\277\233\032`\277\003\346\270\b\003\302q\001", ecount=32) at lstate.c:496
> #3  0x0804c351 in estream_write (state=0x8082ae8, buf=0xbffff180, count=32) at stream.c:145
> #4  0x0804bead in entropy_pkt_handler (state=0x808b6b8,
>      buf=0xbffff180 "\325\064\301\026H\035\362a\022\071\330v\303CTGk\020d\\\277\233\032`\277\003\346\270\b\003\302q\001", count=32) at connection.c:407
> #5  0x0804b7d9 in econ_run (con_state=0x808b6b8) at connection.c:605
> #6  0x08049ed2 in ekey_fd_activity (fd=8, events=1, pw=0x808b6b8) at ekeyd.c:81
> #7  0x0804d1ca in ekeyfd_poll (timeout=-1) at fds.c:99
> #8  0x08049b14 in main (argc=1, argv=0xbffff354) at ekeyd.c:279
> (gdb) bt full
> #0  0xb7fc71e6 in luaV_gettable (L=0x8064040, t=0x8064088, key=0xbffff040, val=0x8e3d6ffc) at lvm.c:117
>          res = 0x8081ad4
>          tm = 0x8064488
>          loop = 0
> #1  0xb7fb8bbc in lua_getfield (L=0x8064040, idx=-10002, k=0x8057de9 "ENTROPY") at lapi.c:551
>          t = 0x8064088
>          key = {value = {gc = 0x8067888, p = 0x8067888, n = 6.6521887874227949e-316, b = 134641800}, tt = 4}
> #2  0x0804a21d in lstate_foldback_entropy (
>      eblock=0xbffff180 "\325\064\301\026H\035\362a\022\071\330v\303CTGk\020d\\\277\233\032`\277\003\346\270\b\003\302q\001", ecount=32) at lstate.c:496
>          L = 0x8064040
> #3  0x0804c351 in estream_write (state=0x8082ae8, buf=0xbffff180, count=32) at stream.c:145
>          wr =<value optimized out>
> #4  0x0804bead in entropy_pkt_handler (state=0x808b6b8,
>      buf=0xbffff180 "\325\064\301\026H\035\362a\022\071\330v\303CTGk\020d\\\277\233\032`\277\003\346\270\b\003\302q\001", count=32) at connection.c:407
>          session_state = {h = {hashBitLen = 256, bCnt = 0, T = {8, 13763000461244235776}}, X = {17248407767138219025, 15353654178714778695,
>              14002893104654875124, 6618644036545962442}, b = '\000'<repeats 31 times>}
>          seq_num = 2387
>          randbuffer_encbytes = "1u`\234\322\f<\r\020\362z\220\037_\357Do>\234\307˵\324&1\220%ۧ\306.",<incomplete sequence \357>
>          loop =<value optimized out>
> #5  0x0804b7d9 in econ_run (con_state=0x808b6b8) at connection.c:605
>          res = 32
>          data = "\325\064\301\026H\035\362a\022\071\330v\303CTGk\020d\\\277\233\032`\277\003\346\270\b\003\302q\001\000\000\000\340J\006\b\377\377\377\377\004\213\375\267\360o=\216@@\006\b\330\361\377\277\062\307\373\267@@\006\b\316V\375\267\021\000\000\000\004\213\375\267@@\006\b\004\000\000\000\b\362\377\277\350\315\373\267@@\006\b\004\000\000\000\360o=\216h\264\b\bh\264\b\b\000\000\006\001\000\000\000\000\360o=\216"
> #6  0x08049ed2 in ekey_fd_activity (fd=8, events=1, pw=0x808b6b8) at ekeyd.c:81
> No locals.
> #7  0x0804d1ca in ekeyfd_poll (timeout=-1) at fds.c:99
>          rdy = 2
>          fdcnt = 1
>          fdloop = 2
> #8  0x08049b14 in main (argc=1, argv=0xbffff354) at ekeyd.c:279
>          res = 134751424
>          opt =<value optimized out>
>          configfile = 0x8064008 "/etc/entropykey/ekeyd.conf"
>          pidfile = 0x8064028 "/var/run/ekeyd.pid"
> (gdb) quit
>
>
> Thanks for any ideas!
> micah
>
>
>
>
>
> _______________________________________________
> EntropyKey-users mailing list
> EntropyKey-users at lists.simtec.co.uk
> http://lists.simtec.co.uk/cgi-bin/mailman/listinfo/entropykey-users



More information about the EntropyKey-users mailing list