public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/61798] New: OpenMP exit code 155, profiling related?
@ 2014-07-14 10:16 kessler at iag dot uni-stuttgart.de
  2015-01-29  9:37 ` [Bug libgomp/61798] " jakub at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: kessler at iag dot uni-stuttgart.de @ 2014-07-14 10:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61798

            Bug ID: 61798
           Summary: OpenMP exit code 155, profiling related?
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kessler at iag dot uni-stuttgart.de
                CC: jakub at gcc dot gnu.org

I have got an OpenMP program (written in C++) up and running. However, when
running my test suite of 43 cases for profiling (with -pg, it's CFD flow solver
running in batch mode), some (usually 2-3) cases fail with an exit code of 155
-after- full completion of my code (that is, after return 0; in main). This
only happens if several codes run in parallel on the same machine (this
capability of the test script is from before the OpenMP parallelisation
effort), and even then not always, and with varying cases, so I am quite
confident it is not primarily a bug in my code.
>From scanning the output I have seen a message from the shell, apparently
catching a SIGPROF, which seems reasonable as I have profiling enabled, but
probably should not propagate outside the executable. I have never seen this
problem with profiling in non-OpenMP mode.
Unfortunately I can not share my code, but I think it is not related to the
user code anyway, but perhaps some race condition in the interaction between
profiling and OpenMP at program exit?

Thanks for shedding some light on this bizarre situation.

Ciao,

    Manuel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgomp/61798] OpenMP exit code 155, profiling related?
  2014-07-14 10:16 [Bug libgomp/61798] New: OpenMP exit code 155, profiling related? kessler at iag dot uni-stuttgart.de
@ 2015-01-29  9:37 ` jakub at gcc dot gnu.org
  2015-01-29  9:41 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-29  9:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61798

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Exit code 155 is indeed that the process has been killed by SIGPROF signal.
Without a testcase there is hard to say anything more on this, libgomp
certainly doesn't install a signal handler for this signal, nor generate it,
nor do anything else with it, so I bet you'd get exactly the same situation if
you just used pthread_create yourself instead of OpenMP.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgomp/61798] OpenMP exit code 155, profiling related?
  2014-07-14 10:16 [Bug libgomp/61798] New: OpenMP exit code 155, profiling related? kessler at iag dot uni-stuttgart.de
  2015-01-29  9:37 ` [Bug libgomp/61798] " jakub at gcc dot gnu.org
@ 2015-01-29  9:41 ` pinskia at gcc dot gnu.org
  2015-01-29 14:43 ` kessler at iag dot uni-stuttgart.de
  2021-12-29  7:41 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-01-29  9:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61798

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What target is this on?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgomp/61798] OpenMP exit code 155, profiling related?
  2014-07-14 10:16 [Bug libgomp/61798] New: OpenMP exit code 155, profiling related? kessler at iag dot uni-stuttgart.de
  2015-01-29  9:37 ` [Bug libgomp/61798] " jakub at gcc dot gnu.org
  2015-01-29  9:41 ` pinskia at gcc dot gnu.org
@ 2015-01-29 14:43 ` kessler at iag dot uni-stuttgart.de
  2021-12-29  7:41 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: kessler at iag dot uni-stuttgart.de @ 2015-01-29 14:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61798

--- Comment #3 from Manuel Kessler <kessler at iag dot uni-stuttgart.de> ---
Thank you both for trying to help.

@Andrew: This is on x86_64, running kernel 3.1.0 on an (admittedly old)
openSUSE 11.4. 

@Jakub: You are probably right, but the question remains, how a SIGPROF
(probably from the profiling machinery added with -pg) can escape up to the
user level instead of being catched by said machinery - and what to do against
it, of course.

Ciao,
    Manuel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgomp/61798] OpenMP exit code 155, profiling related?
  2014-07-14 10:16 [Bug libgomp/61798] New: OpenMP exit code 155, profiling related? kessler at iag dot uni-stuttgart.de
                   ` (2 preceding siblings ...)
  2015-01-29 14:43 ` kessler at iag dot uni-stuttgart.de
@ 2021-12-29  7:41 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-29  7:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61798

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |MOVED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The only think I can think of is somehow the signal does not get masked
correctly and/or stopped correctly before exiting. But this would be a glibc
issue as libgomp is just calling normal pthread_* functions to create and exit
the threads. libgomp does use the futex system call but that should not matter
with respect to the signal and all.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-29  7:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-14 10:16 [Bug libgomp/61798] New: OpenMP exit code 155, profiling related? kessler at iag dot uni-stuttgart.de
2015-01-29  9:37 ` [Bug libgomp/61798] " jakub at gcc dot gnu.org
2015-01-29  9:41 ` pinskia at gcc dot gnu.org
2015-01-29 14:43 ` kessler at iag dot uni-stuttgart.de
2021-12-29  7:41 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).