vtk version 5.4.2-8ubuntu4 failed to build on armel

Bug #745843 reported by Steve Langasek
This bug report is a duplicate of:  Bug #774175: apt segfaults on armel in oneiric. Edit Remove
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binutils (Ubuntu)
New
Undecided
Richard Sandiford
vtk (Ubuntu)
Triaged
High
Unassigned

Bug Description

vtk version 5.4.2-8ubuntu4 failed to build on armel
Link to failed build: https://launchpad.net/ubuntu/+source/vtk/5.4.2-8ubuntu4/+buildjob/2343160

Direct link to the build log: https://launchpad.net/ubuntu/+source/vtk/5.4.2-8ubuntu4/+buildjob/2343160/+files/buildlog_ubuntu-natty-armel.vtk_5.4.2-8ubuntu4_FAILEDTOBUILD.txt.gz

This log snippet might be of interest, since it triggered the matcher 'Purging chroot-autobuild'.
Excerpt 4817 lines into the build log:

Linking CXX shared module ../bin/libvtkCommonPython.so
make[3]: Leaving directory `/build/buildd/vtk-5.4.2/Build'
[ 12%] Built target vtkCommonPython
make[3]: Entering directory `/build/buildd/vtk-5.4.2/Build'
[ 12%] Tcl Wrapping - generating vtkCommonTCLInit.cxx
[ 12%] Tcl Wrapping - generating vtkAbstractArrayTcl.cxx
Segmentation fault
make[3]: *** [Common/vtkAbstractArrayTcl.cxx] Error 139
make[3]: Leaving directory `/build/buildd/vtk-5.4.2/Build'
make[2]: *** [Common/CMakeFiles/vtkCommonTCL.dir/all] Error 2
make[2]: Leaving directory `/build/buildd/vtk-5.4.2/Build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/build/buildd/vtk-5.4.2/Build'
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
******************************************************************************
Build finished at 20110326-1848
FAILED [dpkg-buildpackage died]
Purging chroot-autobuild/build/buildd/vtk-5.4.2

Steve Langasek (vorlon)
Changed in vtk (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Dr. David Alan Gilbert (davidgil-uk) wrote :

Recreated on our friendly panda:

root@panda-01:/discs/more/daveg/apt/vtk-5.4.2/Build/Common# gdb ../bin/vtkWrapTcl
GNU gdb (GDB) 7.2-ubuntu
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 "arm-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /mnt/more/daveg/apt/vtk-5.4.2/Build/bin/vtkWrapTcl...done.

(gdb) r /mnt/more/daveg/apt/vtk-5.4.2/Common/vtkAmoebaMinimizer.h /mnt/more/daveg/apt/vtk-5.4.2/Wrapping/hints 1 /mnt/more/daveg/apt/vtk-5.4.2/Build/Common/vtkAmoebaMinimizerTcl.cxx
Starting program: /mnt/more/daveg/apt/vtk-5.4.2/Build/bin/vtkWrapTcl /mnt/more/daveg/apt/vtk-5.4.2/Common/vtkAmoebaMinimizer.h /mnt/more/daveg/apt/vtk-5.4.2/Wrapping/hints 1 /mnt/more/daveg/apt/vtk-5.4.2/Build/Common/vtkAmoebaMinimizerTcl.cxx

Program received signal SIGSEGV, Segmentation fault.
_IO_fwrite (buf=0x10fe8, size=1, count=10, fp=0x1) at iofwrite.c:43
43 iofwrite.c: No such file or directory.
        in iofwrite.c
(gdb) where
#0 _IO_fwrite (buf=0x10fe8, size=1, count=10, fp=0x1) at iofwrite.c:43
#1 0x00009ace in fprintf (fp=0x1, i=265, aType=435544, Id=0x22348 "h", <incomplete sequence \365\250>, count=435544) at /usr/include/bits/stdio2.h:98
#2 output_temp (fp=0x1, i=265, aType=435544, Id=0x22348 "h", <incomplete sequence \365\250>, count=435544) at /mnt/more/daveg/apt/vtk-5.4.2/Wrapping/vtkWrapTcl.c:145
#3 0x00aa17d0 in ?? ()
Cannot access memory at address 0x303
#4 0x00aa17d0 in ?? ()
Cannot access memory at address 0x303
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Revision history for this message
Dr. David Alan Gilbert (davidgil-uk) wrote :

this is confusing me a bit, as far as I can currently tell it fails in the 3rd call to outputFunction in the call to return_result - I don't believe it gets back from that call to return_result.

 p *currentFunction
$2 = {Name = 0xbac568 "IsA", NumberOfArguments = 1, ArrayFailure = 0, IsPureVirtual = 0, IsPublic = 1, IsProtected = 0, IsOperator = 0, HaveHint = 0, HintSize = 0, ArgTypes = {4867,
    0 <repeats 19 times>}, ArgCounts = {0 <repeats 20 times>}, ArgClasses = {0x0 <repeats 20 times>}, ReturnType = 4, ReturnClass = 0x0, Comment = 0x0,
  Signature = 0xbad5b0 "int IsA (const char *name);", IsLegacy = 0}

I can see it call fwrite for " char tempResult[1024];\n" and __fprintf_chk for
" sprintf(tempResult,\"%%i\",temp%i);\n"

but I'm not convinced it's getting to the fwrite for the final line of the Return ttype 4 section which is
" Tcl_SetResult(interp, tempResult, TCL_VOLATILE);\n"

(gcc has optimised a lot of the fprintf's to fwrite's)

Revision history for this message
Dr. David Alan Gilbert (davidgil-uk) wrote :

Seems to be thumb/arm confusion in the tail call to fwrite - stepping through it we end up in Thumb mode in the ARM bit of the plt.

RichardS calls it as a Linkerism.

Dave

Revision history for this message
Richard Sandiford (rsandifo) wrote :

Testing a fix.

Changed in binutils (Ubuntu):
assignee: nobody → Richard Sandiford (rsandifo)
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.