[Openmp-dev] orph_test_omp_parallel_copyin segfault

Jack Howarth via Openmp-dev openmp-dev at lists.llvm.org
Tue Dec 15 11:15:37 PST 2015


Jonathan,

I can reproduce the segfault with previously attached source files by
executing...

$ mkdir -p bin/c
$ mv omp_testsuite.h bin/c
$ mv orph_test_omp_parallel_copyin.c bin/c
$ clang-3.8 -fopenmp -O2 bin/c/orph_test_omp_parallel_copyin.c -o
bin/c/orph_test_omp_parallel_copyin
$ ./bin/c/orph_test_omp_parallel_copyin
######## OpenMP Validation Suite V 3.0a ######
## Repetitions:  20                       ####
## Loop Count :   1000                    ####
##############################################
Testing omp parallel copyin

Segmentation fault: 11

This failure also occurs when executing the
bin/c/orph_test_omp_parallel_copyin executable produced with...

$ clang-3.8 -fopenmp -O3 bin/c/orph_test_omp_parallel_copyin.c -o
bin/c/orph_test_omp_parallel_copyin

or

$ clang-3.8 -fopenmp -Os bin/c/orph_test_omp_parallel_copyin.c -o
bin/c/orph_test_omp_parallel_copyin

          Jack

On Tue, Dec 15, 2015 at 1:51 PM, Jack Howarth
<howarth.mailing.lists at gmail.com> wrote:
> Jonathan,
>       I am having trouble reproducing it outside of the
> OpenMP3.1_Validation Makefile framework. However, when executing
> 'make clean' and 'make ctest' using clang 3.8svn built against Xcode
> 7.2 on OS X 10.11.2, I have determined that ...
>
> CFLAGS = -fopenmp -lm -Os
> CFLAGS = -fopenmp -lm -O3
> CFLAGS = -fopenmp -lm -O2
>
> all will trigger the segfault in the resulting
> orph_test_omp_parallel_copyin test case whereas...
>
> CFLAGS = -fopenmp -lm -O1
> CFLAGS = -fopenmp -lm -O0
> CFLAGS = -fopenmp -lm -Os -g
> CFLAGS = -fopenmp -lm -O3 -g
> CFLAGS = -fopenmp -lm -O2 -g
> CFLAGS = -fopenmp -lm -O1 -g
> CFLAGS = -fopenmp -lm -O0 -g
>
> all suppress the problem. See
> https://llvm.org/bugs/show_bug.cgi?id=25820#c6 for a backtrace of the
> segfaulting orph_test_omp_parallel_copyin test case built at -fopenmp
> -O3.
>
>          Jack
> ps This problem doesn't exist when using clang 3.7.0 built under Xcode
> 7.2 on OS X 10.11.2 so it is a new regression in clang 3.8svn.
>
> On Tue, Dec 15, 2015 at 1:10 PM, Peyton, Jonathan L
> <jonathan.l.peyton at intel.com> wrote:
>> Jack,
>>
>> I wasn't able to replicate it at first go.  Can you tell me the OSX version, and perhaps the exact revision numbers for clang/llvm?
>>
>> -- Johnny
>>
>> -----Original Message-----
>> From: Jack Howarth [mailto:howarth.mailing.lists at gmail.com]
>> Sent: Friday, December 11, 2015 8:14 PM
>> To: Peyton, Jonathan L
>> Cc: openmp-dev (openmp-dev at lists.llvm.org)
>> Subject: Re: [Openmp-dev] orph_test_omp_parallel_copyin segfault
>>
>> Jonathan,
>>       The attached header omp_testsuite.h and orph_test_omp_parallel_copyin.c source file are required to reproduce the crash at any optimization level using -fopenmp.
>>                  Jack
>>
>> On Fri, Dec 11, 2015 at 6:12 PM, Peyton, Jonathan L <jonathan.l.peyton at intel.com> wrote:
>>> Are you using trunk versions of both clang and libomp?  I only use the check-libomp target now in CMake and don't see any problems with the trunk version of libomp on Darwin.  Can you send me the source file for orph_test_omp_parallel_copyin.c and I'll take a look at it.
>>>
>>> -- Johnny
>>>
>>> -----Original Message-----
>>> From: Openmp-dev [mailto:openmp-dev-bounces at lists.llvm.org] On Behalf
>>> Of Jack Howarth via Openmp-dev
>>> Sent: Friday, December 11, 2015 4:17 PM
>>> To: openmp-dev (openmp-dev at lists.llvm.org)
>>> Subject: [Openmp-dev] orph_test_omp_parallel_copyin segfault
>>>
>>> Is anyone else seeing segfaults in the orph_test_omp_parallel_copyin
>>> test case from the OpenMP3.1_Validation test suite? On
>>> x86_64-apple-darwin15, todays trunk produces,,,
>>>
>>> Jacks-Mac-Pro:c howarth$ clang-3.8 -fopenmp -O0 -g
>>> orph_test_omp_parallel_copyin.c -o orph_test_omp_parallel_copyin
>>> Jacks-Mac-Pro:c howarth$ lldb ./orph_test_omp_parallel_copyin
>>> (lldb) target create "./orph_test_omp_parallel_copyin"
>>> Current executable set to './orph_test_omp_parallel_copyin' (x86_64).
>>> (lldb) r
>>> Process 38235 launched: './orph_test_omp_parallel_copyin' (x86_64) ######## OpenMP Validation Suite V 3.0a ######
>>> ## Repetitions:  20                       ####
>>> ## Loop Count :   1000                    ####
>>> ##############################################
>>> Testing omp parallel copyin
>>>
>>> Process 38235 stopped
>>> * thread #1: tid = 0x17a2d4, 0x00007fff9ae780a5 libsystem_c.dylib`flockfile + 4, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x68)
>>>     frame #0: 0x00007fff9ae780a5 libsystem_c.dylib`flockfile + 4
>>> libsystem_c.dylib`flockfile:
>>> ->  0x7fff9ae780a5 <+4>:  movq   0x68(%rdi), %rdi
>>>     0x7fff9ae780a9 <+8>:  addq   $0x8, %rdi
>>>     0x7fff9ae780ad <+12>: popq   %rbp
>>>     0x7fff9ae780ae <+13>: jmp    0x7fff9aec1452            ; symbol
>>> stub for: pthread_mutex_lock
>>>
>>> which is the only regression observed in the ctest run of the test suite.
>>> _______________________________________________
>>> Openmp-dev mailing list
>>> Openmp-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev


More information about the Openmp-dev mailing list