Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make check failure on ppc64 (big-endian) archi #427

Closed
michelmno opened this issue Apr 21, 2016 · 6 comments
Closed

make check failure on ppc64 (big-endian) archi #427

michelmno opened this issue Apr 21, 2016 · 6 comments

Comments

@michelmno
Copy link

make check failure on ppc64 (big-endian) archi as reported on openSUSE build process (1)
The related log refers to a segmentation fault problem.
There is no such error if build on ppc64le (little-endian)

Segmentation fault while executing test_formats.sh reported for version 8.2.2 tarball
If trial done with last 8.3.0 tarball then still have Segmentation fault but on a different test_seq.sh

(1) https://build.opensuse.org/package/show/openSUSE:Factory:PowerPC/vips

===
...
[  295s] FAIL: test_formats.sh
[  317s] PASS: test_seq.sh
[  317s] PASS: test_threading.sh
[  317s] ============================================================================
[  317s] Testsuite summary for vips 8.2.2
[  317s] ============================================================================
[  317s] # TOTAL: 4
[  317s] # PASS:  3
[  317s] # SKIP:  0
[  317s] # XFAIL: 0
[  317s] # FAIL:  1
[  317s] # XPASS: 0
[  317s] # ERROR: 0
[  317s] ============================================================================
[  317s] See test/test-suite.log
[  317s] Please report to vipsip@jiscmail.ac.uk
[  317s] ============================================================================
===
=== 
abuild@twppc64:~/rpmbuild/BUILD/vips-8.2.2/test> tail -n15 test-suite.log
./test_formats.sh: line 23: 26888 Segmentation fault      (core dumped) $vips bandjoin "$image $tmp/mono.v" $tmp/t1.v
vips warning: VipsImage: unable to read data for "/home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-26838/t1.v", file has been truncated
vips_window_set: unable to read data for "/home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-26838/t1.v", file has been truncated
vips_window_set: unable to read data for "/home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-26838/t1.v", file has been truncated
vips_window_set: unable to read data for "/home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-26838/t1.v", file has been truncated
vips_window_set: unable to read data for "/home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-26838/t1.v", file has been truncated
vips_window_set: unable to read data for "/home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-26838/t1.v", file has been truncated
vips_window_set: unable to read data for "/home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-26838/t1.v", file has been truncated
vips_window_set: unable to read data for "/home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-26838/t1.v", file has been truncated
vips_window_set: unable to read data for "/home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-26838/t1.v", file has been truncated
testing IMG_4618.jpg v ... ./test_formats.sh: line 28: 26970 Segmentation fault      (core dumped) $vips copy $tmp/t1.$format $tmp/back.v
read from  failed
FAIL test_formats.sh (exit status: 1)
===

(2) with tarball 8.3.0

===
abuild@twppc64:~/rpmbuild/BUILD/vips-8.3.0/test> cat test-suite.log
...
FAIL: test_seq.sh
=================
building huge test PNG image ... ok
testing vipsthumbnail ... ./test_seq.sh: line 16: 14409 Segmentation fault      (core dumped) $vipsthumbnail $huge -o $tmp/x.png
vipsthumbnail failed in basic mode
FAIL test_seq.sh (exit status: 1)
===
@jcupitt
Copy link
Member

jcupitt commented Apr 21, 2016

Hi @michelmno, would it be possible to get a backtrace of the segv?

@michelmno
Copy link
Author

for the failure on 8.2.2

(gdb) r bandjoin "/home/abuild/rpmbuild/BUILD/vips-8.2.2/test/images/IMG_4618.jpg /home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-19525/mono.v" /home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-19525/t1.v
Starting program: /home/abuild/rpmbuild/BUILD/vips-8.2.2/tools/.libs/vips bandjoin "/home/abuild/rpmbuild/BUILD/vips-8.2.2/test/images/IMG_4618.jpg /home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-19525/mono.v" /home/abuild/rpmbuild/BUILD/vips-8.2.2/test/tmp-19525/t1.v
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x3fffb460ee90 (LWP 19632)]
[New Thread 0x3fffb3e0ee90 (LWP 19633)]
[New Thread 0x3fffb33fee90 (LWP 19634)]
[New Thread 0x3fffb2bfee90 (LWP 19635)]
[New Thread 0x3fffb219ee90 (LWP 19636)]
[New Thread 0x3fffb199ee90 (LWP 19637)]
[New Thread 0x3fffb119ee90 (LWP 19638)]
[New Thread 0x3fffb099ee90 (LWP 19639)]
[New Thread 0x3fffb019ee90 (LWP 19640)]
[New Thread 0x3fffaf99ee90 (LWP 19641)]
[New Thread 0x3fffaf19ee90 (LWP 19642)]
[New Thread 0x3fffae99ee90 (LWP 19643)]
[New Thread 0x3fffae19ee90 (LWP 19644)]
[New Thread 0x3fffad99ee90 (LWP 19645)]
[New Thread 0x3fffad19ee90 (LWP 19646)]
[New Thread 0x3fffac99ee90 (LWP 19647)]
[New Thread 0x3fffac19ee90 (LWP 19648)]
[New Thread 0x3fffab99ee90 (LWP 19649)]
[Thread 0x3fffb199ee90 (LWP 19637) exited]
[Thread 0x3fffb219ee90 (LWP 19636) exited]
[Thread 0x3fffad99ee90 (LWP 19645) exited]
[Thread 0x3fffb099ee90 (LWP 19639) exited]
[Thread 0x3fffad19ee90 (LWP 19646) exited]
[Thread 0x3fffb019ee90 (LWP 19640) exited]
[Thread 0x3fffac99ee90 (LWP 19647) exited]
[Thread 0x3fffb119ee90 (LWP 19638) exited]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x3fffb33fee90 (LWP 19634)]
0x00003fffb7c13acc in vips_byteswap_gen (or=0x1064f450, seq=0x1064f500, a=<optimized out>, b=<optimized out>, stop=<optimized out>) at byteswap.c:147
147                     swap( p, q, r->width, im );
(gdb) bt
#0  0x00003fffb7c13acc in vips_byteswap_gen (or=0x1064f450, seq=0x1064f500, a=<optimized out>, b=<optimized out>, stop=<optimized out>) at byteswap.c:147
#1  0x00003fffb7ceb730 in vips_region_generate (reg=0x1064f450) at region.c:1276
#2  0x00003fffb7cec8c0 in vips_region_fill (reg=0x1064f450, r=<optimized out>, fn=@0x3fffb7d9b478: 0x3fffb7ceb6d0 <vips_region_generate>, a=0x0) at region.c:897
#3  0x00003fffb7cedb64 in vips_region_prepare (reg=0x1064f450, r=0x1064f3f8) at region.c:1345
#4  0x00003fffb7cd90b0 in vips_image_write_gen (or=0x1064f3a0, seq=<optimized out>, a=<optimized out>, b=<optimized out>, stop=<optimized out>) at image.c:2401
#5  0x00003fffb7ceb730 in vips_region_generate (reg=0x1064f3a0) at region.c:1276
#6  0x00003fffb7cec8c0 in vips_region_fill (reg=0x1064f3a0, r=<optimized out>, fn=@0x3fffb7d9b478: 0x3fffb7ceb6d0 <vips_region_generate>, a=0x0) at region.c:897
#7  0x00003fffb7cedb64 in vips_region_prepare (reg=0x1064f3a0, r=0x1064f088) at region.c:1345
#8  0x00003fffb7c152a0 in vips_copy_gen (or=0x1064f030, seq=<optimized out>, a=<optimized out>, b=<optimized out>, stop=<optimized out>) at copy.c:139
#9  0x00003fffb7ceb730 in vips_region_generate (reg=0x1064f030) at region.c:1276
#10 0x00003fffb7cec8c0 in vips_region_fill (reg=0x1064f030, r=<optimized out>, fn=@0x3fffb7d9b478: 0x3fffb7ceb6d0 <vips_region_generate>, a=0x0) at region.c:897
#11 0x00003fffb7cedb64 in vips_region_prepare (reg=0x1064f030, r=0x10631ea8) at region.c:1345
#12 0x00003fffb7c269d0 in vips_bandary_gen (or=0x10631e50, seq=0x1064b7d0, a=<optimized out>, b=0x105d3950, stop=<optimized out>) at bandary.c:96
#13 0x00003fffb7ceb730 in vips_region_generate (reg=0x10631e50) at region.c:1276
#14 0x00003fffb7cec8c0 in vips_region_fill (reg=0x10631e50, r=<optimized out>, fn=@0x3fffb7d9b478: 0x3fffb7ceb6d0 <vips_region_generate>, a=0x0) at region.c:897
#15 0x00003fffb7cedb64 in vips_region_prepare (reg=0x10631e50, r=0x10631df8) at region.c:1345
#16 0x00003fffb7cd90b0 in vips_image_write_gen (or=0x10631da0, seq=<optimized out>, a=<optimized out>, b=<optimized out>, stop=<optimized out>) at image.c:2401
#17 0x00003fffb7ceb730 in vips_region_generate (reg=0x10631da0) at region.c:1276
#18 0x00003fffb7ced098 in vips_region_prepare_to_generate (reg=0x10631da0, dest=0x1061d160, r=0x3fffb33fe1f0, x=<optimized out>, y=<optimized out>) at region.c:1402
#19 0x00003fffb7cede0c in vips_region_prepare_to (reg=0x10631da0, dest=0x1061d160, r=<optimized out>, x=0, y=0) at region.c:1544
#20 0x00003fffb7ce30a4 in wbuffer_work_fn (state=0x1064b800, a=<optimized out>) at sinkdisc.c:415
#21 0x00003fffb7ceed90 in vips_thread_main_loop (thr=0x10644800) at threadpool.c:573
#22 0x00003fffb7ceed90 in vips_thread_main_loop (a=0x10644800) at threadpool.c:601
#23 0x00003fffb7cee9a8 in vips_thread_run (data=0x10644890) at threadpool.c:173
#24 0x00003fffb799dbb8 in  () at /usr/lib64/libglib-2.0.so.0
#25 0x00003fffb789bf80 in .start_thread () at /lib64/libpthread.so.0
#26 0x00003fffb77c48cc in .__clone () at /lib64/libc.so.6
(gdb) 

@michelmno
Copy link
Author

for version 8.3.0 the backtrace is not as explicit as above :(

abuild@twppc64:~/rpmbuild/BUILD/vips-8.3.0/test> ./test_seq.sh
building huge test PNG image ... ok
testing vipsthumbnail ... vipsthumbnail:vipsthumbnail:93: libtool wrapper (GNU libtool) 2.4.6
vipsthumbnail:vipsthumbnail:114: newargv[0]: /home/abuild/rpmbuild/BUILD/vips-8.3.0/tools/.libs/vipsthumbnail
vipsthumbnail:vipsthumbnail:104: newargv[1]: /home/abuild/rpmbuild/BUILD/vips-8.3.0/test/tmp-11740/huge.png
vipsthumbnail:vipsthumbnail:104: newargv[2]: -o
vipsthumbnail:vipsthumbnail:104: newargv[3]: /home/abuild/rpmbuild/BUILD/vips-8.3.0/test/tmp-11740/x.png
GNU gdb (GDB; openSUSE Factory) 7.10.1
...
(gdb) b main
Breakpoint 1 at 0x10001fa0: file vipsthumbnail.c, line 671.
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/abuild/rpmbuild/BUILD/vips-8.3.0/tools/.libs/vipsthumbnail /home/abuild/rpmbuild/BUILD/vips-8.3.0/test/tmp-11740/huge.png -o /home/abuild/rpmbuild/BUILD/vips-8.3.0/test/tmp-11740/x.png
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, main (argc=4, argv=0x3ffffffff848) at vipsthumbnail.c:671
671     {
(gdb) n
674             GError *error = NULL;
...
724                     VipsObject *process = VIPS_OBJECT( vips_image_new() );
(gdb) 
726                     if( thumbnail_process( process, argv[i] ) ) {
(gdb) 


[New Thread 0x3fffb45fee90 (LWP 11865)]
[New Thread 0x3fffb3dfee90 (LWP 11866)]
[Thread 0x3fffb3dfee90 (LWP 11866) exited]
[Thread 0x3fffb45fee90 (LWP 11865) exited]
[New Thread 0x3fffb3dfee90 (LWP 11867)]
[New Thread 0x3fffb45fee90 (LWP 11868)]
[Thread 0x3fffb45fee90 (LWP 11868) exited]
[Thread 0x3fffb3dfee90 (LWP 11867) exited]
[New Thread 0x3fffb45fee90 (LWP 11869)]
[New Thread 0x3fffb3dfee90 (LWP 11870)]
[New Thread 0x3fffb35eee90 (LWP 11871)]
[New Thread 0x3fffb2deee90 (LWP 11872)]
...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x3fffb2deee90 (LWP 11872)]
0x00003fffb4610594 in ?? ()
(gdb)
...
Cannot find bounds of current function
(gdb) bt
#0  0x00003fffb4610594 in  ()
#1  0x00003fffb6c36c2c in orc_executor_run (ex=0x3fffb2deb2e0) at orcexecutor.c:51
#2  0x00003fffb2deabf0 in  ()

@jcupitt
Copy link
Member

jcupitt commented Apr 21, 2016

Hi again @michelmno, thanks for the traces.

Could you try the 8.3 make check with orc disabled? Orc has had a series of memory corruption bugs and it looks like this might be another. I've found 0.4.25 stable myself, but who knows.

@jcupitt
Copy link
Member

jcupitt commented Jun 7, 2016

You can disable Orc with:

export VIPS_NOVECTOR=1

before running tests, or perhaps try a newer liborc.

@jcupitt
Copy link
Member

jcupitt commented Jan 4, 2017

I'll close. Please reopen if this problem is not resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants