unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Rob Browning <rlb@defaultvalue.org>
Subject: Re: 1.8 make check failing in popen.test
Date: Wed, 30 Aug 2006 00:50:08 -0700	[thread overview]
Message-ID: <87irka4q8f.fsf@raven.defaultvalue.org> (raw)
In-Reply-To: <87pset1wxr.fsf@zip.com.au> (Kevin Ryde's message of "Tue, 22 Aug 2006 09:38:40 +1000")

Kevin Ryde <user42@zip.com.au> writes:

> Looks about right.  What's the child process doing?  It's supposed to
> be writing to the parent to say continue.  (Unless it failed to fork
> there should be some child, either running or a zombie.)

(Consider the following info preliminary.  I haven't had any time to
try and figure out the actual cause, but since I just discovered this,
and I have to stop for the moment, I wanted to let everyone else have
a look.)

After further investigation, it appears that particular child might
not be running, at least not on some of the runs.  I switched back to
the original code (the code that would hang), added some debug
statements, ran strace -p -s 100, etc. on "make check", and found that
the child appears to be segfaulting at least some of the time here (in
popen.scm):

               (port-for-each (lambda (pt-entry)
                                ;;(dbg-out (list 'pt-entry pt-entry))
                                (false-if-exception
                                 (let ((pt-fileno (fileno pt-entry)))
                                   (if (not (or (= pt-fileno input-fdes)
                                                (= pt-fileno output-fdes)
                                                (= pt-fileno error-fdes)))
                                       (close-fdes pt-fileno))))))

When I uncomment the dbg-out statement above (which just writes the
arg and a newline to an output-port and then forces the output), I see
this on the console:

  ERROR: popen.test: open-output-pipe: no duplicate - arguments:
  ((wrong-type-arg "list-copy" "Wrong type argument in position ~A: ~S"
  (1 (pt-entry . #<freed cell 0x40305830; GC missed a reference>))
  ((pt-entry . #<freed cell 0x40305830; GC missed a reference>))))

this in the dbg-out output file:

  ...
  (pt-entry #<output: string 81079e0>)
  (pt-entry #<output: string 8106650>)
  (pt-entry #<freed cell 0x40643c18; GC missed a reference>)

and this in the strace (1402 is the forked child process):

  1402  write(7, "ERROR: popen.test: open-output-pipe: no duplicate - arguments: ((wrong-type-arg \"list-copy\" \"Wrong t"..., 263) = -1 EBADF (Bad file descriptor)
  1402  write(2, "ERROR", 5)              = -1 EBADF (Bad file descriptor)
  1402  write(2, "\nException during displaying of ", 32) = -1 EBADF (Bad file descriptor)
  1402  write(7, "ERROR: popen.test: open-output-pipe: no duplicate - arguments: ((wrong-type-arg \"list-copy\" \"Wrong t"..., 263) = -1 EBADF (Bad file descriptor)
  1402  write(2, "ERROR", 5)              = -1 EBADF (Bad file descriptor)
  1402  write(2, "\nException during displaying of ", 32) = -1 EBADF (Bad file descriptor)
  1402  exit_group(1)                     = ?

If I omit the dbg-out statement in the above code, then I can just see
the child die due to a SEGV in the strace log (2126 is the child):

  2126  close(12 <unfinished ...>
  2123  <... close resumed> )             = 0
  2126  <... close resumed> )             = 0
  2123  access("/etc/ld.so.nohwcap", F_OK <unfinished ...>
  2126  close(10 <unfinished ...>
  2123  <... access resumed> )            = -1 ENOENT (No such file or directory)
  2126  <... close resumed> )             = 0
  2123  open("/lib/tls/i686/cmov/libdl.so.2", O_RDONLY <unfinished ...>
  2126  close(29 <unfinished ...>
  2123  <... open resumed> )              = 5
  2126  <... close resumed> )             = 0
  2123  read(5,  <unfinished ...>
  2126  --- SIGSEGV (Segmentation fault) @ 0 (0) ---

So I started from a clean tree, enabled core dumps, and here's what
gdb had to say about the resulting core:

  Program terminated with signal 11, Segmentation fault.
  #0  0x400729ca in scm_fileno (port=0x0) at ioext.c:180
  180       port = SCM_COERCE_OUTPORT (port);
  (gdb) where
  #0  0x400729ca in scm_fileno (port=0x0) at ioext.c:180
  #1  0x4005ad41 in ceval (x=0x404, env=0x40372710) at eval.c:4218
  #2  0x4005b26e in ceval (x=<value optimized out>, env=0x40372710)
      at eval.c:3634

In any case, as I said, consider all this preliminary.  For everything
but the core dump, I wasn't working from a clean tree.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


  parent reply	other threads:[~2006-08-30  7:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-23  8:37 1.8 make check failing in popen.test Rob Browning
2006-07-23 22:36 ` Kevin Ryde
2006-07-23 23:12   ` Rob Browning
2006-07-24  7:25     ` Ludovic Courtès
2006-07-30  1:59       ` Rob Browning
2006-08-15  8:35 ` Rob Browning
2006-08-15 23:13   ` Kevin Ryde
2006-08-16  1:18     ` Rob Browning
2006-08-16 23:26       ` Kevin Ryde
2006-08-18  3:01         ` Rob Browning
2006-08-21 23:38           ` Kevin Ryde
2006-08-22  2:03             ` Rob Browning
2006-08-25  1:16               ` Kevin Ryde
2006-08-25  2:39                 ` Rob Browning
2006-08-27 20:06                   ` Rob Browning
2006-08-27 20:22                     ` Rob Browning
2006-08-30  7:50             ` Rob Browning [this message]
2006-08-31  0:24               ` Kevin Ryde
2006-08-31  6:28                 ` Rob Browning
2006-09-04  2:45                   ` Rob Browning
2006-09-07 20:46                     ` Kevin Ryde
2006-09-08  2:45                       ` Rob Browning
2006-09-08 23:05                         ` Kevin Ryde
2006-09-09 12:52                           ` Marius Vollmer
2006-09-09 16:39                             ` Rob Browning
2006-09-10 16:24                               ` Rob Browning
2006-09-11  1:16                                 ` Rob Browning
2006-09-11  6:40                                   ` Neil Jerram
2006-09-11 15:57                                     ` Rob Browning
2006-09-11 17:40                                       ` Neil Jerram

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=87irka4q8f.fsf@raven.defaultvalue.org \
    --to=rlb@defaultvalue.org \
    /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).