unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* build errors: 9172 Broken pipe and 9173 Segmentation fault
@ 2011-03-24  1:05 Douglas Mencken
  2011-03-24  1:45 ` Neil Jerram
  0 siblings, 1 reply; 11+ messages in thread
From: Douglas Mencken @ 2011-03-24  1:05 UTC (permalink / raw)
  To: bug-guile

I don't have any idea how to fix that (I even tried to remove all
offline docs generating stuff with no success).
Guile version: guile-v2.0.0-122-gad301b6 (from git stable-2.0 branch).

  SNARF  net_db.doc
  SNARF  socket.doc
  SNARF  regex-posix.doc
  GEN      guile-procedures.texi
/bin/bash: line 1:  9172 Broken pipe             cat alist.doc
arbiters.doc array-handle.doc array-map.doc arrays.doc async.doc
backtrace.doc boolean.doc bitvectors.doc bytevectors.doc chars.doc
control.doc continuations.doc debug.doc deprecated.doc deprecation.doc
dynl.doc dynwind.doc eq.doc error.doc eval.doc evalext.doc expand.doc
extensions.doc feature.doc fluids.doc foreign.doc fports.doc
gc-malloc.doc gc.doc gettext.doc generalized-arrays.doc
generalized-vectors.doc goops.doc gsubr.doc guardians.doc hash.doc
hashtab.doc hooks.doc i18n.doc init.doc ioext.doc keywords.doc
list.doc load.doc macros.doc mallocs.doc memoize.doc modules.doc
numbers.doc objprop.doc options.doc pairs.doc ports.doc print.doc
procprop.doc procs.doc promises.doc r6rs-ports.doc random.doc
rdelim.doc read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc
smob.doc sort.doc srcprop.doc srfi-1.doc srfi-4.doc srfi-13.doc
srfi-14.doc srfi-60.doc stackchk.doc stacks.doc stime.doc strings.doc
strorder.doc strports.doc struct.doc symbols.doc threads.doc throw.doc
trees.doc uniform.doc values.doc variable.doc vectors.doc version.doc
vports.doc weaks.doc dynl.doc filesys.doc posix.doc net_db.doc
socket.doc regex-posix.doc
      9173 Segmentation fault      | GUILE_AUTO_COMPILE=0
../meta/uninstalled-env guile-tools snarf-check-and-output-texi >
guile-procedures.texi
make[3]: *** [guile-procedures.texi] Error 1
make[3]: Leaving directory
`/root/build-farm/guile-v2.0.0-122-gad301b6.builddir/libguile'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/root/build-farm/guile-v2.0.0-122-gad301b6.builddir/libguile'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/build-farm/guile-v2.0.0-122-gad301b6.builddir'
make: *** [all] Error 2



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
  2011-03-24  1:05 build errors: 9172 Broken pipe and 9173 Segmentation fault Douglas Mencken
@ 2011-03-24  1:45 ` Neil Jerram
       [not found]   ` <AANLkTindvcPaJ4qYr7OCvWbitFCzb2oALNO1ya6x0_Y4@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Neil Jerram @ 2011-03-24  1:45 UTC (permalink / raw)
  To: Douglas Mencken; +Cc: bug-guile

Douglas Mencken <dougmencken@gmail.com> writes:

>   GEN      guile-procedures.texi
> /bin/bash: line 1:  9172 Broken pipe             cat alist.doc
[...]
>       9173 Segmentation fault      | GUILE_AUTO_COMPILE=0
> ../meta/uninstalled-env guile-tools snarf-check-and-output-texi >

Hi Douglas,

AFAIK this isn't an already known problem.  This is the first point in
the build where the built Guile executable is actually run, so the
problem here may be generic (on powerpc) and not necessarily connected
with the snarf-check-and-output-texi function.

To investigate or help us understand more, you could:

- arrange to get a core dump (maybe with 'ulimit -c unlimited')

- use meta/gdb-uninstalled-guile, and then the 'core-file' command
  inside GDB, to look at that core dump

- in particular, use 'thread apply all bt' to get backtraces.

Thanks,
      Neil



^ permalink raw reply	[flat|nested] 11+ messages in thread

* build errors: 9172 Broken pipe and 9173 Segmentation fault
       [not found]   ` <AANLkTindvcPaJ4qYr7OCvWbitFCzb2oALNO1ya6x0_Y4@mail.gmail.com>
@ 2011-03-29 17:07     ` Douglas Mencken
  2011-04-01  9:08       ` Andy Wingo
  0 siblings, 1 reply; 11+ messages in thread
From: Douglas Mencken @ 2011-03-29 17:07 UTC (permalink / raw)
  To: neil; +Cc: bug-guile

[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]

Mail delivery said me "gtfo" with attachment3, bzip2ed it now.

---------- Forwarded message ----------
From: Douglas Mencken <dougmencken@gmail.com>
Date: Fri, Mar 25, 2011 at 10:11 PM
Subject: Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
To: Neil Jerram <neil@ossau.uklinux.net>
Cc: bug-guile@gnu.org

After re-making with --enable-guile-debug and no limit for core dumps,
I got: <attachment #1>.

On command `core-file
/root/build-farm/guile-v2.0.0-122-gad301b6.builddir/libguile/core.1008'
within ./meta/gdb-uninstalled-guile, I got: <attachment #2>.

On ('set logging on', 'set pagination off') 'thread apply all bt' I
got: <attachment #3>.

Also, from the conversation with mark_weaver from #guile @ freenode:

<mark_weaver> dougmencken: the real problem seems to be that an
infinite recursion results while handling a string decoding error.  it
is also curious why a decoding error is happening with uClibc that
does not occur with glibc, but that's secondary.
<mark_weaver> scm_from_locale_string calls scm_from_locale_stringn
which calls scm_from_stringn (in your case UTF-8 presumably) which
calls scm_decoding_error which calls scm_from_locale_string, ad
infinitum.
<mark_weaver> perhaps the decoding error handler is trying to print
the erroneous string as part of its error message, or something.
<mark_weaver> that would be my guess anyway.

[-- Attachment #2: attachment1 --]
[-- Type: application/octet-stream, Size: 3597 bytes --]

./guile-snarf-docs -o net_db.doc net_db.c -- -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/usr/lib/libffi-3.0.10rc9/include    -g -O2
./guile-snarf-docs -o socket.doc socket.c -- -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/usr/lib/libffi-3.0.10rc9/include    -g -O2
./guile-snarf-docs -o regex-posix.doc regex-posix.c -- -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/usr/lib/libffi-3.0.10rc9/include    -g -O2
cat alist.doc arbiters.doc array-handle.doc array-map.doc arrays.doc async.doc backtrace.doc boolean.doc bitvectors.doc bytevectors.doc chars.doc control.doc continuations.doc debug.doc deprecated.doc deprecation.doc dynl.doc dynwind.doc eq.doc error.doc eval.doc evalext.doc expand.doc extensions.doc feature.doc fluids.doc foreign.doc fports.doc gc-malloc.doc gc.doc gettext.doc generalized-arrays.doc generalized-vectors.doc goops.doc gsubr.doc guardians.doc hash.doc hashtab.doc hooks.doc i18n.doc init.doc ioext.doc keywords.doc list.doc load.doc macros.doc mallocs.doc memoize.doc modules.doc numbers.doc objprop.doc options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc promises.doc r6rs-ports.doc random.doc rdelim.doc read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc srfi-1.doc srfi-4.doc srfi-13.doc srfi-14.doc srfi-60.doc stackchk.doc stacks.doc stime.doc strings.doc strorder.doc strports.doc struct.doc symbols.doc threads.doc throw.doc trees.doc uniform.doc values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc dynl.doc filesys.doc posix.doc net_db.doc socket.doc regex-posix.doc | GUILE_AUTO_COMPILE=0 ../meta/uninstalled-env guile-tools snarf-check-and-output-texi          > guile-procedures.texi || { rm guile-procedures.texi; false; }
/bin/bash: line 1: 13211 Broken pipe             cat alist.doc arbiters.doc array-handle.doc array-map.doc arrays.doc async.doc backtrace.doc boolean.doc bitvectors.doc bytevectors.doc chars.doc control.doc continuations.doc debug.doc deprecated.doc deprecation.doc dynl.doc dynwind.doc eq.doc error.doc eval.doc evalext.doc expand.doc extensions.doc feature.doc fluids.doc foreign.doc fports.doc gc-malloc.doc gc.doc gettext.doc generalized-arrays.doc generalized-vectors.doc goops.doc gsubr.doc guardians.doc hash.doc hashtab.doc hooks.doc i18n.doc init.doc ioext.doc keywords.doc list.doc load.doc macros.doc mallocs.doc memoize.doc modules.doc numbers.doc objprop.doc options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc promises.doc r6rs-ports.doc random.doc rdelim.doc read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc srfi-1.doc srfi-4.doc srfi-13.doc srfi-14.doc srfi-60.doc stackchk.doc stacks.doc stime.doc strings.doc strorder.doc strports.doc struct.doc symbols.doc threads.doc throw.doc trees.doc uniform.doc values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc dynl.doc filesys.doc posix.doc net_db.doc socket.doc regex-posix.doc
     13212 Segmentation fault      (core dumped) | GUILE_AUTO_COMPILE=0 ../meta/uninstalled-env guile-tools snarf-check-and-output-texi > guile-procedures.texi
make[3]: *** [guile-procedures.texi] Error 1
make[3]: Leaving directory `/root/build-farm/guile-v2.0.0-122-gad301b6.builddir/libguile'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/build-farm/guile-v2.0.0-122-gad301b6.builddir/libguile'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/build-farm/guile-v2.0.0-122-gad301b6.builddir'
make: *** [all] Error 2
ERROR: 'make' error. Abort.


[-- Attachment #3: attachment2 --]
[-- Type: application/octet-stream, Size: 3029 bytes --]

Loaded symbols for ./meta/gdb-uninstalled-guile
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc-gnu-linux-uclibc".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/build-farm/guile-v2.0.0-122-gad301b6.builddir/libguile/.libs/lt-guile...done.
(gdb) core-file /root/build-farm/guile-v2.0.0-122-gad301b6.builddir/libguile/core.13212
[New Thread 13212]
Reading symbols from /root/build-farm/guile-v2.0.0-122-gad301b6.builddir/libguile/.libs/libguile-2.0.so.22...done.
Loaded symbols for /root/build-farm/guile-v2.0.0-122-gad301b6.builddir/libguile/.libs/libguile-2.0.so.22
Reading symbols from /usr/lib/libgc.so.1...done.
Loaded symbols for /usr/lib/libgc.so.1
Reading symbols from /lib/libpthread.so.0...done.
/lib/libpthread.so.0
Reading symbols from /usr/lib/libffi.so.6...done.
Loaded symbols for /usr/lib/libffi.so.6
Reading symbols from /usr/lib/libunistring.so.0...done.
Loaded symbols for /usr/lib/libunistring.so.0
Reading symbols from /usr/lib/libgmp.so.10...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgmp.so.10
Reading symbols from /usr/lib/libltdl.so.7...done.
Loaded symbols for /usr/lib/libltdl.so.7
Reading symbols from /lib/libdl.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.0
Reading symbols from /lib/libcrypt.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.0
Reading symbols from /lib/libm.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.0
Reading symbols from /usr/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.0
Reading symbols from /lib/ld-uClibc.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-uClibc.so.0
Core was generated by `/root/build-farm/guile-v2.0.0-122-gad301b6.builddir/libguile/.libs/lt-guile -e'.
Program terminated with signal 11, Segmentation fault.
#0  0x481ff0e8 in mem_iconveha (
    src=0x4812560c ������������������������������������������������������������������, 
    srclen=16, from_codeset=0x4849ff64 ����������������������, 
    to_codeset=0x482442e0 ������������������������������, 
    transliterate=<value optimized out>, handler=iconveh_question_mark, offsets=0x0, resultp=0xbf353074, lengthp=0xbf353070) at striconveha.c:234
234     striconveha.c: No such file or directory.
        in striconveha.c


[-- Attachment #4: attachment3.bzip2 --]
[-- Type: application/octet-stream, Size: 25371 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
  2011-03-29 17:07     ` Douglas Mencken
@ 2011-04-01  9:08       ` Andy Wingo
  2011-04-16 11:19         ` Douglas Mencken
  0 siblings, 1 reply; 11+ messages in thread
From: Andy Wingo @ 2011-04-01  9:08 UTC (permalink / raw)
  To: Douglas Mencken; +Cc: bug-guile, neil

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 3313 bytes --]

Hi,

On Tue 29 Mar 2011 19:07, Douglas Mencken <dougmencken@gmail.com> writes:

> <mark_weaver> dougmencken: the real problem seems to be that an
> infinite recursion results while handling a string decoding error.  it
> is also curious why a decoding error is happening with uClibc that
> does not occur with glibc, but that's secondary.
> <mark_weaver> scm_from_locale_string calls scm_from_locale_stringn
> which calls scm_from_stringn (in your case UTF-8 presumably) which
> calls scm_decoding_error which calls scm_from_locale_string, ad
> infinitum.
> <mark_weaver> perhaps the decoding error handler is trying to print
> the erroneous string as part of its error message, or something.
> <mark_weaver> that would be my guess anyway.

I don't know what bug this is.

Your backtrace includes repeating lines line this:

#13263 0x480dc9cc in scm_from_locale_stringn (str=0x4812560c .¢€€€€.œ€€€€.±€€€€.¶€€€€.³€€€€.œ€€€€.±€€€€.´€€€€.³€€€€.œ€€€€.±€€€€.µ€€€€.µ€€€€.œ€€€€.±€€€€.³€€€€.·€€€€.œ€€€€.±€€€€.´€€€€.¶€€€€.œ€€€€.±€€€€.¶€€€€.²€€€€.œ€€€€.±€€€€.µ€€€€.·€€€€.œ€€€€.±€€€€.µ€€€€.µ€€€€.œ€€€€.±€€€€.³€€€€.·€€€€.œ€€€€.±€€€€.¶€€€€.³€€€€.œ€€€€.±€€€€.¶€€€€.´€€€€.œ€€€€.±€€€€.¶€€€€.²€€€€.œ€€€€.±€€€€.µ€€€€.±€€€€.œ€€€€.±€€€€.µ€€€€.¶€€€€.œ€€€€.±€€€€.´€€€€.·€€€€.œ€€€€.±€€€€.µ€€€€.¶€€€€.¢€€€€, len=<value optimized out>) at strings.c:1535
#13264 0x480dc9fc in scm_from_locale_string (str=<value optimized out>) at strings.c:1529
#13265 0x480dca58 in scm_decoding_error (subr=<value optimized out>, err=38, message=0x48125a54 .¢€€€€.œ€€€€.±€€€€.µ€€€€.±€€€€.œ€€€€.±€€€€.µ€€€€.¶€€€€.œ€€€€.±€€€€.¶€€€€.°€€€€.œ€€€€.±€€€€.¶€€€€.µ€€€€.œ€€€€.±€€€€.¶€€€€.´€€€€.œ€€€€.°€€€€.´€€€€.°€€€€.œ€€€€.±€€€€.µ€€€€.´€€€€.œ€€€€.±€€€€.µ€€€€.·€€€€.œ€€€€.±€€€€.´€€€€.³€€€€.œ€€€€.±€€€€.´€€€€.±€€€€.œ€€€€.±€€€€.µ€€€€.´€€€€.œ€€€€.±€€€€.´€€€€.µ€€€€.œ€€€€.°€€€€.´€€€€.°€€€€.œ€€€€.±€€€€.´€€€€.³€€€€.œ€€€€.±€€€€.µ€€€€.·€€€€.œ€€€€.±€€€€.µ€€€€.¶€€€€.œ€€€€.±€€€€.¶€€€€.¶€€€€.œ€€€€.±€€€€.´€€€€.µ€€€€.œ€€€€.±€€€€.¶€€€€.²€€€€.œ€€€€.±€€€€.¶€€€€.³€€€€.œ€€€€.±€€€€.µ€€€€.±€€€€.œ€€€€.±€€€€.µ€€€€.·€€€€.œ€€€€.±€€€€.µ€€€€.¶€€€€.œ€€€€.°€€€€.´€€€€.°€€€€.œ€€€€.±€€€€.´€€€€.µ€€€€.œ€€€€.±€€€€.¶€€€€.²€€€€.œ€€€€.±€€€€.¶€€€€.²€€€€.œ€€€€.±€€€€.µ€€€€.·€€€€.œ€€€€.±€€€€.¶€€€€.²€€€€.¢€€€€, port=<value optimized out>) at strings.c:1438
#13266 0x480dcce4 in scm_from_stringn (str=0x4812560c .¢€€€€.œ€€€€.±€€€€.¶€€€€.³€€€€.œ€€€€.±€€€€.´€€€€.³€€€€.œ€€€€.±€€€€.µ€€€€.µ€€€€.œ€€€€.±€€€€.³€€€€.·€€€€.œ€€€€.±€€€€.´€€€€.¶€€€€.œ€€€€.±€€€€.¶€€€€.²€€€€.œ€€€€.±€€€€.µ€€€€.·€€€€.œ€€€€.±€€€€.µ€€€€.µ€€€€.œ€€€€.±€€€€.³€€€€.·€€€€.œ€€€€.±€€€€.¶€€€€.³€€€€.œ€€€€.±€€€€.¶€€€€.´€€€€.œ€€€€.±€€€€.¶€€€€.²€€€€.œ€€€€.±€€€€.µ€€€€.±€€€€.œ€€€€.±€€€€.µ€€€€.¶€€€€.œ€€€€.±€€€€.´€€€€.·€€€€.œ€€€€.±€€€€.µ€€€€.¶€€€€.¢€€€€, len=<value optimized out>, encoding=<value optimized out>, handler=<value optimized out>) at strings.c:1494

But the only calls to scm_from_locale_string in scm_decoding_error are
on string literals:

   scm_from_locale_string (subr),
   scm_from_locale_string (message),

But the argument to scm_from_locale_stringn does not appear to be one of
the known strings that it could be.

In any case, it does seem more correct to use a fixed locale for these
strings, so I have changed it to use latin1 strings.

Regards,

Andy
-- 
http://wingolog.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
  2011-04-01  9:08       ` Andy Wingo
@ 2011-04-16 11:19         ` Douglas Mencken
  2011-04-16 16:01           ` Andy Wingo
                             ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Douglas Mencken @ 2011-04-16 11:19 UTC (permalink / raw)
  To: Andy Wingo; +Cc: bug-guile, neil

Hi again!

Yes, you fixed infinite loop issue, thank you. But guile 2.0 (now it
is guile-v2.0.0-199-g0fbdbe6 -- currently the latest one from
stable-2.0 branch) is still un-buildable on my side.

I summarized what I did here (section "Example: debugging guile build
error"): http://manulix.wikidot.com/debug-howto

Duping the output of 'thread apply all bt' also here:

Thread 1 (Thread 18507):
#0  0x48470744 in raise () from /lib/libc.so.0
#1  0x4846aef0 in abort () from /lib/libc.so.0
#2  0x480ebc64 in scm_throw (key=0x0, args=0x10317ff0) at throw.c:102
#3  0x480e0f44 in scm_decoding_error (subr=<value optimized out>,
err=38, message=<value optimized out>, port=<value optimized out>) at
strings.c:1438
#4  0x480e1190 in scm_from_stringn (str=0x48128754 ������, len=<value
optimized out>, encoding=<value optimized out>, handler=<value
optimized out>) at strings.c:1494
#5  0x480e11e8 in scm_from_locale_stringn (str=0x48128754 ������,
len=<value optimized out>) at strings.c:1535
#6  0x480e7304 in scm_from_locale_symboln (sym=<value optimized out>,
len=<value optimized out>) at symbols.c:444
#7  0x480e7328 in scm_from_locale_symbol (sym=<value optimized out>)
at symbols.c:438
#8  0x48050410 in scm_init_array_handle () at array-handle.c:138
#9  0x480894c0 in scm_i_init_guile (base=<value optimized out>) at init.c:399
#10 0x480e8e5c in scm_i_init_thread_for_guile (base=0xbfcd9fc8,
parent=0x0) at threads.c:777
#11 scm_i_init_thread_for_guile (base=0xbfcd9fc8, parent=0x0) at threads.c:756
#12 0x480e8eb0 in with_guile_and_parent (base=0xbfcd9fc8, data=<value
optimized out>) at threads.c:849
#13 0x4817f718 in GC_call_with_stack_base (fn=<value optimized out>,
arg=<value optimized out>) at misc.c:1480
#14 0x480e9074 in scm_i_with_guile_and_parent (func=<value optimized
out>, data=<value optimized out>) at threads.c:899
#15 scm_with_guile (func=<value optimized out>, data=<value optimized
out>) at threads.c:905
#16 0x48089438 in scm_boot_guile (argc=<value optimized out>,
argv=<value optimized out>, main_func=<value optimized out>,
closure=<value optimized out>) at init.c:319
#17 0x100006c4 in main (argc=<value optimized out>, argv=<value
optimized out>) at guile.c:70



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
  2011-04-16 11:19         ` Douglas Mencken
@ 2011-04-16 16:01           ` Andy Wingo
  2011-04-17  2:34           ` Mark H Weaver
  2011-04-17  2:38           ` Mark H Weaver
  2 siblings, 0 replies; 11+ messages in thread
From: Andy Wingo @ 2011-04-16 16:01 UTC (permalink / raw)
  To: Douglas Mencken; +Cc: bug-guile, neil

Hi Douglas,

On Sat 16 Apr 2011 13:19, Douglas Mencken <dougmencken@gmail.com> writes:

> Thread 1 (Thread 18507):
> #0  0x48470744 in raise () from /lib/libc.so.0
> #1  0x4846aef0 in abort () from /lib/libc.so.0
> #2  0x480ebc64 in scm_throw (key=0x0, args=0x10317ff0) at throw.c:102
> #3  0x480e0f44 in scm_decoding_error (subr=<value optimized out>,
> err=38, message=<value optimized out>, port=<value optimized out>) at
> strings.c:1438
> #4  0x480e1190 in scm_from_stringn (str=0x48128754 ������, len=<value
> optimized out>, encoding=<value optimized out>, handler=<value
> optimized out>) at strings.c:1494
> #5  0x480e11e8 in scm_from_locale_stringn (str=0x48128754 ������,
> len=<value optimized out>) at strings.c:1535
> #6  0x480e7304 in scm_from_locale_symboln (sym=<value optimized out>,
> len=<value optimized out>) at symbols.c:444
> #7  0x480e7328 in scm_from_locale_symbol (sym=<value optimized out>)
> at symbols.c:438

Does make run to completion if you build under an ASCII-compatible
locale?  Try LC_ALL=C make.

Thanks,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
  2011-04-16 11:19         ` Douglas Mencken
  2011-04-16 16:01           ` Andy Wingo
@ 2011-04-17  2:34           ` Mark H Weaver
  2011-04-18 21:16             ` Ludovic Courtès
  2011-04-17  2:38           ` Mark H Weaver
  2 siblings, 1 reply; 11+ messages in thread
From: Mark H Weaver @ 2011-04-17  2:34 UTC (permalink / raw)
  To: Douglas Mencken; +Cc: bug-guile

[-- Attachment #1: Type: text/plain, Size: 1450 bytes --]

Douglas Mencken <dougmencken@gmail.com> writes:
> #3  0x480e0f44 in scm_decoding_error (subr=<value optimized out>,
> err=38, message=<value optimized out>, port=<value optimized out>) at
> strings.c:1438
> #4  0x480e1190 in scm_from_stringn (str=0x48128754 ������, len=<value
> optimized out>, encoding=<value optimized out>, handler=<value
> optimized out>) at strings.c:1494
> #5  0x480e11e8 in scm_from_locale_stringn (str=0x48128754 ������,
> len=<value optimized out>) at strings.c:1535
> #6  0x480e7304 in scm_from_locale_symboln (sym=<value optimized out>,
> len=<value optimized out>) at symbols.c:444
> #7  0x480e7328 in scm_from_locale_symbol (sym=<value optimized out>)
> at symbols.c:438
> #8  0x48050410 in scm_init_array_handle () at array-handle.c:138

Douglas and I did some investigation over this over IRC, and discovered
that this problem is not within Guile.  On his platform (uClibc on
PowerPC, using GCC 4.6.0 and libunistring-0.9.3) u32_conv_from_encoding
does not work correctly, as demonstrated by the attached minimal C
program, which is not linked with Guile.

In particular, the following call returns NULL on his platform:

  uint32_t *result;
  size_t result_size;
  result = u32_conv_from_encoding ("ASCII", iconveh_question_mark,
                                   "a", 1,
                                   NULL, NULL, &result_size);

     Best,
      Mark



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Example of libunistring failure on uClibc/PPC --]
[-- Type: text/x-csrc, Size: 706 bytes --]

/* but first, write a little minimal C program that calls u32_conv_from_encoding 
 * with the same parameters used here:
 * fromcode=="ASCII", handler==iconveh_question_mark, src=="a", srclen==1, offsets==NULL, 
 * resultbuf==NULL, and lengthp should be a pointer to a size_t variable
 */

#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>

#include <uniconv.h>
#include <unistring/iconveh.h>

static const char a_str[] = { 0x61, 0x00 };

int
main (int argc, char *argv[])
{
  uint32_t *result;
  size_t some_size;
  
  result = u32_conv_from_encoding ("ASCII", iconveh_question_mark,
				   a_str, 1,
				   NULL, NULL, &some_size);

  printf ("result = %p\n", result);

  return EXIT_SUCCESS;
}

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
  2011-04-16 11:19         ` Douglas Mencken
  2011-04-16 16:01           ` Andy Wingo
  2011-04-17  2:34           ` Mark H Weaver
@ 2011-04-17  2:38           ` Mark H Weaver
  2 siblings, 0 replies; 11+ messages in thread
From: Mark H Weaver @ 2011-04-17  2:38 UTC (permalink / raw)
  To: Douglas Mencken; +Cc: bug-guile

Douglas Mencken <dougmencken@gmail.com> writes:
> #3  0x480e0f44 in scm_decoding_error (subr=<value optimized out>,
> err=38, message=<value optimized out>, port=<value optimized out>) at
> strings.c:1438
> #4  0x480e1190 in scm_from_stringn (str=0x48128754 ������, len=<value
> optimized out>, encoding=<value optimized out>, handler=<value
> optimized out>) at strings.c:1494
> #5  0x480e11e8 in scm_from_locale_stringn (str=0x48128754 ������,
> len=<value optimized out>) at strings.c:1535
> #6  0x480e7304 in scm_from_locale_symboln (sym=<value optimized out>,
> len=<value optimized out>) at symbols.c:444
> #7  0x480e7328 in scm_from_locale_symbol (sym=<value optimized out>)
> at symbols.c:438
> #8  0x48050410 in scm_init_array_handle () at array-handle.c:138

Also, I forgot to mention that the backtrace above is incorrect, due to
a flaw in gdb on his platform.  The "str" arguments passed to
scm_from_stringn and scm_from_locale_stringn, shown above as gibberish,
are in fact just "a".

     Best,
      Mark



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
  2011-04-17  2:34           ` Mark H Weaver
@ 2011-04-18 21:16             ` Ludovic Courtès
  2011-04-18 23:45               ` Mark H Weaver
  0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2011-04-18 21:16 UTC (permalink / raw)
  To: bug-guile

Hi Mark,

Mark H Weaver <mhw@netris.org> writes:

> Douglas and I did some investigation over this over IRC, and discovered
> that this problem is not within Guile.  On his platform (uClibc on
> PowerPC, using GCC 4.6.0 and libunistring-0.9.3) u32_conv_from_encoding
> does not work correctly, as demonstrated by the attached minimal C
> program, which is not linked with Guile.

Great.  Did you report it on bug-libunistring?

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
  2011-04-18 21:16             ` Ludovic Courtès
@ 2011-04-18 23:45               ` Mark H Weaver
  2011-04-21 10:28                 ` Andy Wingo
  0 siblings, 1 reply; 11+ messages in thread
From: Mark H Weaver @ 2011-04-18 23:45 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guile

[-- Attachment #1: Type: text/plain, Size: 1494 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:
>> Douglas and I did some investigation over this over IRC, and discovered
>> that this problem is not within Guile.  On his platform (uClibc on
>> PowerPC, using GCC 4.6.0 and libunistring-0.9.3) u32_conv_from_encoding
>> does not work correctly, as demonstrated by the attached minimal C
>> program, which is not linked with Guile.
>
> Great.  Did you report it on bug-libunistring?

Further investigation revealed that his libunistring was built with
HAVE_ICONV undefined.  Apparently it is possible to build and install
libunistring without iconv, in which case most (all?) attempts to
convert between encodings will fail.

Therefore, it seems that there is no bug here at all.  After Douglas
rebuilt libunistring, his guile-2.0 build proceeded further than ever
before: into byte-compiling *.scm files at least, and possibly all the
way to completion, I'm not sure.

Ideally, guile's configure script should check that libunistring is able
to convert between encodings, instead of failing with an obscure error
far into the build.

I've never worked with autoconf, so I'm uncertain of how best to add
this check.  If you'd like to add it, the attached C program would be a
suitable test program.  It will return a non-zero exit status if
libunistring conversion fails, which most likely indicates that
libunistring was built without iconv.  In this case I think the build
should be aborted.

   Thanks,
     Mark



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libunistring iconv test --]
[-- Type: text/x-csrc, Size: 240 bytes --]

#include <uniconv.h>
#include <unistring/iconveh.h>

int
main (int argc, char *argv[])
{
  size_t result_size;
  
  return (NULL == u32_conv_from_encoding ("ASCII", iconveh_question_mark,
					  "a", 1,
					  NULL, NULL, &result_size));
}

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
  2011-04-18 23:45               ` Mark H Weaver
@ 2011-04-21 10:28                 ` Andy Wingo
  0 siblings, 0 replies; 11+ messages in thread
From: Andy Wingo @ 2011-04-21 10:28 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: bug-guile, Ludovic Courtès

On Tue 19 Apr 2011 01:45, Mark H Weaver <mhw@netris.org> writes:

> Ideally, guile's configure script should check that libunistring is able
> to convert between encodings, instead of failing with an obscure error
> far into the build.

I have added your program as a configure check.  Thanks very much for
debugging this one, Mark!

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-04-21 10:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24  1:05 build errors: 9172 Broken pipe and 9173 Segmentation fault Douglas Mencken
2011-03-24  1:45 ` Neil Jerram
     [not found]   ` <AANLkTindvcPaJ4qYr7OCvWbitFCzb2oALNO1ya6x0_Y4@mail.gmail.com>
2011-03-29 17:07     ` Douglas Mencken
2011-04-01  9:08       ` Andy Wingo
2011-04-16 11:19         ` Douglas Mencken
2011-04-16 16:01           ` Andy Wingo
2011-04-17  2:34           ` Mark H Weaver
2011-04-18 21:16             ` Ludovic Courtès
2011-04-18 23:45               ` Mark H Weaver
2011-04-21 10:28                 ` Andy Wingo
2011-04-17  2:38           ` Mark H Weaver

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).