[Issue 13416] dead-lock in FreeBSD suspend handler

2022-12-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

Iain Buclaw  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 CC||ibuc...@gdcproject.org
 Resolution|--- |DUPLICATE

--- Comment #15 from Iain Buclaw  ---
Suspend signals changed to SIGRTMIN.

https://github.com/dlang/druntime/pull/3617

*** This issue has been marked as a duplicate of issue 15939 ***

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2022-01-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

--- Comment #14 from Dlang Bot  ---
dlang/druntime pull request #3682 "Issue 13416: Remove libthr hack from
core.thread.osthread" was merged into master:

- 3ac665c49d7aae1893c4e4535f60d1b4e2d427a3 by Iain Buclaw:
  Issue 13416: Remove libthr hack from core.thread.osthread

https://github.com/dlang/druntime/pull/3682

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2022-01-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

--- Comment #13 from Dlang Bot  ---
@ibuclaw created dlang/druntime pull request #3682 "Issue 13416: Remove libthr
hack from core.thread.osthread" mentioning this issue:

- Issue 13416: Remove libthr hack from core.thread.osthread

https://github.com/dlang/druntime/pull/3682

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2018-08-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

--- Comment #12 from Joakim  ---
Sorry, only seeing your question now. I was simply checking the D tests on
FreeBSD back then but I haven't used that OS in years, so can't look into it
further now.

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2015-10-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

--- Comment #11 from Martin Nowak  ---
(In reply to Joakim from comment #9)
> This fix doesn't seem to work on 9.1 i386, as the new FreeBSD test
> introduced in this PR hangs 90+% of the time.

Any further details? It doesn't seem like the pthread layout changed from 8.x
to 9.1. Is it easy to reproduce w/ the test case of comment 5?

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2015-10-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

--- Comment #10 from Martin Nowak  ---
(In reply to Joakim from comment #9)
> This fix doesn't seem to work on 9.1 i386, as the new FreeBSD test
> introduced in this PR hangs 90+% of the time.

> I also tried to override SIGCANCEL
> which is used for pthread_suspend_np but that didn't work.

SIGCANCEL is the signal used by pthread_suspend_np internally.
The signal handler already deal with being in critical regions, hence it
doesn't suffer from the deadlock. As it isn't allowed to overrride SIGCANCEL we
imitated the behavior by poking in pthread guts (THR_IN_CRITICAL).

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2015-05-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

Joakim  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #9 from Joakim  ---
This fix doesn't seem to work on 9.1 i386, as the new FreeBSD test introduced
in this PR hangs 90+% of the time.

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2015-02-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

--- Comment #8 from github-bugzi...@puremagic.com ---
Commits pushed to 2.067 at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/ad8662d65fe8f24be2c64c721eabe4da7f78b31f
fix Issue 13416 - dead-lock in FreeBSD suspend handler

https://github.com/D-Programming-Language/druntime/commit/513ba191f3e8b78aeb99336e27212dfdcacb39c5
Merge pull request #1061 from MartinNowak/fix13416

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2014-12-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2014-12-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

--- Comment #7 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/ad8662d65fe8f24be2c64c721eabe4da7f78b31f
fix Issue 13416 - dead-lock in FreeBSD suspend handler

- use pthread internal THR_IN_CRITICAL to retry suspend

https://github.com/D-Programming-Language/druntime/commit/513ba191f3e8b78aeb99336e27212dfdcacb39c5
Merge pull request #1061 from MartinNowak/fix13416

fix Issue 13416 - dead-lock in FreeBSD suspend handler

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2014-12-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

Martin Nowak  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #6 from Martin Nowak  ---
Using pthread_suspend_np didn't work out, because there is no way to get the
current stack top of a suspended thread. I also tried to override SIGCANCEL
which is used for pthread_suspend_np but that didn't work.

https://github.com/D-Programming-Language/druntime/pull/1061

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2014-12-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

--- Comment #5 from Martin Nowak  ---
Fairly simple to reproduce the problem.

cat > bug.d << CODE
import core.thread, core.sys.posix.pthread, core.stdc.stdio;

void loop()
{
  pthread_attr_t attr;
  pthread_attr_init(&attr);
  auto thr = pthread_self();
  while (true)
pthread_attr_get_np(thr, &attr);
}

void main()
{
  auto thr = new Thread(&loop).start();
  while (true)
  {
  thread_suspendAll();
  thread_resumeAll();
  printf(".");
  }
}
CODE

dmd -run bug

--


[Issue 13416] dead-lock in FreeBSD suspend handler

2014-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13416

Martin Nowak  changed:

   What|Removed |Added

Summary|frequent auto-tester hangs  |dead-lock in FreeBSD
   |in core.thread on freebsd   |suspend handler
   |32 and 64   |

--