Re: [Chicken-users] pressed Ctrl-\ and got segmentation fault
* Christian Kellermann ck...@pestilenz.org [130621 11:38]: Hi Daniel and Moritz, * Daniel Ajoy da.a...@gmail.com [130618 07:03]: I press Ctrl-\ and I get #;1 ^\Segmentation fault (core dumped) why? This looks like a bug, I have opened ticket 1018 for it. You can see progress of that issue in the bugtracker at https://bugs.call-cc.org/ticket/1018. As pointed out by Moritz and Jim in this thread this seems to be Someone Else's fault, so I have closed the ticket. Please feel free to reopen it if you think this is unjustified. Thanks, Christian -- In the world, there is nothing more submissive and weak than water. Yet for attacking that which is hard and strong, nothing can surpass it. --- Lao Tzu ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] pressed Ctrl-\ and got segmentation fault
On 21.06.2013 22:34, John Cowan wrote: I can confirm that on 32-bit Linux. On Cygwin, however, typing ^\ does trigger a SIGSEGV with dumped core (except that it doesn't actually dump core because the Windows kernel can't do that). Both systems are running version 4.8.2 (rev ea02c9a), and there is no .csirc file. Readline is not involved: the config line says manyargs dload ptables only. Right. $ cat ^\ Segmentation fault (core dumped) But: $ cat test.c #include stdio.h #include signal.h #include unistd.h void sighandler(int sig) { printf(Caught signal: %d\n, sig); } main() { struct sigaction s; memset(s, 0, sizeof(s)); s.sa_handler = sighandler; sigaction(SIGSEGV, s, 0); sigaction(SIGQUIT, s, 0); while (1) sleep(1); return 0; } $ ./test [2] 3720 $ kill -QUIT %2 Caught signal: 3 $ kill -SEGV %2 Caught signal: 11 $ ./test ^\ Caught signal: 3 If you comment out sigaction(SIGQUIT, s, 0); it prints Segmentation fault (core dumped) although it is actually killed by SIGQUIT, not SIGSEGV. This leads me to believe that something inside Cygwin just prints the wrong string for some reason, like for instance Windows or Cygwin returning a bogus value for WTERMSIG in the wait-syscall the shell makes, and that this is not a Chicken bug. However, this puzzles me: $ find /dev/null ^\ Quit (core dumped) $ cat /dev/null ^\ Segmentation fault (core dumped) $ cat /dev/zero /dev/null ^\ Quit (core dumped) So it might be that processes which are killed while doing I/O print Quit and Segmentation fault otherwise. Best regards, Moritz ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] pressed Ctrl-\ and got segmentation fault
Ah, so the segfault also occurs with plain old `cat` then? I think we can close this bug ;) Thanks for tracking this down further. On Jun 23, 2013, at 7:14, Moritz Wilhelmy mor...@wzff.de wrote: On 21.06.2013 22:34, John Cowan wrote: I can confirm that on 32-bit Linux. On Cygwin, however, typing ^\ does trigger a SIGSEGV with dumped core (except that it doesn't actually dump core because the Windows kernel can't do that). Both systems are running version 4.8.2 (rev ea02c9a), and there is no .csirc file. Readline is not involved: the config line says manyargs dload ptables only. Right. $ cat ^\ Segmentation fault (core dumped) But: $ cat test.c #include stdio.h #include signal.h #include unistd.h void sighandler(int sig) { printf(Caught signal: %d\n, sig); } main() { struct sigaction s; memset(s, 0, sizeof(s)); s.sa_handler = sighandler; sigaction(SIGSEGV, s, 0); sigaction(SIGQUIT, s, 0); while (1) sleep(1); return 0; } $ ./test [2] 3720 $ kill -QUIT %2 Caught signal: 3 $ kill -SEGV %2 Caught signal: 11 $ ./test ^\ Caught signal: 3 If you comment out sigaction(SIGQUIT, s, 0); it prints Segmentation fault (core dumped) although it is actually killed by SIGQUIT, not SIGSEGV. This leads me to believe that something inside Cygwin just prints the wrong string for some reason, like for instance Windows or Cygwin returning a bogus value for WTERMSIG in the wait-syscall the shell makes, and that this is not a Chicken bug. However, this puzzles me: $ find /dev/null ^\ Quit (core dumped) $ cat /dev/null ^\ Segmentation fault (core dumped) $ cat /dev/zero /dev/null ^\ Quit (core dumped) So it might be that processes which are killed while doing I/O print Quit and Segmentation fault otherwise. Best regards, Moritz ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] pressed Ctrl-\ and got segmentation fault
Hello, On Tue, Jun 18, 2013 at 09:36:43 +0200, Peter Bex wrote: On Tue, Jun 18, 2013 at 12:02:56AM -0500, Daniel Ajoy wrote: This is my .csirc (use readline irregex) (current-input-port (make-gnu-readline-port)) (gnu-readline-parse-and-bind set editing-mode vi) (gnu-history-install-file-manager (string-append (or (get-environment-variable HOME) .) /.chicken_history) ) csi CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.0.3 (stability/4.8.0) (rev 091c3d9) windows-cygwin-x86 [ manyargs dload ptables ] compiled 2013-03-12 on aeryn.xorinia.dim (Darwin) I press Ctrl-\ and I get #;1 ^\Segmentation fault (core dumped) why? Probably because readline is flaky. Try with parley, which is more native and supports threading better anyway.. I can confirm that it happens without any readline-ish extensions (and in fact no ~/.csirc at all). This chicken 4.7.0 is on FreeBSD/amd64 9.1-RELEASE. It should be noted that ^\ sends SIGQUIT, similar to the way ^C sends SIGINT, and in fact csi segfaults if I kill -QUIT it as well. Best regards, Moritz ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] pressed Ctrl-\ and got segmentation fault
* Moritz Wilhelmy mw+chic...@wzff.de [130621 11:30]: Hello, Probably because readline is flaky. Try with parley, which is more native and supports threading better anyway.. I can confirm that it happens without any readline-ish extensions (and in fact no ~/.csirc at all). This chicken 4.7.0 is on FreeBSD/amd64 9.1-RELEASE. It should be noted that ^\ sends SIGQUIT, similar to the way ^C sends SIGINT, and in fact csi segfaults if I kill -QUIT it as well. Good hint! I can confirm this with a master build on 64bit linux as well. I will open up a bug. Thanks, Christian -- In the world, there is nothing more submissive and weak than water. Yet for attacking that which is hard and strong, nothing can surpass it. --- Lao Tzu ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] pressed Ctrl-\ and got segmentation fault
Hi Daniel and Moritz, * Daniel Ajoy da.a...@gmail.com [130618 07:03]: I press Ctrl-\ and I get #;1 ^\Segmentation fault (core dumped) why? This looks like a bug, I have opened ticket 1018 for it. You can see progress of that issue in the bugtracker at https://bugs.call-cc.org/ticket/1018. Thanks for your report! Christian -- In the world, there is nothing more submissive and weak than water. Yet for attacking that which is hard and strong, nothing can surpass it. --- Lao Tzu ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] pressed Ctrl-\ and got segmentation fault
Hello Daniel, On Fri, Jun 21, 2013 at 10:54:53 +0200, Moritz Wilhelmy wrote: I can confirm that it happens without any readline-ish extensions (and in fact no ~/.csirc at all). This chicken 4.7.0 is on FreeBSD/amd64 9.1-RELEASE. It should be noted that ^\ sends SIGQUIT, similar to the way ^C sends SIGINT, and in fact csi segfaults if I kill -QUIT it as well. I misread the problem as dumps core rather than segfaults. Sorry for the confusion, it exits because of SIGQUIT for me, and dumps core. It does however not exit because of SIGSEGV. (It really shouldn't segfault. I'm guessing sjamaan is right and this is one of the things from your csirc causing the invalid handling of ^\ and readline being a likely cause.) Best regards, Moritz ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] pressed Ctrl-\ and got segmentation fault
Moritz Wilhelmy scripsit: I misread the problem as dumps core rather than segfaults. Sorry for the confusion, it exits because of SIGQUIT for me, and dumps core. It does however not exit because of SIGSEGV. I can confirm that on 32-bit Linux. On Cygwin, however, typing ^\ does trigger a SIGSEGV with dumped core (except that it doesn't actually dump core because the Windows kernel can't do that). Both systems are running version 4.8.2 (rev ea02c9a), and there is no .csirc file. Readline is not involved: the config line says manyargs dload ptables only. -- A: Spiro conjectures Ex-Lax. John Cowan Q: What does Pat Nixon frost her cakes with? co...@ccil.org --Jeopardy for generative semanticists http://www.ccil.org/~cowan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] pressed Ctrl-\ and got segmentation fault
On Tue, Jun 18, 2013 at 12:02:56AM -0500, Daniel Ajoy wrote: This is my .csirc (use readline irregex) (current-input-port (make-gnu-readline-port)) (gnu-readline-parse-and-bind set editing-mode vi) (gnu-history-install-file-manager (string-append (or (get-environment-variable HOME) .) /.chicken_history) ) csi CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.0.3 (stability/4.8.0) (rev 091c3d9) windows-cygwin-x86 [ manyargs dload ptables ] compiled 2013-03-12 on aeryn.xorinia.dim (Darwin) I press Ctrl-\ and I get #;1 ^\Segmentation fault (core dumped) why? Probably because readline is flaky. Try with parley, which is more native and supports threading better anyway.. Cheers, Peter -- http://www.more-magic.net ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users