jp2 not displaying - glibc or mod_fcgid error

Help
Anonymous
2012-02-23
2014-08-08
  • Anonymous - 2012-02-23

    Hi Ruven,

    I'm having fun while simultaneosly tearing my hair out trying to get jp2s
    working. Installing on Ubuntu 11.10 with Apache 2.2. I can get the
    PalaisDuLouvre tif working but cannot get it to work with a jp2. I've tried
    the moo and zoom clients. With moo the navigator frame seems to extract the
    correct size of the jp2 but I just receive a spinning load disk on the main
    part of the screen. I have fallen back to using the IIP protocol to narrow it
    down a bit more:

    http://localhost/fcgi-
    bin/iipsrv.fcgi?FIF=/var/www/test1.tif&wid=220&cvt=jpeg
    - works like a
    charm
    http://localhost/fcgi-
    bin/iipsrv.fcgi?FIF=/var/www/test3.jp2&wid=220&cvt=jpeg
    - Internal
    server error

    Here is a snippet from the Apache error.log:

    mod_deflate.c(615): Zlib: Compressed 607 to 382 : URL /fcgi-bin/iipsrv.fcgi
    glibc detected /usr/lib/fcgi-bin/iipsrv.fcgi: munmap_chunk(): invalid pointer: 0x091e45d0 ***
    ======= Backtrace: =========
    /lib32/libc.so.6(+0x6eb72)
    /lib32/libc.so.6(+0x6edb8)
    /usr/lib/i386-linux-gnu/libstdc++.so.6(_ZdlPv+0x1f)
    /usr/lib/i386-linux-gnu/libstdc++.so.6(_ZdaPv+0x1b)
    /usr/lib/fcgi-bin/iipsrv.fcgi
    /usr/lib/fcgi-bin/iipsrv.fcgi
    /usr/lib/fcgi-bin/iipsrv.fcgi
    /usr/lib/fcgi-bin/iipsrv.fcgi
    /lib32/libc.so.6(__libc_start_main+0xf3)
    /usr/lib/fcgi-bin/iipsrv.fcgi
    ======= Memory map: ========
    08048000-080d0000 r-xp 00000000 07:00 287854 /usr/lib/fcgi-bin/iipsrv.fcgi
    080d0000-080d1000 rw-p 00088000 07:00 287854 /usr/lib/fcgi-bin/iipsrv.fcgi
    080d1000-080d2000 rw-p 00000000 00:00 0
    09155000-09228000 rw-p 00000000 00:00 0
    f6308000-f635a000 rw-p 00000000 00:00 0
    f635a000-f635b000 ---p 00000000 00:00 0
    f635b000-f6b5b000 rw-p 00000000 00:00 0
    f6b5b000-f6b5c000 ---p 00000000 00:00 0
    f6b5c000-f735f000 rw-p 00000000 00:00 0
    f735f000-f74d2000 r-xp 00000000 07:00 300042 /lib32/libc-2.13.so
    f74d2000-f74d3000 ---p 00173000 07:00 300042 /lib32/libc-2.13.so
    f74d3000-f74d5000 r--p 00173000 07:00 300042 /lib32/libc-2.13.so
    f74d5000-f74d6000 rw-p 00175000 07:00 300042 /lib32/libc-2.13.so
    f74d6000-f74d9000 rw-p 00000000 00:00 0
    f74d9000-f74f5000 r-xp 00000000 07:00 2927 /lib/i386-linux-gnu/libgcc_s.so.1
    f74f5000-f74f6000 r--p 0001b000 07:00 2927 /lib/i386-linux-gnu/libgcc_s.so.1
    f74f6000-f74f7000 rw-p 0001c000 07:00 2927 /lib/i386-linux-gnu/libgcc_s.so.1
    f74f7000-f751f000 r-xp 00000000 07:00 300052 /lib32/libm-2.13.so
    f751f000-f7520000 r--p 00028000 07:00 300052 /lib32/libm-2.13.so
    f7520000-f7521000 rw-p 00029000 07:00 300052 /lib32/libm-2.13.so
    f7521000-f7522000 rw-p 00000000 00:00 0
    f7522000-f7600000 r-xp 00000000 07:00 1312769 /usr/lib/i386-linux-
    gnu/libstdc++.so.6.0.16
    f7600000-f7601000 ---p 000de000 07:00 1312769 /usr/lib/i386-linux-
    gnu/libstdc++.so.6.0.16
    f7601000-f7605000 r--p 000de000 07:00 1312769 /usr/lib/i386-linux-
    gnu/libstdc++.so.6.0.16
    f7605000-f7606000 rw-p 000e2000 07:00 1312769 /usr/lib/i386-linux-
    gnu/libstdc++.so.6.0.16
    f7606000-f760d000 rw-p 00000000 00:00 0
    f760d000-f76d3000 r-xp 00000000 07:00 2782224 /usr/lib/libkdu_v64R.so
    f76d3000-f76d5000 rw-p 000c5000 07:00 2782224 /usr/lib/libkdu_v64R.so
    f76d5000-f76d6000 rw-p 00000000 00:00 0
    f76d6000-f76e9000 r-xp 00000000 07:00 2973 /lib/i386-linux-gnu/libz.so.1.2.3.4
    f76e9000-f76ea000 r--p 00012000 07:00 2973 /lib/i386-linux-gnu/libz.so.1.2.3.4
    f76ea000-f76eb000 rw-p 00013000 07:00 2973 /lib/i386-linux-gnu/libz.so.1.2.3.4
    f76eb000-f774b000 r-xp 00000000 07:00 1312773 /usr/lib/i386-linux-
    gnu/libtiff.so.4.3.4
    f774b000-f774d000 r--p 0005f000 07:00 1312773 /usr/lib/i386-linux-
    gnu/libtiff.so.4.3.4
    f774d000-f774e000 rw-p 00061000 07:00 1312773 /usr/lib/i386-linux-
    gnu/libtiff.so.4.3.4
    f774e000-f7770000 r-xp 00000000 07:00 1312771 /usr/lib/i386-linux-
    gnu/libjpeg.so.62.0.0
    f7770000-f7771000 r--p 00022000 07:00 1312771 /usr/lib/i386-linux-
    gnu/libjpeg.so.62.0.0
    f7771000-f7772000 rw-p 00023000 07:00 1312771 /usr/lib/i386-linux-
    gnu/libjpeg.so.62.0.0
    f7772000-f7773000 rw-p 00000000 00:00 0
    f7773000-f778a000 r-xp 00000000 07:00 300050 /lib32/libpthread-2.13.so
    f778a000-f778b000 r--p 00016000 07:00 300050 /lib32/libpthread-2.13.so
    f778b000-f778c000 rw-p 00017000 07:00 300050 /lib32/libpthread-2.13.so
    f778c000-f778e000 rw-p 00000000 00:00 0
    f778e000-f77a3000 r-xp 00000000 07:00 300040 /lib32/libnsl-2.13.so
    f77a3000-f77a4000 r--p 00015000 07:00 300040 /lib32/libnsl-2.13.so
    f77a4000-f77a5000 rw-p 00016000 07:00 300040 /lib32/libnsl-2.13.so
    f77a5000-f77a7000 rw-p 00000000 00:00 0
    f77b5000-f77b9000 rw-p 00000000 00:00 0
    f77b9000-f77ba000 r-xp 00000000 00:00 0
    f77ba000-f77d8000 r-xp 00000000 07:00 2928 /lib/i386-linux-gnu/ld-2.13.so
    f77d8000-f77d9000 r--p 0001d000 07:00 2928 /lib/i386-linux-gnu/ld-2.13.so
    f77d9000-f77da000 rw-p 0001e000 07:00 2928 /lib/i386-linux-gnu/ld-2.13.so
    ffab9000-ffada000 rw-p 00000000 00:00 0
    mod_fcgid: error reading data, FastCGI server closed connection
    Premature end of script headers: iipsrv.fcgi
    mod_deflate.c(615): Zlib: Compressed 614 to 373 : URL /fcgi-bin/iipsrv.fcgi
    mod_fcgid: process /usr/lib/fcgi-bin/iipsrv.fcgi(4440) exit(communication
    error), get unexpected signal 6

    Here is the snippet from iipsrv.log (please ignore time differences - the message is the same in all other respects)
    Thu Feb 23 21:19:19 2012

    IIPImage Server. Version 0.9.9
    Ruven Pillay ruven@users.sourceforge.net

    Verbosity level set to 5
    Running in FCGI mode

    Setting maximum image cache size to 10MB
    Setting filesystem prefix to ''
    Setting default JPEG quality to 50
    Setting maximum CVT size to 3000
    Setting 3D file sequence name pattern to 'pyr'
    Setting up JPEG2000 support via Kakadu SDK

    Initialisation Complete.
    <----------------------------------->

    CVT maximum viewport size set to 3000
    Full Request is FIF=/var/www/test3.jp2&wid=220&cvt=jpeg
    : Command / Argument is FIF : /var/www/test3.jp2
    FIF handler reached
    FIF :: URL decoding/filtering: /var/www/test3.jp2 => /var/www/test3.jp2
    FIF :: Image cache initialisation
    FIF :: JPEG2000 image requested
    FIF :: Created image
    FIF :: Image dimensions are 3520 x 2321
    FIF :: Image timestamp: Wed, 22 Feb 2012 22:40:41 GMT
    FIF :: Total command time 821 microseconds
    : Command / Argument is wid : 220
    WID handler reached
    WID :: requested width is 220
    : Command / Argument is cvt : jpeg
    CVT handler reached
    CVT :: JPEG output handler reached
    CVT :: image set to 220x146 using resolution 0
    CVT :: No view port set
    CVT :: Requested scaled region size is 220x146. Nearest pyramid region size is
    220x146

    Any help gratefully received. Many thanks,

    Lee

     
  • Anonymous - 2012-02-23

    OK I've used different commands and a smaller tif to produce the jp2 and now
    I'm having a bit more luck but the jp2 images are coming out garbled up as
    though the decompression has got part of the way through and then stopped.
    Some tiles look good but at least half are garbled. Here's a pic:


    I had exactly the same jumbled up images for jp2 files in vmware virtual
    ubuntu machines on 2 different PCs. My latest idea was to use Wubi (ubuntu on
    Windows) to see if this made any difference but it hasn't. Any ideas?

    For history my new kdu commands were: sudo kdu_compress -i /var/www/test4.tif
    -o /var/www/test4.jp2 -rate 1.0 -no_palette

     
  • Anonymous - 2012-02-23
     
  • Eoghan O Carragain

    Is it 32bit or 64bit Ubuntu. I had garbled jp2s on Ubuntu 11.04 Desktop 32 bit
    running on VirtualBox. The problem went away on Ubuntu 11.04 Server 64 bit
    running a physical machine. I remember switching from 32 bit to 64bit working
    someone else too. Eoghan

     
  • Anonymous - 2012-02-25

    Thanks for the feedback Eoghan. Yes I'm running 32bit. Today I tried moving
    from Wubi (another form of virtualisation) to a non-virtual full partition
    installation of Ubuntu but the jp2 images are still jumbled. Unfortunately I
    only have 32-bit hardware to hand so I guess I will have to wait a wee bit
    longer.

    I am curious to know where the problem lies just so that it is documented on
    the iipimage website to help future users (i.e. let people know that the
    combination of x and y and z will not allow you to use jp2 files), or to
    update the i386 package with a fix. Well that's my wishlist officially
    declared...

     
  • Ruven

    Ruven - 2012-02-27

    Do you think you could give me a copy of the jp2 file that is causing this?

     
  • Anonymous - 2012-03-02

    Hi Ruven (and thanks again to Eoghan),

    In the last week I realised that my PC I had been testing on could support
    64-bit Ubuntu (see https://help.ubuntu.com/community/32bit_and_64bit#How_to_C
    heck
    if you
    want to see if your PC can support this) and so firstly installed it on a
    physical dual boot installation of Ubuntu 11.10 and Windows XP. Using all of
    the same commands to create the jp2s the garbled jp2 did not appear in the
    64-bit version. Tonight I installed a 64-bit Ubuntu on the same PC but
    installed as a virtual machine running through vmware player. Again this
    handled the jp2 files perfectly in the browser.

    My other PC still has 32bit Ubuntu running on a virtual machine so tomorrow I
    will take an exact copy of the jp2 file that now successfully displays in the
    64bit environment and see if it is still jumbled up / not fully decompressed.
    I'll post a copy of the jp2 file and the kakadu encoding parameters I used if
    the problems are still present.

    Thanks all - you've made a great tool available _and _engage with your
    audience. Top marks!!

    Lee

     
  • Anonymous - 2012-03-02

    Hello again

    I have now added links to various files:

    Image viewed through 64-bit set up: http://sweatyonion.com/stuff/index.php?Me
    diaPID=758

    Same image viewed through 32-bit set up: http://sweatyonion.com/stuff/index.p
    hp?MediaPID=757

    The jp2 image itself that was created on the same machine and copied to be
    used in the 32-bit and 64-bit virtual set-ups:
    http://sweatyonion.com/stuff/test1.jp2

    The kakadu command I used was:
    kdu_compress -i M:\a.tif -o F:\test1.jp2 -rate 1.0

    Some iipsrv.log snippets comparing the two. These are running on two seperate
    machines - a slower one running 32-bit and a faster one running 64-bit, but
    note that I saw the same result in the faster machine when it was running
    32-bit.

    iipsrv.log verbosity 5 snippet for 32-bit install

    CVT maximum viewport size set to 3000
    Full Request is FIF=/var/www/test1.jp2&cnt=1&sds=0,90&jtl=3,8
    : Command / Argument is FIF : /var/www/test1.jp2
    FIF handler reached
    FIF :: URL decoding/filtering: /var/www/test1.jp2 => /var/www/test1.jp2
    FIF :: Image cache hit. Number of elements: 1
    FIF :: JPEG2000 image requested
    FIF :: Created image
    FIF :: Image dimensions are 1279 x 959
    FIF :: Image timestamp: Fri, 02 Mar 2012 09:58:30 GMT
    FIF :: Total command time 1473 microseconds
    : Command / Argument is cnt : 1
    CNT handler reached
    CNT :: requested contrast adjustment is 1
    : Command / Argument is sds : 0,90
    SDS handler reached
    SDS :: set to 0, 90
    : Command / Argument is jtl : 3,8
    JTL handler reached
    TileManager :: Cache Miss for resolution: 3, tile: 8
    TileManager :: Cache Size: 2 tiles, 0.0299453 MB
    TileManager :: Total Tile Access Time: 1592689 microseconds
    JTL :: Tile size: 256 x 191
    JTL :: Channels per sample: 3
    JTL :: Bits per channel: 8
    JTL :: Compressed tile size is 3567
    JTL :: Total command time 1593246 microseconds
    Total Request Time: 1597650 microseconds
    image closed and deleted
    Server count is 7


    iipsrv.log verbosity 5 snippet for 64-bit install

    CVT maximum viewport size set to 3000
    Full Request is FIF=/var/www/test1.jp2&CNT=1&SDS=0,90&JTL=3,19
    : Command / Argument is FIF : /var/www/test1.jp2
    FIF handler reached
    FIF :: URL decoding/filtering: /var/www/test1.jp2 => /var/www/test1.jp2
    FIF :: Image cache hit. Number of elements: 1
    FIF :: JPEG2000 image requested
    FIF :: Created image
    FIF :: Image dimensions are 1279 x 959
    FIF :: Image timestamp: Fri, 02 Mar 2012 07:50:20 GMT
    FIF :: Total command time 895 microseconds
    : Command / Argument is CNT : 1
    CNT handler reached
    CNT :: requested contrast adjustment is 1
    : Command / Argument is SDS : 0,90
    SDS handler reached
    SDS :: set to 0, 90
    : Command / Argument is JTL : 3,19
    JTL handler reached
    TileManager :: Cache Miss for resolution: 3, tile: 19
    TileManager :: Cache Size: 4 tiles, 0.0180078 MB
    TileManager :: JPEG Compression Time: 1582 microseconds
    TileManager :: JPEG Compression Time: 28782 microseconds
    TileManager :: Tile cache insertion time: 23 microseconds
    TileManager :: Total Tile Access Time: 445972 microseconds
    JTL :: Tile size: 256 x 256
    JTL :: Channels per sample: 3
    JTL :: Bits per channel: 8
    JTL :: Compressed tile size is 4144
    JTL :: Total command time 446089 microseconds
    Memcached :: stored 4292 bytes in 214 microseconds
    Total Request Time: 447801 microseconds
    image closed and deleted
    Server count is 5

     
  • Ruven

    Ruven - 2012-03-05

    The jp2 image itself that was created on the same machine and copied to be
    used in the 32-bit and 64-bit virtual set-ups: http://sweatyonion.com/stuff/t
    est1.jp2

    There's nothing unusual in your log files. And the image works fine for me on
    my 64bit machine. But, if I've understood correctly, your 32bit setup is only
    a virtual machine? Does a real 32bit machine have the same problem? I'll try
    to find a 32bit machine to test it out on.

     
  • Anonymous - 2012-03-06

    I also installed 32bit ubuntu on a physical partition with dual boot (rather
    than a virtual machine or wubi set up) and this produces the same results. I'm
    using Apache in all environments.

     
  • Anonymous - 2014-08-07

    I'm experiencing the 'garbled' image problem on my setup, I'm assuming when I compiled the source, I did so with the 32-bit option. Is there a way to compile with a 64-bit option...?

     
    • Ruven

      Ruven - 2014-08-08

      On Linux and Mac OSX, it will compile automatically for 64bit if your OS is 64bit.

       


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks