[Haskell-cafe] Static executables in minimal Docker containers

Sylvain Henry hsyl20 at gmail.com
Sun May 17 12:25:24 UTC 2015


Hi,

I had the same bug with a single static binary in a initramfs. I fixed
GHC.IO.Encoding to avoid using Iconv for the default (ASCII) charmap used
with static binaries and now it works. Patch is in my comment on
https://ghc.haskell.org/trac/ghc/ticket/10298

If the default LC_CTYPE value is the DEFAULT_CHARMAP from
glibc/locale/programs/config.h, it is set to "ANSI_X3.4-1968" since 2000
and was set to "POSIX" before. Maybe we should match this one too?

Sylvain

2015-04-20 6:34 GMT+02:00 Michael Snoyman <michael at snoyman.com>:

> Thanks for the update Simon.
>
> On Sun, Apr 19, 2015 at 10:54 PM Simon Marlow <marlowsd at gmail.com> wrote:
>
>> Hi Michael,
>>
>> This rang a bell for me.  It might be the same as these:
>> https://ghc.haskell.org/trac/ghc/ticket/7695
>> https://ghc.haskell.org/trac/ghc/ticket/8928
>>
>> I think the conclusion was that the IO library is failing to start
>> iconv, and printing the error messages causes it to retry loading iconv,
>> ad infinitum (or something like that).  There's no fix yet, but it
>> probably isn't hard to fix, just that nobody got around to it yet.
>>
>> Cheers,
>> Simon
>>
>> On 13/04/2015 11:50, Michael Snoyman wrote:
>> > I'm not sure if this issue would show up, but I can try it in Fedora
>> > tomorrow. I didn't address the linker warning at all right now, it seems
>> > to not have been triggered, though I suppose it is possible that it's
>> > the cause of this issue.
>> >
>> > On Mon, Apr 13, 2015 at 7:10 PM Greg Weber <greg at gregweber.info
>> > <mailto:greg at gregweber.info>> wrote:
>> >
>> >     Haskell is not that great at producing statically linked libraries
>> >     independent of the OS.
>> >     The issue you are running into would likely show up in another
>> >     non-ubuntu image (or even possibly a different version of an ubuntu
>> >     image), so you could probably use a Fedora image that has tracing.
>> >
>> >     How are you addressing the linker warning about needing a particular
>> >     glibc version at runtime?
>> >
>> >     On Mon, Apr 13, 2015 at 3:28 AM, Sharif Olorin
>> >     <sharif.olorin at gmail.com <mailto:sharif.olorin at gmail.com>> wrote:
>> >
>> >             Unfortunately, strace and ltrace aren't available in that
>> >             Docker image, but it's a good idea to see if I can get them
>> >             running there somehow.
>> >
>> >
>> >         Failing that, you might be able to get useful information of the
>> >         same kind by running docker (the server, not the `docker run`
>> >         command) under perf[0] and then running your busybox container.
>> >         It should at least give you an idea of what it's doing when it
>> >         explodes.
>> >
>> >         Sharif
>> >
>> >         [0]: https://perf.wiki.kernel.org/index.php/Tutorial
>> >
>> >         --
>> >         You received this message because you are subscribed to the
>> >         Google Groups "Commercial Haskell" group.
>> >         To unsubscribe from this group and stop receiving emails from
>> >         it, send an email to
>> >         commercialhaskell+unsubscribe at googlegroups.com
>> >         <mailto:commercialhaskell+unsubscribe at googlegroups.com>.
>> >         To post to this group, send email to
>> >         commercialhaskell at googlegroups.com
>> >         <mailto:commercialhaskell at googlegroups.com>.
>> >         To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/commercialhaskell/86ca2603-37f2-4645-9cd2-f09703f2be67%40googlegroups.com
>> >         <
>> https://groups.google.com/d/msgid/commercialhaskell/86ca2603-37f2-4645-9cd2-f09703f2be67%40googlegroups.com?utm_medium=email&utm_source=footer
>> >.
>> >
>> >         For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Commercial Haskell" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an email to commercialhaskell+unsubscribe at googlegroups.com
>> > <mailto:commercialhaskell+unsubscribe at googlegroups.com>.
>> > To post to this group, send email to commercialhaskell at googlegroups.com
>> > <mailto:commercialhaskell at googlegroups.com>.
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/commercialhaskell/CAKA2Jg%2B%3DzJiXmak2FU_5GWPO1Dcn%2BvwsiB_xWj%2B8GfHvMkoBjw%40mail.gmail.com
>> > <
>> https://groups.google.com/d/msgid/commercialhaskell/CAKA2Jg%2B%3DzJiXmak2FU_5GWPO1Dcn%2BvwsiB_xWj%2B8GfHvMkoBjw%40mail.gmail.com?utm_medium=email&utm_source=footer
>> >.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Commercial Haskell" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to commercialhaskell+unsubscribe at googlegroups.com.
>> To post to this group, send email to commercialhaskell at googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/commercialhaskell/553407EF.1030303%40gmail.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150517/5ad9ea39/attachment.html>


More information about the Haskell-Cafe mailing list