From: Detlev Zundel <dzu@denx.de>
To: John Proctor <john.proctor@gmail.com>
Cc: bug-guile mailing list <bug-guile@gnu.org>
Subject: Re: Problem with netcat
Date: Thu, 07 Apr 2011 18:04:49 +0200 [thread overview]
Message-ID: <m2d3kyf3oe.fsf@ohwell.denx.de> (raw)
In-Reply-To: <BANLkTimDrGF+3TQdXzwjQ-mWbUj1VMYA6g@mail.gmail.com> (John Proctor's message of "Thu, 7 Apr 2011 10:41:54 -0400")
Hi John,
> Attached is the output of two strace runs.
> strace.netcat is of 'strace -r guile --listen=9000' with 'netcat localhost
> 9000 < a.ss' run against it.
> strace.interactive is of 'strace -r guile --listen=9000' with 'netcat
> localhost 9000' used to access it and me manually typing (+ 5 3) then
> hitting <ctrl>-d in both windows to terminate.
>
> Thanks Andy and Detlev.
Thanks for the input - I think the problem is clear to see here:
> 0.000033 rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0
> 0.000039 write(90, "scheme@(guile-user)> ", 21scheme@(guile-user)> ) = 21
> 0.000028 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> 0.000022 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> 0.000032 read(0, <unfinished ...>
> 30.150227 +++ killed by SIGPIPE +++
This is from the problematic log. It turns out that an "strace -f"
would have be better advice for you so we would have seen the actual
socket process but funnily enough I now sometimes can regenerate the
error (usually by pressing C-c in netcat).
This is the last I see for such a case:
[pid 706] times({tms_utime=26, tms_stime=3, tms_cutime=0, tms_cstime=0}) = -1349846525
[pid 706] select(1024, [81], [], [], {0, 0}) = 0 (Timeout)
[pid 706] brk(0x9353000) = 0x9353000
[pid 706] brk(0x934b000) = 0x934b000
[pid 706] write(81, "scheme@(guile-user) [1]> ", 25) = 25
[pid 706] read(81, "", 1) = 0
[pid 706] write(81, "\n", 1) = 1
[pid 706] select(1024, [81], [], [], {0, 0}) = 1 (in [81], left {0, 0})
[pid 706] read(81, "", 1) = 0
[pid 706] select(1024, [81], [], [], {0, 0}) = 1 (in [81], left {0, 0})
[pid 706] read(81, "", 1) = 0
[pid 706] write(81, "\n", 1) = -1 EPIPE (Broken pipe)
[pid 706] --- SIGPIPE (Broken pipe) @ 0 (0) ---
Process 706 detached
[pid 32521] +++ killed by SIGPIPE +++
[pid 32520] +++ killed by SIGPIPE +++
+++ killed by SIGPIPE +++
So it seems like guile wants simply to output a newline but the socket
is closed already and the process then gets the SIGPIPE signal which
guile is not prepared for.
I will need to dig deeper into the innards of guile to find an answer on
how to prevent that. If someone beats me to it I'll still be happy ;)
Cheers
Detlev
--
Number theorists do it perfectly and rationally.
next prev parent reply other threads:[~2011-04-07 16:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-03 21:23 Problem with netcat John Proctor
2011-04-04 21:16 ` Andy Wingo
2011-04-06 10:52 ` Detlev Zundel
[not found] ` <BANLkTimDrGF+3TQdXzwjQ-mWbUj1VMYA6g@mail.gmail.com>
2011-04-07 16:04 ` Detlev Zundel [this message]
2011-04-11 8:14 ` Andy Wingo
2011-04-11 14:32 ` Detlev Zundel
2011-04-11 17:35 ` John Proctor
2011-04-11 17:36 ` Mark H Weaver
2011-04-11 18:03 ` Andy Wingo
2011-04-13 9:08 ` Detlev Zundel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2d3kyf3oe.fsf@ohwell.denx.de \
--to=dzu@denx.de \
--cc=bug-guile@gnu.org \
--cc=john.proctor@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).