First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 153068
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: TeX herd <tex@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Ross Dougherty <theklone@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
backtrace backtrace text/plain Ross Dougherty 2006-10-27 18:19 0000 4.85 KB Details
emerge-gocr.log full log of netpbm and gocr emerge text/plain Ross Dougherty 2006-10-30 00:54 0000 512.35 KB Details
emerge-gocr.with.netpbm-10.36.0.log full log of netpbm-10.36.0 and gocr emerge text/plain Ross Dougherty 2006-10-30 01:16 0000 547.94 KB Details
gocr-0.41-libpamread.patch Fixes calls to pbpamread in netpbm with dangling pointers patch Christian Schmidt 2006-11-20 17:36 0000 706 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 153068 depends on: Show dependency tree
Bug 153068 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-10-27 15:03 0000
emerge -av =media-libs/netpbm-10.36.0
[ebuild     U ] media-libs/netpbm-10.36.0 [10.34] USE="jpeg png xml zlib -svga
-tiff"
djpeg test.jpg | gocr -i -
Segmentation fault

emerge -av =media-libs/netpbm-10.34
[ebuild     UD] media-libs/netpbm-10.34 [10.36.0] USE="jpeg png xml zlib -svga
-tiff"
djpeg test.jpg | gocr -i -
ok

Tried 0.39, 0.40-r2 and 0.41.

Portage 2.1.2_pre2-r7 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.4-r4,
2.6.16 i686)
=================================================================
System uname: 2.6.16 i686 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.5
Last Sync: Fri, 27 Oct 2006 17:50:01 +0000
ccache version 2.4 [disabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.3.5-r3, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
USE="x86 3dnow 3dnowext X aac acl acpi alsa apache2 berkdb bitmap-fonts bzip2
caps cli cracklib crypt cscope devmap dlloader dts dvb dvd eds elibc_glibc
emboss evms2 ffmpeg fftw flac fortran gd gdbm gif imap input_devices_keyboard
input_devices_mouse isdnlog jpeg jpeg2k kde kernel_linux libg++ libwww lirc
lirc_devices_mceusb2 lm_sensors mad mbox mmx mmxext mp3 mysql mythtv nagios-dns
nagios-ntp nagios-ping nagios-ssh ncurses nls no-old-linux nptl nptlonly nvidia
offensive ogg opengl pam pcre perl png pppd python readline reflection rtc
samba sasl sdl sensord session slang spl sse sse2 ssl tcpd truetype-fonts
type1-fonts udev userland_GNU video_cards_nvidia vorbis x264 xinerama xinetd
xml xorg xv xvmc zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #1 From Jakub Moc (RETIRED) 2006-10-27 15:48:09 0000 -------
Don't restrict bugs without any reason. Just leave the checkboxes alone.

------- Comment #2 From Jakub Moc (RETIRED) 2006-10-27 15:48:31 0000 -------
Reopen with a backtrace:

http://www.gentoo.org/proj/en/qa/backtraces.xml

------- Comment #3 From Ross Dougherty 2006-10-27 18:19:35 0000 -------
Created an attachment (id=100630) [edit]
backtrace

# gdb /usr/bin/gocr
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) set args -i /usr/kde/3.5/share/wallpapers/blue-bend.jpg
(gdb) run
Starting program: /usr/bin/gocr -i /usr/kde/3.5/share/wallpapers/blue-bend.jpg

Program received signal SIGSEGV, Segmentation fault.
0xb7f1c865 in pnm_readpaminit (file=0x80a2050, pamP=0xbff84688, size=304) at
libpam.c:783
783     libpam.c: No such file or directory.
        in libpam.c
(gdb) bt full
#0  0xb7f1c865 in pnm_readpaminit (file=0x80a2050, pamP=0xbff84688, size=304)
at libpam.c:783
No locals.
#1  0x0809a8fe in readpgm (name=0xbff8bb53
"/usr/kde/3.5/share/wallpapers/blue-bend.jpg", p=0xbff84828, vvv=0) at
pnm.c:139
        fp = (FILE *) 0x80a2050
        pip = 0x809f799 "djpeg -gray -pnm"
        magic1 = <value optimized out>
        magic2 = <value optimized out>
        i = <value optimized out>
        j = <value optimized out>
        sample = <value optimized out>
        minv = <value optimized out>
        maxv = <value optimized out>
        inpam = {size = 304, len = 304, file = 0x80a2050, format = 20533,
plainformat = 0, height = 1024, width = 1280, depth = 1, maxval = 255,
  bytes_per_sample = 3086313584,
  tuple_type = "GRAYSCALE\000

------- Comment #4 From Ross Dougherty 2006-10-27 18:19:35 0000 -------
Created an attachment (id=100630) [edit]
backtrace

# gdb /usr/bin/gocr
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) set args -i /usr/kde/3.5/share/wallpapers/blue-bend.jpg
(gdb) run
Starting program: /usr/bin/gocr -i /usr/kde/3.5/share/wallpapers/blue-bend.jpg

Program received signal SIGSEGV, Segmentation fault.
0xb7f1c865 in pnm_readpaminit (file=0x80a2050, pamP=0xbff84688, size=304) at
libpam.c:783
783     libpam.c: No such file or directory.
        in libpam.c
(gdb) bt full
#0  0xb7f1c865 in pnm_readpaminit (file=0x80a2050, pamP=0xbff84688, size=304)
at libpam.c:783
No locals.
#1  0x0809a8fe in readpgm (name=0xbff8bb53
"/usr/kde/3.5/share/wallpapers/blue-bend.jpg", p=0xbff84828, vvv=0) at
pnm.c:139
        fp = (FILE *) 0x80a2050
        pip = 0x809f799 "djpeg -gray -pnm"
        magic1 = <value optimized out>
        magic2 = <value optimized out>
        i = <value optimized out>
        j = <value optimized out>
        sample = <value optimized out>
        minv = <value optimized out>
        maxv = <value optimized out>
        inpam = {size = 304, len = 304, file = 0x80a2050, format = 20533,
plainformat = 0, height = 1024, width = 1280, depth = 1, maxval = 255,
  bytes_per_sample = 3086313584,
  tuple_type = "GRAYSCALE\000ô·`Gø¿
hõ·\002\000\000\000\b¬ó·\001\000\000\000\000\000\000\000\001", '\0'
<repeats 39 times>, " Gø¿Àfõ·¡\207\004\b\000\000\000\001²\232«\a",
'\0' <repeats 56 times>,
"\204sä·\000\000\000\000Ä\231ä·\000\000\000\000\000\000\000\000ô\037ð·lúÞ·p¦ó·¼_õ·Àfõ·\001\000\000\000°Gø¿\031\203ô·phõ·\b¬ó·\001\000\000\000\001\000\000\000\000\000\000\000¡\207\004\b\032\000\000\000\000\000\000\000H\021\n\bp\000\000\000S»ø¿S»ø¿\000\000\000",
  allocation_depth = 0, comment_p = 0xb7f4d800}
        tuplerow = <value optimized out>
        __PRETTY_FUNCTION__ = "readpgm"
#2  0x0809bd47 in main (argn=3, argv=0xbff8a994) at gocr.c:284
        job = {src = {fname = 0xbff8bb53
"/usr/kde/3.5/share/wallpapers/blue-bend.jpg", p = {p = 0x0, x = 0, y = 0, bpp
= 0}}, tmp = {init_time = {
      tv_sec = 0, tv_usec = 0}, ppo = {p = 0x0, x = 0, y = 0, bpp = 0}, n_run =
0, dblist = {header = 0x0, tail = 0x0, fix = 0x0, current = 0x0, n = 0,
      level = -1}}, res = {boxlist = {header = 0x0, tail = 0x0, fix = 0x0,
current = 0x0, n = 0, level = -1}, linelist = {header = 0x0, tail = 0x0,
      fix = 0x0, current = 0x0, n = 0, level = -1}, lines = {num = 0, dy = 0,
m1 = {0 <repeats 1024 times>}, m2 = {0 <repeats 1024 times>}, m3 = {
        0 <repeats 1024 times>}, m4 = {0 <repeats 1024 times>}, x0 = {0
<repeats 1024 times>}, x1 = {0 <repeats 347 times>, -1210306560, -1074225544,
        -1208655940, -1210159044, -1208739426, -1210159044, 0, 68, 2066, 6,
139264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143360, 140976, 140976, 0, 5, 143360,
        151552, 147516, 147584, 139264, 3, -1074225416, -1208685823,
-1074224932, -1208739872, -1208655940, 0, -1208769568, -1074225472,
-1208655940,
        -1208768288, 4, -1074225456, -1208685499, 8, 15, -1208655940,
-1074225380, -1208724828, -1208767664, -1208768288, 15, 1, -1208964723,
-1208768288,
        -1208708855, -1210294714, -1208768320, -1208655940, -1208768912,
-1208973000, -1074224748, -1208733842, -1210294714, -1208964679, -1208769568,
        -1074225080, -1208737757, 6, -1210294714, 0, 0, -1208655872, 0,
-1208654144, 0, -1208768272, -1208768928, 4, -1074225308, -1208685499,
-1208964679,
        -1074225520, 10, -1208655872, -1074225568, -1074224968, 6, -1208964723,
3, -1074225372, -1208768272, -1074224964, -1074224912, -1208708855,
        -1210084384, -1208764888, -1208655940, -1208655104, -1074223796,
-1074224592, -1208733842, -1208964719, -1210158976, 771, 0, -1208730161,
        -1074225544, -1210084384, 147584, 771, -1208655872, 0, 426081, 0,
-1208768912, 0, 0, 0, 0, 0, 154476, 0, 4096, 312, 0, 1159808015, 0,
-1208708855,
        -1208964713, -1208768320, -1208655940, -1208768912, -1208973000,
-1074224456, -1208733842, -1208964713, -1208964679, -1208655940, 7,
-1208769568,
        -1074224428, -1208964713, -1208768288, -1208769568, -1208655872, 0,
-1074224452, 0, -1208769568, 426076, -1208675231, -1208655872, 0, -1208964679,
        0, -1208769568, -1208653744, 17974396, 0, 6, -1210084370, 0, 10,
-1208786815, 1154618950, 0, 6, -1208653744, 512, 1179403647, 65793, 0, 0,
196611,
        1, 13296, 52, 153236, 0, 2097204, 2621450, 1966111, 6, 52, 52, 52, 320,
320...}}, avX = 5, avY = 8, sumX = 24641422, sumY = 0, numC = 0}, cfg = {
    cs = 0, spc = 0, mode = 0, dust_size = -1, only_numbers = 0, verbose = 0,
out_format = ISO8859_1, lc = 0x809dc3e "_", db_path = 0x0, cfilter = 0x0}}
(gdb)

------- Comment #5 From Ross Dougherty 2006-10-27 18:22:42 0000 -------
Backtrace posted

------- Comment #6 From Alexandre Buisse (RETIRED) 2006-10-28 19:53:46 0000 -------
Which test image did you use, so I can try to reproduce it?

------- Comment #7 From Ross Dougherty 2006-10-28 20:18:09 0000 -------
(In reply to comment #5)
> Which test image did you use, so I can try to reproduce it?

It didn't seem to matter, I just chose a few at random from locate .jpg. As you
can see in the backtrace I used  /usr/kde/3.5/share/wallpapers/blue-bend.jpg
for one of them.

I was able to reproduce this on 3 different Gentoo installs.

------- Comment #8 From Alexandre Buisse (RETIRED) 2006-10-29 04:26:51 0000 -------
I haven't been able to reproduce it with the same image file.

netpbm:           10.36.0[14:08:12 10/08/06][-svga jpeg tiff png xml zlib]
gocr:           0.41[20:01:43 09/07/06][gtk -doc]


In your first comment, the emerge command says 'U', which means that you do not
have netpbm-10.36.0 yet, are you sure that it is this version that you are
having problems with?

------- Comment #9 From Ross Dougherty 2006-10-29 17:42:46 0000 -------
(In reply to comment #7)
> I haven't been able to reproduce it with the same image file.
> netpbm:           10.36.0[14:08:12 10/08/06][-svga jpeg tiff png xml zlib]
> gocr:           0.41[20:01:43 09/07/06][gtk -doc]
> In your first comment, the emerge command says 'U', which means that you do not
> have netpbm-10.36.0 yet, are you sure that it is this version that you are
> having problems with?

Yes, definitely.

The following is all I did on a system without it installed to reproduce the
error:
~ # echo "media-libs/netpbm ~x86" >> /etc/portage/package.keywords
~ # emerge -pv netpbm gocr
[ebuild  N    ] media-libs/urt-3.1b-r1  USE="gif -X -gs -tiff" 0 kB
[ebuild  N    ] media-libs/jbigkit-1.6-r1  0 kB
[ebuild  N    ] media-libs/jasper-1.701.0  USE="jpeg -opengl" 0 kB
[ebuild  N    ] media-libs/netpbm-10.36.0  USE="jpeg png xml zlib -svga -tiff"
0 kB
[ebuild  N    ] app-text/gocr-0.40-r2  USE="-doc -gtk" 0 kB
~ # emerge netpbm gocr
~ # gocr -i /var/www/mail/themes/horde/graphics/mobile/display.jpg
Segmentation fault

------- Comment #10 From Alexandre Buisse (RETIRED) 2006-10-29 22:50:28 0000 -------
Then I can definitely not reproduce it, I'm afraid. I'll ask someone to try on
an amd64 system.
Can you provide a full log of emerging both netpbm and gocr and a fresh system,
please?

------- Comment #11 From Ross Dougherty 2006-10-29 23:07:34 0000 -------
(In reply to comment #9)
> Then I can definitely not reproduce it, I'm afraid. I'll ask someone to try on
> an amd64 system.
> Can you provide a full log of emerging both netpbm and gocr and a fresh system,
> please?

None of my systems are running amd64, they're all i686.

One is running stable with CFLAGS="-mtune=athlon-xp -O3 -pipe
-fomit-frame-pointer".
Another is running stable with CFLAGS="-march=k8 -O2 -pipe
-fomit-frame-pointer", and the last is running unstable also with
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"

------- Comment #12 From Ross Dougherty 2006-10-30 00:54:12 0000 -------
Created an attachment (id=100766) [edit]
full log of netpbm and gocr emerge

------- Comment #13 From Ross Dougherty 2006-10-30 01:16:37 0000 -------
Created an attachment (id=100767) [edit]
full log of netpbm-10.36.0 and gocr emerge

I just realized I had installed netpbm-10.34 for the previous log, so here's
one with netpbm-10.36.0.

------- Comment #14 From Christian Schmidt 2006-11-20 17:34:39 0000 -------
The bug is in gocr's readpgm function. It passes a not cleaned struct pam to
netpbm. I'll attach a patch to gocr-0.41 (please see bug 145624 for another
necessary patch if you want to bump the version).

------- Comment #15 From Christian Schmidt 2006-11-20 17:36:27 0000 -------
Created an attachment (id=102438) [edit]
Fixes calls to pbpamread in netpbm with dangling pointers

------- Comment #16 From Christian Schmidt 2006-11-21 02:38:27 0000 -------
Patch for 0.41 has been submitted to & confirmed accepted by upstream.

------- Comment #17 From Alan Swanson 2006-12-06 10:32:07 0000 -------
Part the patch to api/src/image.c doesn't appear to have been applied to gogr
0.42. Unfortunately CVS commits for gogr appear to be being done in chunks
prior to each release so not sure whether it is applied or not. Might also be
dead code too.

------- Comment #18 From Jakub Moc (RETIRED) 2007-03-30 08:06:17 0000 -------
Can you still reproduce this w/ 0.43?

------- Comment #19 From Ross Dougherty 2007-03-30 08:56:45 0000 -------
(In reply to comment #18)
> Can you still reproduce this w/ 0.43?

No, I just tried and it appears to be fixed.

I reproduced the original problem first (with gocr-0.40-r2) and then upgraded
to gocr-0.43 which then ran successfully without segfaulting.

------- Comment #20 From Jakub Moc (RETIRED) 2007-04-04 09:26:18 0000 -------
(In reply to comment #19)
> > Can you still reproduce this w/ 0.43?
> No, I just tried and it appears to be fixed.

Fixed then, just needs to be stabilized.

------- Comment #21 From Jakub Moc (RETIRED) 2007-06-28 17:58:16 0000 -------
*** Bug 183553 has been marked as a duplicate of this bug. ***

------- Comment #22 From Jakub Moc (RETIRED) 2007-06-28 17:59:35 0000 -------
Doesn't go anywhere, CCing arches.

------- Comment #23 From Simon Cooper 2007-06-28 19:29:18 0000 -------
AMD64: already tested (bug 183553), feel free to commit

------- Comment #24 From Christoph Mende 2007-06-29 12:34:43 0000 -------
amd64 done, thanks Simon

------- Comment #25 From Christian Faulhammer 2007-06-29 16:10:09 0000 -------
x86 stable

------- Comment #26 From Lars Weiler (RETIRED) 2007-06-29 22:13:00 0000 -------
ppc was already stable.

------- Comment #27 From Christian Schmidt 2007-08-06 13:51:02 0000 -------
Everyone but alpha has this stable; can we close this bug? trying to clear my
bug list ;)

First Last Prev Next    No search results available      Search page      Enter new bug