xview does not build correctly on amd64, causing treetool crashes on startup

Bug #137847 reported by Benjamin Redelings
8
Affects Status Importance Assigned to Milestone
xview (Debian)
Fix Released
Unknown
xview (Ubuntu)
Triaged
Low
Unassigned

Bug Description

When I run treetool, it immediately crashes with a segfault before doing anything.

GDB shows that it is crashing inside libxview, its graphics toolkit.

Revision history for this message
In , Kaare Hviid (ukh-id) wrote : patch does NOT work on ia64

Thanks to Dan Frazier, I now know that my amd64 patch does NOT
work on ia64. Many thanks to Dan Frazier for prompt testing and
patiently answering my questions!
    Also, even though olvwm does work on amd64, there clearly are
issues that I don't understand. Until I understand why it doesn't
work correctly on alpha or when compiled with gcc-3.3 -O2, I *suggest*
that amd64 is dropped from the Architecture line of olvwm in my patch.

-ukh

Revision history for this message
Benjamin Redelings (benjamin-redelings) wrote : treetool crashes on start

Binary package hint: treetool

When I run treetool, it immediately crashes with a segfault before doing anything.

GDB shows that it is crashing inside libxview, its graphics toolkit.

Revision history for this message
Barry deFreese (bddebian) wrote :

I cannot reproduce this in Gutsy. What version of treetool and Ubuntu are you running? Thanks.

Changed in treetool:
status: New → Incomplete
Revision history for this message
Benjamin Redelings (benjamin-redelings) wrote :

I am using current gutsy, with treetool 2.0.2a-4.

I am running Ubuntu on an AMD64 machine, which might be the problem.

It is a Lenovo Thinkpad T61

Revision history for this message
Benjamin Redelings (benjamin-redelings) wrote :

This problem still occurs on Hardy (latest).

The program crashes with these messages:
 System warning: No such file or directory, call to alloc function returned NULL pointer
 Segmentation fault (core dumped)

Using strace shows that it is trying to access
/usr/openwin/lib/locale/C/LC_MESSAGES/SUNW_WST_LIBXVIEW_3200.mo

However, there is no directory /usr/openwin/lib/local/C . There are only en_??.utf8 directories. Under LC_MESSAGES, there is no SUNW_WST_LIBXVIEW_3200.mo file. There is only SYS_LC_MESSAGES.

Here is an strace result:

read(4, "# Locale name alias data base.\n#"..., 4096) = 2586
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2aac8fdc0000, 4096) = 0
open("/usr/lib/locale/iso_8859_1/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/usr/lib/locale/iso/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or dire
ctory)
open("/usr/share/locale-langpack/iso_8859_1/LC_CTYPE", O_RDONLY) = -1 ENOENT (No
 such file or directory)
open("/usr/share/locale-langpack/iso/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such f
ile or directory)
select(4, [3], [3], NULL, NULL) = 1 (out [3])
writev(3, [{"\20\1\5\0\f\0\0\0JOURNAL_SYNC", 20}], 1) = 20
select(4, [3], [], NULL, NULL) = 1 (in [3])
read(3, "\1\331\7\0\0\0\0\0\0\0\0\0\0\0\0\0pm,\0\0\0\0\0\300\17"..., 4096) = 32
read(3, 0x656094, 4096) = -1 EAGAIN (Resource temporarily unavailable)
mmap(NULL, 375345781936128, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
brk(0x155600068b000) = 0x671000
mmap(NULL, 375345782067200, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
mmap(NULL, 134217728, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x2aac91c5a000
munmap(0x2aac91c5a000, 37380096) = 0
munmap(0x2aac98000000, 29728768) = 0
mprotect(0x2aac94000000, 135168, PROT_READ|PROT_WRITE) = 0
mmap(NULL, 375345781936128, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
stat("/usr/openwin/lib/locale/C/LC_MESSAGES/SUNW_WST_LIBXVIEW_3200.mo", 0x7fff1acfcd80) = -1 ENOENT (No such file or directory)
write(2, "System warning: No such file or "..., 88System warning: No such file or directory, call to alloc function returned NULL pointer
) = 88
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++

Let me know what else you need to debug this!

-BenRI

Revision history for this message
Charles Plessy (plessy) wrote :

On Debian, treetool is not built on amd64 because the xview packages on which it depends are not built for amd64 either (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=320155). I tried to build them on Lenny, built treetool on them, and reproduced the segmentation fault. Treetool can probably not work on amd64 without fixing the xview packages.

Have a nice day,

--
Charles Plessy
Tsurumi, Kanagawa, Japan

Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

The cause of this segfault is in xview, so assigning the bug accordingly. And link the debian bug which discusses the fact that xview will not build on amd64 properly.

Changed in treetool:
importance: Undecided → Low
status: Incomplete → Triaged
description: updated
Changed in xview:
status: Unknown → New
Revision history for this message
Colin Watson (cjwatson) wrote :

I've regretfully removed the xview amd64 packages from Jaunty, since they're currently excluded from building due to this bug.

Revision history for this message
MarkG (movieman523) wrote :

I just tried building some old Xview code on Lucid x64 and it compiled fine but crashed the same way; it looks like a 32-bit/64-bit conversion issue because it's trying to mmap a huge amount of memory and then trying to print out an error message and crashing. I'm guessing it's unlikely to ever be fixed if the Debian messages are anything to go by; making all the varargs code work in 64-bit could be hugely time-consuming.

Revision history for this message
Charles Plessy (plessy) wrote :

For the record, treetool was removed from the Debian unstable and testing branches, and will therefore not be part of future releases.

--
Charles Plessy
Debian Med packaging team
http://www.debian.org/devel/debian-med/
Tsurumi, Kanagawa, Japan

Changed in xview (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.