Hi list,
I have a segfault when using the Nettle cmod under FreeBSD 4.7, it seems to be related to threads:
/home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138: Fatal error:
Program received signal SIGSEGV, Segmentation fault. 0x2860f340 in f_HashState_update (args=1) at /home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138 138 THREADS_DISALLOW(); (gdb) display data->len 2: data->len = 56 (gdb) display (char*)data->str 4: ( char *) data->str = 0xa06d014 "camas_fix_coding://Bertrand LUPART bertrand@linkeo.com" (gdb) bt #0 0x2860f340 in f_HashState_update (args=1) at /home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138 #1 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9e20, arg2=0x3) at /home/david/Pike/7.6/src/apply_low.h:214 #2 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=1) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #3 0x8563339 in ?? () #4 0x8070eea in eval_instruction ( pc=0x8563138 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #5 0x808abed in o_catch (pc=0x8563138 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:2027 #6 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #7 0x8563132 in ?? () #8 0x8070eea in eval_instruction ( pc=0x90c9328 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #9 0x808abed in o_catch (pc=0x90c9328 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:2027 #10 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #11 0x90c9322 in ?? () ---Type <return> to continue, or q <return> to quit--- #12 0x8070eea in eval_instruction (pc=0x9571fd8 "ÇD$\004\005") at /home/david/Pike/7.6/src/interpret.c:1229 #13 0x808abed in o_catch (pc=0x9571fd8 "ÇD$\004\005") at /home/david/Pike/7.6/src/interpret.c:2027 #14 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #15 0x9571fd2 in ?? () #16 0x8070eea in eval_instruction ( pc=0x956dbc6 "\213\r0\025.\b¸:$©ö÷Ø\211A\034ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #17 0x808aab0 in mega_apply (type=APPLY_STACK, args=8, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #18 0x808acfc in f_call_function (args=8) at /home/david/Pike/7.6/src/interpret.c:2053 #19 0x285f087d in container_callback (this=0xa02a600, thisobj=0x8da9e08, v=0x98cc258, startc=0x8b96180, cstartc=2006, endc=0x8b96180, cendc=3885, st=0x8892f30, cutstart=0x8892f3c, ccutstart=0x8892f40, cutend=0x8b96180, ccutend=3892) at /home/david/Pike/7.6/src/modules/Parser/html.c:2735 #20 0x285f2b50 in do_try_feed (this=0xa02a600, thisobj=0x8da9e08, st=0x8892f30, feed=0x8892f3c, finished=1, ignore_tag_cb=0) at /home/david/Pike/7.6/src/modules/Parser/html.c:3224 #21 0x285f48b2 in try_feed (finished=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3737 ---Type <return> to continue, or q <return> to quit--- #22 0x285f534e in html_finish (args=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3932 #23 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9e08, arg2=0xc) at /home/david/Pike/7.6/src/apply_low.h:214 #24 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=55) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #25 0x9571a8b in ?? () #26 0x8070eea in eval_instruction ( pc=0x956dbc6 "\213\r0\025.\b¸:$©ö÷Ø\211A\034ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #27 0x808aab0 in mega_apply (type=APPLY_STACK, args=8, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #28 0x808acfc in f_call_function (args=8) at /home/david/Pike/7.6/src/interpret.c:2053 #29 0x285f087d in container_callback (this=0xa010400, thisobj=0x8da9c70, v=0x98cc720, startc=0x8b96190, cstartc=123, endc=0x8b96190, cendc=16534, st=0x8892f50, cutstart=0x8892f5c, ccutstart=0x8892f60, cutend=0x8b96190, ccutend=16541) at /home/david/Pike/7.6/src/modules/Parser/html.c:2735 #30 0x285f2b50 in do_try_feed (this=0xa010400, thisobj=0x8da9c70, st=0x8892f50, feed=0x8892f5c, finished=1, ignore_tag_cb=0) at /home/david/Pike/7.6/src/modules/Parser/html.c:3224 #31 0x285f48b2 in try_feed (finished=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3737 ---Type <return> to continue, or q <return> to quit--- #32 0x285f534e in html_finish (args=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3932 #33 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9c70, arg2=0xc) at /home/david/Pike/7.6/src/apply_low.h:214 #34 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=55) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #35 0x9571a8b in ?? () #36 0x8070eea in eval_instruction (pc=0x8c90b06 "ÇD$\004\e") at /home/david/Pike/7.6/src/interpret.c:1229 #37 0x808abed in o_catch (pc=0x8c90b06 "ÇD$\004\e") at /home/david/Pike/7.6/src/interpret.c:2027 #38 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #39 0x8c90b00 in ?? () #40 0x8070eea in eval_instruction ( pc=0x8b27564 "¡0\025.\b\203@\034\017ÇD$\004\234") at /home/david/Pike/7.6/src/interpret.c:1229 #41 0x808abed in o_catch (pc=0x8b27564 "¡0\025.\b\203@\034\017ÇD$\004\234") at /home/david/Pike/7.6/src/interpret.c:2027 #42 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #43 0x8b2755e in ?? () #44 0x8070eea in eval_instruction ( ---Type <return> to continue, or q <return> to quit--- pc=0x8b27527 "\213\r0\025.\b¸Ù\212M÷÷Ø\211A\034Ç\004$\226") at /home/david/Pike/7.6/src/interpret.c:1229 #45 0x808aab0 in mega_apply (type=APPLY_STACK, args=2, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #46 0x808acfc in f_call_function (args=2) at /home/david/Pike/7.6/src/interpret.c:2053 #47 0x8164fe2 in new_thread_func (data=0xbfbfef3c) at /home/david/Pike/7.6/src/threads.c:868 #48 0x282e01b4 in _thread_start () from /usr/lib/libc_r.so.4 #49 0x0 in ?? ()
The problem seems to happen everytime now just after I upgraded my Pike to the CVS version. I had a 7.6.6 before and it was working fine.
/ David
Do you think you can try with a pike that got --with-rtldebug? (Or does it already have that?) There's a lot of pointers and stuff hidden in that macro so it's not easy to tell which one is awry.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-05-17 16:21: Subject: Nettle cmod segfault
Hi list,
I have a segfault when using the Nettle cmod under FreeBSD 4.7, it seems to be related to threads:
/home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138: Fatal error:
Program received signal SIGSEGV, Segmentation fault. 0x2860f340 in f_HashState_update (args=1) at /home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138 138 THREADS_DISALLOW(); (gdb) display data->len 2: data->len = 56 (gdb) display (char*)data->str 4: ( char *) data->str = 0xa06d014 "camas_fix_coding://Bertrand LUPART bertrand@linkeo.com" (gdb) bt #0 0x2860f340 in f_HashState_update (args=1) at /home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138 #1 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9e20, arg2=0x3) at /home/david/Pike/7.6/src/apply_low.h:214 #2 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=1) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #3 0x8563339 in ?? () #4 0x8070eea in eval_instruction ( pc=0x8563138 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #5 0x808abed in o_catch (pc=0x8563138 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:2027 #6 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #7 0x8563132 in ?? () #8 0x8070eea in eval_instruction ( pc=0x90c9328 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #9 0x808abed in o_catch (pc=0x90c9328 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:2027 #10 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #11 0x90c9322 in ?? () ---Type <return> to continue, or q <return> to quit--- #12 0x8070eea in eval_instruction (pc=0x9571fd8 "ÇD$\004\005") at /home/david/Pike/7.6/src/interpret.c:1229 #13 0x808abed in o_catch (pc=0x9571fd8 "ÇD$\004\005") at /home/david/Pike/7.6/src/interpret.c:2027 #14 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #15 0x9571fd2 in ?? () #16 0x8070eea in eval_instruction ( pc=0x956dbc6 "\213\r0\025.\b¸:$©ö÷Ø\211A\034ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #17 0x808aab0 in mega_apply (type=APPLY_STACK, args=8, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #18 0x808acfc in f_call_function (args=8) at /home/david/Pike/7.6/src/interpret.c:2053 #19 0x285f087d in container_callback (this=0xa02a600, thisobj=0x8da9e08, v=0x98cc258, startc=0x8b96180, cstartc=2006, endc=0x8b96180, cendc=3885, st=0x8892f30, cutstart=0x8892f3c, ccutstart=0x8892f40, cutend=0x8b96180, ccutend=3892) at /home/david/Pike/7.6/src/modules/Parser/html.c:2735 #20 0x285f2b50 in do_try_feed (this=0xa02a600, thisobj=0x8da9e08, st=0x8892f30, feed=0x8892f3c, finished=1, ignore_tag_cb=0) at /home/david/Pike/7.6/src/modules/Parser/html.c:3224 #21 0x285f48b2 in try_feed (finished=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3737 ---Type <return> to continue, or q <return> to quit--- #22 0x285f534e in html_finish (args=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3932 #23 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9e08, arg2=0xc) at /home/david/Pike/7.6/src/apply_low.h:214 #24 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=55) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #25 0x9571a8b in ?? () #26 0x8070eea in eval_instruction ( pc=0x956dbc6 "\213\r0\025.\b¸:$©ö÷Ø\211A\034ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #27 0x808aab0 in mega_apply (type=APPLY_STACK, args=8, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #28 0x808acfc in f_call_function (args=8) at /home/david/Pike/7.6/src/interpret.c:2053 #29 0x285f087d in container_callback (this=0xa010400, thisobj=0x8da9c70, v=0x98cc720, startc=0x8b96190, cstartc=123, endc=0x8b96190, cendc=16534, st=0x8892f50, cutstart=0x8892f5c, ccutstart=0x8892f60, cutend=0x8b96190, ccutend=16541) at /home/david/Pike/7.6/src/modules/Parser/html.c:2735 #30 0x285f2b50 in do_try_feed (this=0xa010400, thisobj=0x8da9c70, st=0x8892f50, feed=0x8892f5c, finished=1, ignore_tag_cb=0) at /home/david/Pike/7.6/src/modules/Parser/html.c:3224 #31 0x285f48b2 in try_feed (finished=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3737 ---Type <return> to continue, or q <return> to quit--- #32 0x285f534e in html_finish (args=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3932 #33 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9c70, arg2=0xc) at /home/david/Pike/7.6/src/apply_low.h:214 #34 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=55) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #35 0x9571a8b in ?? () #36 0x8070eea in eval_instruction (pc=0x8c90b06 "ÇD$\004\e") at /home/david/Pike/7.6/src/interpret.c:1229 #37 0x808abed in o_catch (pc=0x8c90b06 "ÇD$\004\e") at /home/david/Pike/7.6/src/interpret.c:2027 #38 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #39 0x8c90b00 in ?? () #40 0x8070eea in eval_instruction ( pc=0x8b27564 "¡0\025.\b\203@\034\017ÇD$\004\234") at /home/david/Pike/7.6/src/interpret.c:1229 #41 0x808abed in o_catch (pc=0x8b27564 "¡0\025.\b\203@\034\017ÇD$\004\234") at /home/david/Pike/7.6/src/interpret.c:2027 #42 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #43 0x8b2755e in ?? () #44 0x8070eea in eval_instruction ( ---Type <return> to continue, or q <return> to quit--- pc=0x8b27527 "\213\r0\025.\b¸Ù\212M÷÷Ø\211A\034Ç\004$\226") at /home/david/Pike/7.6/src/interpret.c:1229 #45 0x808aab0 in mega_apply (type=APPLY_STACK, args=2, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #46 0x808acfc in f_call_function (args=2) at /home/david/Pike/7.6/src/interpret.c:2053 #47 0x8164fe2 in new_thread_func (data=0xbfbfef3c) at /home/david/Pike/7.6/src/threads.c:868 #48 0x282e01b4 in _thread_start () from /usr/lib/libc_r.so.4 #49 0x0 in ?? ()
The problem seems to happen everytime now just after I upgraded my Pike to the CVS version. I had a 7.6.6 before and it was working fine.
/ David
/ Brevbäraren
Sure, I can try. I also have the same problem in the same macro from files.cmod (I don't remember exactly where) so it's not related to Nettle. I'll send the debug tomorrow from a Pike with rtldebug.
As we are speaking of that, wouldn't it be possible to make this macros with a little less code in it (and generally in macros used in Pike)?
/ David Gourdelier
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Do you think you can try with a pike that got --with-rtldebug? (Or does it already have that?) There's a lot of pointers and stuff hidden in that macro so it's not easy to tell which one is awry.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-05-17 16:21: Subject: Nettle cmod segfault
Hi list,
I have a segfault when using the Nettle cmod under FreeBSD 4.7, it seems to be related to threads:
/home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138: Fatal error:
Program received signal SIGSEGV, Segmentation fault. 0x2860f340 in f_HashState_update (args=1) at /home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138 138 THREADS_DISALLOW(); (gdb) display data->len 2: data->len = 56 (gdb) display (char*)data->str 4: ( char *) data->str = 0xa06d014 "camas_fix_coding://Bertrand LUPART bertrand@linkeo.com" (gdb) bt #0 0x2860f340 in f_HashState_update (args=1) at /home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138 #1 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9e20, arg2=0x3) at /home/david/Pike/7.6/src/apply_low.h:214 #2 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=1) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #3 0x8563339 in ?? () #4 0x8070eea in eval_instruction ( pc=0x8563138 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #5 0x808abed in o_catch (pc=0x8563138 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:2027 #6 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #7 0x8563132 in ?? () #8 0x8070eea in eval_instruction ( pc=0x90c9328 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #9 0x808abed in o_catch (pc=0x90c9328 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:2027 #10 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #11 0x90c9322 in ?? () ---Type <return> to continue, or q <return> to quit--- #12 0x8070eea in eval_instruction (pc=0x9571fd8 "ÇD$\004\005") at /home/david/Pike/7.6/src/interpret.c:1229 #13 0x808abed in o_catch (pc=0x9571fd8 "ÇD$\004\005") at /home/david/Pike/7.6/src/interpret.c:2027 #14 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #15 0x9571fd2 in ?? () #16 0x8070eea in eval_instruction ( pc=0x956dbc6 "\213\r0\025.\b¸:$©ö÷Ø\211A\034ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #17 0x808aab0 in mega_apply (type=APPLY_STACK, args=8, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #18 0x808acfc in f_call_function (args=8) at /home/david/Pike/7.6/src/interpret.c:2053 #19 0x285f087d in container_callback (this=0xa02a600, thisobj=0x8da9e08, v=0x98cc258, startc=0x8b96180, cstartc=2006, endc=0x8b96180, cendc=3885, st=0x8892f30, cutstart=0x8892f3c, ccutstart=0x8892f40, cutend=0x8b96180, ccutend=3892) at /home/david/Pike/7.6/src/modules/Parser/html.c:2735 #20 0x285f2b50 in do_try_feed (this=0xa02a600, thisobj=0x8da9e08, st=0x8892f30, feed=0x8892f3c, finished=1, ignore_tag_cb=0) at /home/david/Pike/7.6/src/modules/Parser/html.c:3224 #21 0x285f48b2 in try_feed (finished=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3737 ---Type <return> to continue, or q <return> to quit--- #22 0x285f534e in html_finish (args=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3932 #23 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9e08, arg2=0xc) at /home/david/Pike/7.6/src/apply_low.h:214 #24 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=55) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #25 0x9571a8b in ?? () #26 0x8070eea in eval_instruction ( pc=0x956dbc6 "\213\r0\025.\b¸:$©ö÷Ø\211A\034ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #27 0x808aab0 in mega_apply (type=APPLY_STACK, args=8, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #28 0x808acfc in f_call_function (args=8) at /home/david/Pike/7.6/src/interpret.c:2053 #29 0x285f087d in container_callback (this=0xa010400, thisobj=0x8da9c70, v=0x98cc720, startc=0x8b96190, cstartc=123, endc=0x8b96190, cendc=16534, st=0x8892f50, cutstart=0x8892f5c, ccutstart=0x8892f60, cutend=0x8b96190, ccutend=16541) at /home/david/Pike/7.6/src/modules/Parser/html.c:2735 #30 0x285f2b50 in do_try_feed (this=0xa010400, thisobj=0x8da9c70, st=0x8892f50, feed=0x8892f5c, finished=1, ignore_tag_cb=0) at /home/david/Pike/7.6/src/modules/Parser/html.c:3224 #31 0x285f48b2 in try_feed (finished=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3737 ---Type <return> to continue, or q <return> to quit--- #32 0x285f534e in html_finish (args=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3932 #33 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9c70, arg2=0xc) at /home/david/Pike/7.6/src/apply_low.h:214 #34 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=55) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #35 0x9571a8b in ?? () #36 0x8070eea in eval_instruction (pc=0x8c90b06 "ÇD$\004\e") at /home/david/Pike/7.6/src/interpret.c:1229 #37 0x808abed in o_catch (pc=0x8c90b06 "ÇD$\004\e") at /home/david/Pike/7.6/src/interpret.c:2027 #38 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #39 0x8c90b00 in ?? () #40 0x8070eea in eval_instruction ( pc=0x8b27564 "¡0\025.\b\203@\034\017ÇD$\004\234") at /home/david/Pike/7.6/src/interpret.c:1229 #41 0x808abed in o_catch (pc=0x8b27564 "¡0\025.\b\203@\034\017ÇD$\004\234") at /home/david/Pike/7.6/src/interpret.c:2027 #42 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #43 0x8b2755e in ?? () #44 0x8070eea in eval_instruction ( ---Type <return> to continue, or q <return> to quit--- pc=0x8b27527 "\213\r0\025.\b¸Ù\212M÷÷Ø\211A\034Ç\004$\226") at /home/david/Pike/7.6/src/interpret.c:1229 #45 0x808aab0 in mega_apply (type=APPLY_STACK, args=2, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #46 0x808acfc in f_call_function (args=2) at /home/david/Pike/7.6/src/interpret.c:2053 #47 0x8164fe2 in new_thread_func (data=0xbfbfef3c) at /home/david/Pike/7.6/src/threads.c:868 #48 0x282e01b4 in _thread_start () from /usr/lib/libc_r.so.4 #49 0x0 in ?? ()
The problem seems to happen everytime now just after I upgraded my Pike to the CVS version. I had a 7.6.6 before and it was working fine.
/ David
/ Brevbäraren
As we are speaking of that, wouldn't it be possible to make this macros with a little less code in it (and generally in macros used in Pike)?
Possible - yes. A good idea - probably not. I've looked at many of the macros and usually think they make sense, at least when rtldebug and dmalloc isn't enabled. For the most part, they get overly bloated only when debug is enabled; it's not uncommon that the debug parts are a bit sloppy and don't bother to isolate some overly long debug checks into functions.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-05-18 01:16: Subject: Re: Nettle cmod segfault
Sure, I can try. I also have the same problem in the same macro from files.cmod (I don't remember exactly where) so it's not related to Nettle. I'll send the debug tomorrow from a Pike with rtldebug.
As we are speaking of that, wouldn't it be possible to make this macros with a little less code in it (and generally in macros used in Pike)?
/ David Gourdelier
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Do you think you can try with a pike that got --with-rtldebug? (Or does it already have that?) There's a lot of pointers and stuff hidden in that macro so it's not easy to tell which one is awry.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-05-17 16:21: Subject: Nettle cmod segfault
Hi list,
I have a segfault when using the Nettle cmod under FreeBSD 4.7, it seems to be related to threads:
/home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138: Fatal error:
Program received signal SIGSEGV, Segmentation fault. 0x2860f340 in f_HashState_update (args=1) at /home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138 138 THREADS_DISALLOW(); (gdb) display data->len 2: data->len = 56 (gdb) display (char*)data->str 4: ( char *) data->str = 0xa06d014 "camas_fix_coding://Bertrand LUPART bertrand@linkeo.com" (gdb) bt #0 0x2860f340 in f_HashState_update (args=1) at /home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138 #1 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9e20, arg2=0x3) at /home/david/Pike/7.6/src/apply_low.h:214 #2 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=1) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #3 0x8563339 in ?? () #4 0x8070eea in eval_instruction ( pc=0x8563138 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #5 0x808abed in o_catch (pc=0x8563138 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:2027 #6 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #7 0x8563132 in ?? () #8 0x8070eea in eval_instruction ( pc=0x90c9328 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #9 0x808abed in o_catch (pc=0x90c9328 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:2027 #10 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #11 0x90c9322 in ?? () ---Type <return> to continue, or q <return> to quit--- #12 0x8070eea in eval_instruction (pc=0x9571fd8 "ÇD$\004\005") at /home/david/Pike/7.6/src/interpret.c:1229 #13 0x808abed in o_catch (pc=0x9571fd8 "ÇD$\004\005") at /home/david/Pike/7.6/src/interpret.c:2027 #14 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #15 0x9571fd2 in ?? () #16 0x8070eea in eval_instruction ( pc=0x956dbc6 "\213\r0\025.\b¸:$©ö÷Ø\211A\034ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #17 0x808aab0 in mega_apply (type=APPLY_STACK, args=8, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #18 0x808acfc in f_call_function (args=8) at /home/david/Pike/7.6/src/interpret.c:2053 #19 0x285f087d in container_callback (this=0xa02a600, thisobj=0x8da9e08, v=0x98cc258, startc=0x8b96180, cstartc=2006, endc=0x8b96180, cendc=3885, st=0x8892f30, cutstart=0x8892f3c, ccutstart=0x8892f40, cutend=0x8b96180, ccutend=3892) at /home/david/Pike/7.6/src/modules/Parser/html.c:2735 #20 0x285f2b50 in do_try_feed (this=0xa02a600, thisobj=0x8da9e08, st=0x8892f30, feed=0x8892f3c, finished=1, ignore_tag_cb=0) at /home/david/Pike/7.6/src/modules/Parser/html.c:3224 #21 0x285f48b2 in try_feed (finished=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3737 ---Type <return> to continue, or q <return> to quit--- #22 0x285f534e in html_finish (args=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3932 #23 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9e08, arg2=0xc) at /home/david/Pike/7.6/src/apply_low.h:214 #24 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=55) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #25 0x9571a8b in ?? () #26 0x8070eea in eval_instruction ( pc=0x956dbc6 "\213\r0\025.\b¸:$©ö÷Ø\211A\034ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #27 0x808aab0 in mega_apply (type=APPLY_STACK, args=8, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #28 0x808acfc in f_call_function (args=8) at /home/david/Pike/7.6/src/interpret.c:2053 #29 0x285f087d in container_callback (this=0xa010400, thisobj=0x8da9c70, v=0x98cc720, startc=0x8b96190, cstartc=123, endc=0x8b96190, cendc=16534, st=0x8892f50, cutstart=0x8892f5c, ccutstart=0x8892f60, cutend=0x8b96190, ccutend=16541) at /home/david/Pike/7.6/src/modules/Parser/html.c:2735 #30 0x285f2b50 in do_try_feed (this=0xa010400, thisobj=0x8da9c70, st=0x8892f50, feed=0x8892f5c, finished=1, ignore_tag_cb=0) at /home/david/Pike/7.6/src/modules/Parser/html.c:3224 #31 0x285f48b2 in try_feed (finished=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3737 ---Type <return> to continue, or q <return> to quit--- #32 0x285f534e in html_finish (args=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3932 #33 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9c70, arg2=0xc) at /home/david/Pike/7.6/src/apply_low.h:214 #34 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=55) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #35 0x9571a8b in ?? () #36 0x8070eea in eval_instruction (pc=0x8c90b06 "ÇD$\004\e") at /home/david/Pike/7.6/src/interpret.c:1229 #37 0x808abed in o_catch (pc=0x8c90b06 "ÇD$\004\e") at /home/david/Pike/7.6/src/interpret.c:2027 #38 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #39 0x8c90b00 in ?? () #40 0x8070eea in eval_instruction ( pc=0x8b27564 "¡0\025.\b\203@\034\017ÇD$\004\234") at /home/david/Pike/7.6/src/interpret.c:1229 #41 0x808abed in o_catch (pc=0x8b27564 "¡0\025.\b\203@\034\017ÇD$\004\234") at /home/david/Pike/7.6/src/interpret.c:2027 #42 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #43 0x8b2755e in ?? () #44 0x8070eea in eval_instruction ( ---Type <return> to continue, or q <return> to quit--- pc=0x8b27527 "\213\r0\025.\b¸Ù\212M÷÷Ø\211A\034Ç\004$\226") at /home/david/Pike/7.6/src/interpret.c:1229 #45 0x808aab0 in mega_apply (type=APPLY_STACK, args=2, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #46 0x808acfc in f_call_function (args=2) at /home/david/Pike/7.6/src/interpret.c:2053 #47 0x8164fe2 in new_thread_func (data=0xbfbfef3c) at /home/david/Pike/7.6/src/threads.c:868 #48 0x282e01b4 in _thread_start () from /usr/lib/libc_r.so.4 #49 0x0 in ?? ()
The problem seems to happen everytime now just after I upgraded my Pike to the CVS version. I had a 7.6.6 before and it was working fine.
/ David
/ Brevbäraren
/ Brevbäraren
I've mentioned this before, but I really think something should be done about the error macros. It takes something like 50 bytes _more_ to use a SIMPLE_ERROR macro compared to writing the Pike_error yourself. And you really shouldn't have to write the name of the function youself. There are probably lots of places where the wrong function name is used. Even though I try to audit the code for this occasionally, new places keep popping up.
/ Martin Nilsson (räfsfiskal)
Previous text:
2004-05-18 01:28: Subject: Re: Nettle cmod segfault
As we are speaking of that, wouldn't it be possible to make this macros with a little less code in it (and generally in macros used in Pike)?
Possible - yes. A good idea - probably not. I've looked at many of the macros and usually think they make sense, at least when rtldebug and dmalloc isn't enabled. For the most part, they get overly bloated only when debug is enabled; it's not uncommon that the debug parts are a bit sloppy and don't bother to isolate some overly long debug checks into functions.
/ Martin Stjernholm, Roxen IS
The idea with SIMPLE_ERROR was to prepare for real Error objects with a bit of more information then the error string given with Pike_error.
/ Mirar
Previous text:
2004-05-18 15:05: Subject: Re: Nettle cmod segfault
I've mentioned this before, but I really think something should be done about the error macros. It takes something like 50 bytes _more_ to use a SIMPLE_ERROR macro compared to writing the Pike_error yourself. And you really shouldn't have to write the name of the function youself. There are probably lots of places where the wrong function name is used. Even though I try to audit the code for this occasionally, new places keep popping up.
/ Martin Nilsson (räfsfiskal)
Yes, and that is good. That still doesn't mean that it has to be so space-inefficient. I mean
#define SIMPLE_ARG_ERROR(FUNC, ARG, PROBLEM) \ bad_arg_error (FUNC, Pike_sp-args, args, ARG, NULL, Pike_sp+ARG-1-args, \ msg_bad_arg_2, ARG, FUNC, PROBLEM)
should really be somthing like
#define SIMPLE_ARG_ERROR(FUNC, ARG, PROBLEM) \ simple_arg_error (FUNC, args, ARG, PROBLEM)
or
#define SIMPLE_ARG_ERROR(ARG, PROBLEM) \ simple_arg_error (args, ARG, PROBLEM)
/ Martin Nilsson (räfsfiskal)
Previous text:
2004-05-18 15:32: Subject: Re: Nettle cmod segfault
The idea with SIMPLE_ERROR was to prepare for real Error objects with a bit of more information then the error string given with Pike_error.
/ Mirar
That I can agree on. :)
/ Mirar
Previous text:
2004-05-18 15:45: Subject: Re: Nettle cmod segfault
Yes, and that is good. That still doesn't mean that it has to be so space-inefficient. I mean
#define SIMPLE_ARG_ERROR(FUNC, ARG, PROBLEM) \ bad_arg_error (FUNC, Pike_sp-args, args, ARG, NULL, Pike_sp+ARG-1-args, \ msg_bad_arg_2, ARG, FUNC, PROBLEM)
should really be somthing like
#define SIMPLE_ARG_ERROR(FUNC, ARG, PROBLEM) \ simple_arg_error (FUNC, args, ARG, PROBLEM)
or
#define SIMPLE_ARG_ERROR(ARG, PROBLEM) \ simple_arg_error (args, ARG, PROBLEM)
/ Martin Nilsson (räfsfiskal)
If you don't find out, as far as I'm concerned, rewriting all the error stuff with the exception goal in mind isn't a bad idea.
But we can wait with the exception syntax discussion a bit this time :)
/ Mirar
Previous text:
2004-05-18 18:47: Subject: Re: Nettle cmod segfault
The error code looks a bit tricky to me, so I don't know how to achieve this. What's with the DECLSPEC and ATTRIBUTE stuff?
/ Martin Nilsson (räfsfiskal)
That doesn't sound like something I am qualified to do.
/ Martin Nilsson (räfsfiskal)
Previous text:
2004-05-18 18:48: Subject: Re: Nettle cmod segfault
If you don't find out, as far as I'm concerned, rewriting all the error stuff with the exception goal in mind isn't a bad idea.
But we can wait with the exception syntax discussion a bit this time :)
/ Mirar
Ok. DECLSPEC is used to give extra information to MSVC (__declspec) and ATTRIBUTE is used to give extra information to GCC (__attribute__). ATTRUBUTE is turned off since 1996.
/ Martin Nilsson (räfsfiskal)
Previous text:
2004-05-18 18:48: Subject: Re: Nettle cmod segfault
If you don't find out, as far as I'm concerned, rewriting all the error stuff with the exception goal in mind isn't a bad idea.
But we can wait with the exception syntax discussion a bit this time :)
/ Mirar
Ok. DECLSPEC is used to give extra information to MSVC (__declspec) and ATTRIBUTE is used to give extra information to GCC (__attribute__). ATTRUBUTE is turned off since 1996.
^ ^ Are these intentional typos? As far as I can see, ATTRIBUTE() is only disabled in main.c and program.c, and it was in both cases disabled by Hubbe in January 1998.
/ Henrik Grubbström (Lysator)
Previous text:
2004-05-18 19:01: Subject: Re: Nettle cmod segfault
Ok. DECLSPEC is used to give extra information to MSVC (__declspec) and ATTRIBUTE is used to give extra information to GCC (__attribute__). ATTRUBUTE is turned off since 1996.
/ Martin Nilsson (räfsfiskal)
No it is correct.
"Note that __attribute__ applies to function declarations, not definitions"
/ Martin Nilsson (räfsfiskal)
Previous text:
2004-05-18 19:21: Subject: Re: Nettle cmod segfault
Ok. DECLSPEC is used to give extra information to MSVC (__declspec) and ATTRIBUTE is used to give extra information to GCC (__attribute__). ATTRUBUTE is turned off since 1996.
^ ^
Are these intentional typos? As far as I can see, ATTRIBUTE() is only disabled in main.c and program.c, and it was in both cases disabled by Hubbe in January 1998.
/ Henrik Grubbström (Lysator)
The first was a typo. The second was not, and applies to error.c.
/ Martin Nilsson (räfsfiskal)
Previous text:
2004-05-18 19:21: Subject: Re: Nettle cmod segfault
Ok. DECLSPEC is used to give extra information to MSVC (__declspec) and ATTRIBUTE is used to give extra information to GCC (__attribute__). ATTRUBUTE is turned off since 1996.
^ ^
Are these intentional typos? As far as I can see, ATTRIBUTE() is only disabled in main.c and program.c, and it was in both cases disabled by Hubbe in January 1998.
/ Henrik Grubbström (Lysator)
It's commonly to make the compiler aware that the function doesn't return, and/or that it takes an sprintf style format string so that the compiler can check the types in the varargs part.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-05-18 18:47: Subject: Re: Nettle cmod segfault
The error code looks a bit tricky to me, so I don't know how to achieve this. What's with the DECLSPEC and ATTRIBUTE stuff?
/ Martin Nilsson (räfsfiskal)
pike-devel@lists.lysator.liu.se