Hi,
While trying the Shuffler module, I had the following segfault:
#0 0x0809ba20 in really_free_compat_cb_box () #1 0x406887d0 in f_Shuffle_create () from /usr/local/pike/7.6.13/lib/modules/Shuffler.so #2 0x08074ee1 in low_mega_apply () #3 0x0807608e in mega_apply () #4 0x00000004 in ?? () #5 0x088c1124 in ?? () #6 0x0000000b in ?? () #7 0x00000000 in ?? () #8 0xfffce50c in ?? () #9 0xbf7ff624 in ?? () #10 0x080dfbd7 in call_pike_initializers () Previous frame inner to this frame (corrupt stack?)
The really_free_compat_cb_box function is located in backend.cmod so I guess it's backend related. The problem is 100% reproductible and I can add any debug/line of code to help for fixing it. I'm using pike 7.6.13 from CVS (built the 15/08)
/ David
It'd be useful to enable rtldebug if you don't have it already. There'd probably also be some useful debug printout if you uncomment the #define POLL_DEBUG line in backend.cmod. Lastly, stack frames got to be missing from that backtrace, so please don't use -fomit-frame-pointer or whatever optimizations you have that cause that.
This bug aside, the Shuffler module really ought to move away from the old compat callback interface and use fd_callback_box directly. Didn't Stephen fix that recently?
/ Martin Stjernholm, Roxen IS
Previous text:
2004-08-23 01:16: Subject: Segfault in backend
Hi,
While trying the Shuffler module, I had the following segfault:
#0 0x0809ba20 in really_free_compat_cb_box () #1 0x406887d0 in f_Shuffle_create () from /usr/local/pike/7.6.13/lib/modules/Shuffler.so #2 0x08074ee1 in low_mega_apply () #3 0x0807608e in mega_apply () #4 0x00000004 in ?? () #5 0x088c1124 in ?? () #6 0x0000000b in ?? () #7 0x00000000 in ?? () #8 0xfffce50c in ?? () #9 0xbf7ff624 in ?? () #10 0x080dfbd7 in call_pike_initializers () Previous frame inner to this frame (corrupt stack?)
The really_free_compat_cb_box function is located in backend.cmod so I guess it's backend related. The problem is 100% reproductible and I can add any debug/line of code to help for fixing it. I'm using pike 7.6.13 from CVS (built the 15/08)
/ David
/ Brevbäraren
Stephen fixed something at least. But wasn't that only in 7.7?
/ Marcus Agehall (PacketFront)
Previous text:
2004-08-23 03:27: Subject: Segfault in backend
It'd be useful to enable rtldebug if you don't have it already. There'd probably also be some useful debug printout if you uncomment the #define POLL_DEBUG line in backend.cmod. Lastly, stack frames got to be missing from that backtrace, so please don't use -fomit-frame-pointer or whatever optimizations you have that cause that.
This bug aside, the Shuffler module really ought to move away from the old compat callback interface and use fd_callback_box directly. Didn't Stephen fix that recently?
/ Martin Stjernholm, Roxen IS
It'd be useful to enable rtldebug if you don't have it already. There'd probably also be some useful debug printout if you uncomment the #define POLL_DEBUG line in backend.cmod. Lastly, stack frames got to be missing from that backtrace, so please don't use -fomit-frame-pointer or whatever optimizations you have that cause that.
Ok, I'll do that this week.
This bug aside, the Shuffler module really ought to move away from the old compat callback interface and use fd_callback_box directly. Didn't Stephen fix that recently?
I don't know but I looked in the 7.7 code of Shuffle because the autodoc of the code was much better here so maybe one should backport the doc.
I'm also thinking, is it possible to put both the doc for stable and development branch on the website?
/ David
mast wrote:
This bug aside, the Shuffler module really ought to move away from the old compat callback interface and use fd_callback_box directly. Didn't Stephen fix that recently?
Marcus Agehall (PacketFront) @ Pike (-) developers forum wrote:
Stephen fixed something at least. But wasn't that only in 7.7?
Three things: - Yes, I fixed things, but only in 7.7, I did not backport to 7.6. That might be easy, I never did look into it. - Since it is very likely that the Shuffler in 7.6 is nearly identical to the Shuffler in 7.7 before my fix, I'd suggest to acutely stop trying to debug this bug, since in its 7.6 form, the Shuffler has several fundamental flaws, aside from the old compat callback interface. - I did not do a complete code audit, I only fixed the C-modules of the Shuffler which were touched by my application. So beware of bugs in file I didn't modify.
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
It'd be useful to enable rtldebug if you don't have it already. There'd probably also be some useful debug printout if you uncomment the #define POLL_DEBUG line in backend.cmod. Lastly, stack frames got to be missing from that backtrace, so please don't use -fomit-frame-pointer or whatever optimizations you have that cause that.
This bug aside, the Shuffler module really ought to move away from the old compat callback interface and use fd_callback_box directly. Didn't Stephen fix that recently?
OK, here are the infos, I hope it'll be usefull:
Program received signal SIGABRT, Aborted. [Switching to Thread 16386 (LWP 23112)] 0x4011c741 in kill () from /lib/libc.so.6 (gdb) bt #0 0x4011c741 in kill () from /lib/libc.so.6 #1 0x4007d771 in pthread_kill () from /lib/libpthread.so.0 #2 0x4007da7b in raise () from /lib/libpthread.so.0 #3 0x4011c4d4 in raise () from /lib/libc.so.6 #4 0x4011da08 in abort () from /lib/libc.so.6 #5 0x080eea99 in debug_fatal (fmt=0x854f140 "§") at /home/david/current-projects/pike/Pike/7.6/src/error.c:438 #6 0x080d1b04 in set_read_callback (fd=23, cb=0, data=0x0) at backend.cmod:3396 #7 0x40709f44 in f_Shuffle_create (args=4) at Shuffler.cmod:566 #8 0x0809c87a in low_mega_apply (type=APPLY_LOW, args=4, arg1=0x83c93d0, arg2=0xb) at apply_low.h:214 #9 0x0809eb5e in mega_apply (type=APPLY_STACK, args=0, arg1=0x0, arg2=0x0) at /home/david/current-projects/pike/Pike/7.6/src/interpret.c:1996 #10 0x0813d41f in call_pike_initializers (o=0x878ae88, args=0) at /home/david/current-projects/pike/Pike/7.6/src/object.c:332 #11 0x0813d6aa in debug_clone_object (p=0x40082e74, args=0) at /home/david/current-projects/pike/Pike/7.6/src/object.c:358 #12 0x4070b1e4 in f_Shuffler_shuffle (args=0) at Shuffler.cmod:837 #13 0x0809c87a in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x83c942c, arg2=0x8) at apply_low.h:214 #14 0x080922e6 in eval_instruction_without_debug (pc=0x86f44a2 "L3}\002\002]") at interpret_functions.h:1941 #15 0x0809ed8b in o_catch (pc=0x8632f4e "!\236¾,E\001e\035") at /home/david/current-projects/pike/Pike/7.6/src/interpret.c:2046 #16 0x0808df99 in eval_instruction_without_debug (pc=0x8632f4a "{") at interpret_functions.h:1236 #17 0x0809eb98 in mega_apply (type=APPLY_STACK, args=0, arg1=0x0, arg2=0x0) at /home/david/current-projects/pike/Pike/7.6/src/interpret.c:2005 #18 0x0809ee55 in f_call_function (args=0) at /home/david/current-projects/pike/Pike/7.6/src/interpret.c:2069 #19 0x081846a4 in new_thread_func (data=0xbfffefe0) at /home/david/current-projects/pike/Pike/7.6/src/threads.c:868 #20 0x4007ae51 in pthread_start_thread () from /lib/libpthread.so.0 #21 0x4007aecf in pthread_start_thread_event () from /lib/libpthread.so.0 #22 0x401ca6ca in clone () from /lib/libc.so.6
And the console:
BACKEND: copy_poll_set() from->num_in_poll=5 [23109]BACKEND[0]: Doing poll on fds: [23109]BACKEND[0]: fd 8: read : 0x0041 [23109]BACKEND[0]: fd 14: read : 0x0041 [23109]BACKEND[0]: fd 16: read : 0x0041 [23109]BACKEND[0]: fd 19: read : 0x0041 [23109]BACKEND[0]: fd 20: read : 0x0041 [23109]BACKEND[0]: poll(0x8649890, 5, 6164)... => 1 [23112]BACKEND[unhooked box]: unhook_fd_callback_box: fd -1, object 0x878aed0 fd:8 events:0x0041 [23109]BACKEND[0]: POLLRDNORM|POLLIN on 8 [23109]BACKEND[0]: read_callback(8, (nil)) fd:14 events:0x0000 fd:16 events:0x0000 fd:19 events:0x0000 fd:20 events:0x0000 [23112]BACKEND[unhooked box]: change_fd_for_box: fd from 24 to -1 [23109]BACKEND[unhooked box]: unhook_fd_callback_box: fd -1, object 0x878ae70 [23109]BACKEND[unhooked box]: change_fd_for_box: fd from 24 to 24 [23109]BACKEND[unhooked box]: unhook_fd_callback_box: fd -1, object 0x878ae10 [23109]BACKEND[unhooked box]: unhook_fd_callback_box: fd -1, object 0x878adf8 [23112]BACKEND[unhooked box]: unhook_fd_callback_box: fd -1, object 0x878aea0 [23112]BACKEND[0]: set_read_callback (23, (nil), (nil)) /home/david/current-projects/pike/Pike/7.6/src/backend.cmod:3396: Fatal error: Mixing old and new style backend interfaces for fd 23. Backtrace at time of fatal: object(src/dynamic_load.c:565).Shuffle:
object(src/post_modules/Shuffler/Shuffler.cmod:877)->create(object(/usr/loca
l/pike/7.6.13/lib/modules/Stdio.pmod/module.pmod:109),object(src/post_module s/Shuffler/Shuffler.cmod:641),0,0)
object(src/dynamic_load.c:565).Shuffler: object(src/post_modules/Shuffler/Shuffler.cmod:641)->shuffle()
protocols/http.pike:77:
object(/usr/local/caudium_1_3/caudium/server/protocols/http.pike)->setup_pip
e(@0=object(/usr/local/pike/7.6.13/lib/modules/Stdio.pmod/module.pmod:109)) protocols/http.pike:1545:
object(/usr/local/caudium_1_3/caudium/server/protocols/http.pike)->send_resu lt(0)
protocols/http.pike:1639:
object(/usr/local/caudium_1_3/caudium/server/protocols/http.pike)->handle_re quest()
base_server/caudium.pike:554:
object(/usr/local/caudium_1_3/caudium/server/base_server/caudium.pike)->hand ler_thread(0)
=> 0 BACKEND: copy_poll_set() from->num_in_poll=1 [23107]BACKEND[0]: Doing poll on fds: [23107]BACKEND[0]: fd 3: read : 0x0041 [23107]BACKEND[0]: poll(0x83f2ef8, 1, 1999)... => 0 BACKEND: copy_poll_set() from->num_in_poll=1 [23107]BACKEND[0]: Doing poll on fds: [23107]BACKEND[0]: fd 3: read : 0x0041
Le 23 août 04, à 01:15, David Gourdelier a écrit :
Hi,
While trying the Shuffler module, I had the following segfault:
#0 0x0809ba20 in really_free_compat_cb_box () #1 0x406887d0 in f_Shuffle_create () from /usr/local/pike/7.6.13/lib/modules/Shuffler.so #2 0x08074ee1 in low_mega_apply () #3 0x0807608e in mega_apply () #4 0x00000004 in ?? () #5 0x088c1124 in ?? () #6 0x0000000b in ?? () #7 0x00000000 in ?? () #8 0xfffce50c in ?? () #9 0xbf7ff624 in ?? () #10 0x080dfbd7 in call_pike_initializers () Previous frame inner to this frame (corrupt stack?)
The really_free_compat_cb_box function is located in backend.cmod so I guess it's backend related. The problem is 100% reproductible and I can add any debug/line of code to help for fixing it. I'm using pike 7.6.13 from CVS (built the 15/08)
Note that event Pike 7.6.13 from CVS (the one on the snapshots directory in ftp://ftp.caudium.net/pike/7.6/pike-7.6.13.tar.gz) doesn't even build on OpenBSD Sparc64 v3.5... The pike binary segfault when trying to compile the Shuffler module....
So bad...
/Xavier
-- Xavier Beaudouin - Unix System Administrator & Projects Leader. President of Kazar Organization : http://www.kazar.net/ Please visit http://caudium.net/, home of Caudium & Camas projects
pike-devel@lists.lysator.liu.se