public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/103444] New: Fortran async IO is broken on FreeBSD
@ 2021-11-26 19:07 kargl at gcc dot gnu.org
2021-11-26 19:10 ` [Bug libgomp/103444] " kargl at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: kargl at gcc dot gnu.org @ 2021-11-26 19:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103444
Bug ID: 103444
Summary: Fortran async IO is broken on FreeBSD
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgomp
Assignee: unassigned at gcc dot gnu.org
Reporter: kargl at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
Target Milestone: ---
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgomp/103444] Fortran async IO is broken on FreeBSD
2021-11-26 19:07 [Bug libgomp/103444] New: Fortran async IO is broken on FreeBSD kargl at gcc dot gnu.org
@ 2021-11-26 19:10 ` kargl at gcc dot gnu.org
2021-11-26 19:19 ` kargl at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: kargl at gcc dot gnu.org @ 2021-11-26 19:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103444
--- Comment #1 from kargl at gcc dot gnu.org ---
=== libgomp Summary ===
# of expected passes 7743
# of unexpected failures 31
# of expected failures 72
# of unsupported tests 227
Each of async_io_1.f90, async_io_2.f90, async_io_3.f90
async_io_4.f90, async_io_8.f90, and async_io_9.f90
produce the same error.
Program received signal SIGBUS: Access to an undefined portion
of a memory object.
Backtrace for this error:
#0 0x200693bbd in handle_signal
at /usr/src/lib/libthr/thread/thr_sig.c:303
#1 0x20069321b in thr_sighandler
at /usr/src/lib/libthr/thread/thr_sig.c:246
#2 0x7ffffffff002 in ???
#3 0x20156872a in _Unwind_ForcedUnwind
at ../../../gccx/libgcc/unwind.inc:215
#4 0x20068ae6b in _Unwind_ForcedUnwind
at /usr/src/lib/libthr/thread/thr_exit.c:109
#5 0x20068ae6b in thread_unwind
at /usr/src/lib/libthr/thread/thr_exit.c:175
#6 0x20068addb in _pthread_exit_mask
at /usr/src/lib/libthr/thread/thr_exit.c:257
#7 0x20068ac8a in _Tthr_exit
at /usr/src/lib/libthr/thread/thr_exit.c:209
#8 0x20068a77f in thread_start
at /usr/src/lib/libthr/thread/thr_create.c:292
#9 0xffffffffffffffff in ???
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgomp/103444] Fortran async IO is broken on FreeBSD
2021-11-26 19:07 [Bug libgomp/103444] New: Fortran async IO is broken on FreeBSD kargl at gcc dot gnu.org
2021-11-26 19:10 ` [Bug libgomp/103444] " kargl at gcc dot gnu.org
@ 2021-11-26 19:19 ` kargl at gcc dot gnu.org
2021-11-28 8:19 ` pinskia at gcc dot gnu.org
2021-12-07 20:30 ` kargl at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: kargl at gcc dot gnu.org @ 2021-11-26 19:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103444
--- Comment #2 from kargl at gcc dot gnu.org ---
% gfcx -o z -fopenmp -g async_io_1.f90
% gdb ./z
(gdb) run
Starting program: /home/kargl/tmp/z
[New LWP 118209 of process 77440]
Thread 2 received signal SIGBUS, Bus error.
[Switching to LWP 118209 of process 77440]
0x0000000800f1815a in _Unwind_ForcedUnwind (exc=0x801a12738, stop=0x8006910b0,
stop_argument=0x0) at ../../../gcc/libgcc/unwind.inc:215
215 exc->private_1 = (_Unwind_Ptr) stop;
(gdb) bt
#0 0x0000000800f1815a in _Unwind_ForcedUnwind (exc=0x801a12738,
stop=0x8006910b0, stop_argument=0x0) at ../../../gcc/libgcc/unwind.inc:215
#1 0x0000000800690efc in ?? () from /lib/libthr.so.3
#2 0x0000000800690e70 in ?? () from /lib/libthr.so.3
#3 0x0000000800690d1b in pthread_exit () from /lib/libthr.so.3
#4 0x0000000800690833 in ?? () from /lib/libthr.so.3
#5 0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffdfffe000
Not sure where to go from here.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgomp/103444] Fortran async IO is broken on FreeBSD
2021-11-26 19:07 [Bug libgomp/103444] New: Fortran async IO is broken on FreeBSD kargl at gcc dot gnu.org
2021-11-26 19:10 ` [Bug libgomp/103444] " kargl at gcc dot gnu.org
2021-11-26 19:19 ` kargl at gcc dot gnu.org
@ 2021-11-28 8:19 ` pinskia at gcc dot gnu.org
2021-12-07 20:30 ` kargl at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-28 8:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103444
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://groups.google.com/g/bsdmailinglist/c/PnRU5wlAAWw/m/o1DiaXuWAQAJ?pli=1
But PR 82635 has been fixed for a while now.
Otherwise maybe it is the stack size problem as mentioned in that freebsd bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgomp/103444] Fortran async IO is broken on FreeBSD
2021-11-26 19:07 [Bug libgomp/103444] New: Fortran async IO is broken on FreeBSD kargl at gcc dot gnu.org
` (2 preceding siblings ...)
2021-11-28 8:19 ` pinskia at gcc dot gnu.org
@ 2021-12-07 20:30 ` kargl at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: kargl at gcc dot gnu.org @ 2021-12-07 20:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103444
--- Comment #4 from kargl at gcc dot gnu.org ---
This is as far as I have gotten on this bug. I don't know if
this is a race condition in libgfortran's async_close(), a
problem with gcc internal threading modeling (i.e., __gthrw_),
and problem with FreeBSD libthr. Pointers on how to go to
the next step appreciated. I assume something in __threadid
below is amiss.
% gfcx -o z -fopenmp -g async_io_9.f90 && ./z
% gdb ./z
(gdb) b async.c:479
Breakpoint 1 at 0x200a77ff0: file ../../../gccx/libgfortran/io/async.c, line
479.
(gdb) run
Thread 1 hit Breakpoint 1, _gfortrani_async_close (au=0x201a49000)
at ../../../gccx/libgfortran/io/async.c:479
479 if (au == NULL)
(gdb) p *au
$1 = {io_lock = 0x2006da908, lock = 0x2006da888, empty = true, id = {
waiting = -1, low = 1, high = 1, done = {pending = 0,
signal = 0x201a230a0}}, work = {pending = 0, signal = 0x201a23060},
emptysignal = {pending = 0, signal = 0x201a23080}, pdt = 0x201a4e000,
thread = 0x201a12700, head = 0x0, tail = 0x0, error = {message = 0x0,
cmp = 0x0, has_error = false, last_good_id = 0, family = 0,
fatal_error = false}}
(gdb) n
483 enqueue_close (au);
(gdb) n
484 T_ERROR (__gthread_join, au->thread, NULL);
(gdb)
Thread 2 received signal SIGBUS, Bus error.
[Switching to LWP 180470 of process 18692]
0x0000000200f1ad6a in _Unwind_ForcedUnwind (exc=0x201a12938,
stop=0x20068a030 <thread_unwind_stop>, stop_argument=0x0)
at ../../../gccx/libgcc/unwind.inc:215
215 exc->private_1 = (_Unwind_Ptr) stop;
(gdb) run
Thread 1 hit Breakpoint 1, _gfortrani_async_close (au=0x201a49000)
at ../../../gccx/libgfortran/io/async.c:479
479 if (au == NULL)
(gdb) n
483 enqueue_close (au);
(gdb) n
484 T_ERROR (__gthread_join, au->thread, NULL);
(gdb) s
__gthread_join (__value_ptr=0x0, __threadid=0x201a12700)
at ../libgcc/gthr-default.h:669
669 return __gthrw_(pthread_join) (__threadid, __value_ptr);
(gdb) p __value_ptr
$2 = (void **) 0x0
(gdb) p __threadid
$3 = (__gthread_t) 0x201a12700
(gdb) p *__threadid
$4 = {tid = 180471, lock = {m_owner = 0, m_flags = 0, m_ceilings = {0, 0},
m_rb_lnk = 0, m_spare = {0, 0}}, cycle = 0, locklevel = 0,
critical_count = 0, sigblock = 0, fsigblock = 0, tle = {
tqe_next = 0x201a12000, tqe_prev = 0x200699900 <_thread_list>}, gcle = {
tqe_next = 0x0, tqe_prev = 0x0}, hle = {le_next = 0x0,
le_prev = 0x20069a128}, wle = {tqe_next = 0x0, tqe_prev = 0x201a19080},
refcount = 1, start_routine = 0x200a764d0 <async_io>, arg = 0x201a1df00,
attr = {sched_policy = 2, sched_inherit = 4, prio = 0, suspend = 0,
flags = 2, stackaddr_attr = 0x7fffbfdfe000, stacksize_attr = 2097152,
guardsize_attr = 4096, cpuset = 0x0, cpusetsize = 0}, cancel_enable = 1,
cancel_pending = 0, cancel_point = 1, no_cancel = 0, cancel_async = 0,
cancelling = 0, sigmask = {__bits = {0, 0, 0, 0}}, unblock_sigcancel = 0,
in_sigsuspend = 0, deferred_siginfo = {si_signo = 0, si_errno = 0,
si_code = 0, si_pid = 0, si_uid = 0, si_status = 0, si_addr = 0x0,
si_value = {sival_int = 0, sival_ptr = 0x0, sigval_int = 0,
sigval_ptr = 0x0}, _reason = {_fault = {_trapno = 0}, _timer = {
_timerid = 0, _overrun = 0}, _mesgq = {_mqd = 0}, _poll = {_band = 0},
_capsicum = {_syscall = 0}, __spare__ = {__spare1__ = 0, __spare2__ = {
0, 0, 0, 0, 0, 0, 0}}}}, deferred_sigmask = {__bits = {0, 0, 0, 0}},
deferred_sigact = {__sigaction_u = {__sa_handler = 0x0,
__sa_sigaction = 0x0}, sa_flags = 0, sa_mask = {__bits = {0, 0, 0, 0}}},
deferred_run = 0, force_exit = 0, state = PS_RUNNING, error = 0,
joiner = 0x0, flags = 0, tlflags = 2, mq = {{tqh_first = 0x0,
tqh_last = 0x201a128a8}, {tqh_first = 0x0, tqh_last = 0x201a128b8}, {
tqh_first = 0x0, tqh_last = 0x201a128c8}, {tqh_first = 0x0,
tqh_last = 0x201a128d8}, {tqh_first = 0x0, tqh_last = 0x201a128e8}, {
tqh_first = 0x0, tqh_last = 0x201a128f8}}, ret = 0x0, specific = 0x0,
specific_data_count = 0, rdlock_count = 0, rtld_bits = 0, tcb = 0x2006bc1c0,
cleanup = 0x0, ex = {exception_class = 0, exception_cleanup = 0x0,
private_1 = 0, private_2 = 0}, unwind_stackend = 0x7fffbfffe000,
unwind_disabled = 0, magic = 3499860245, report_events = 0, event_mask = 0,
event_buf = {event = TD_EVENT_NONE, th_p = 0, data = 0}, wchan = 0x0,
mutex_obj = 0x2006da888, will_sleep = 0, nwaiter_defer = 0,
robust_inited = 0, robust_list = 0, priv_robust_list = 0, inact_mtx = 0,
defer_waiters = {0x20069a428, 0x0 <repeats 49 times>},
wake_addr = 0x200637000, sleepqueue = 0x201a19080, name = 0x0,
dlerror_msg = '\000' <repeats 511 times>, dlerror_seen = 0}
(gdb) s
Thread 2 received signal SIGBUS, Bus error.
[Switching to LWP 180472 of process 18709]
0x0000000200f1ad6a in _Unwind_ForcedUnwind (exc=0x201a12938,
stop=0x20068a030 <thread_unwind_stop>, stop_argument=0x0)
at ../../../gccx/libgcc/unwind.inc:215
215 exc->private_1 = (_Unwind_Ptr) stop;
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-07 20:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-26 19:07 [Bug libgomp/103444] New: Fortran async IO is broken on FreeBSD kargl at gcc dot gnu.org
2021-11-26 19:10 ` [Bug libgomp/103444] " kargl at gcc dot gnu.org
2021-11-26 19:19 ` kargl at gcc dot gnu.org
2021-11-28 8:19 ` pinskia at gcc dot gnu.org
2021-12-07 20:30 ` kargl 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).