On Thu, Sep 03, 2015 at 06:33:53PM +0800, Erich Dollansky wrote:> Hi, > > On Thu, 3 Sep 2015 11:19:47 +0300 > Konstantin Belousov <kostikbel at gmail.com> wrote: > > > On Thu, Sep 03, 2015 at 08:00:47AM +0800, Erich Dollansky wrote: > > > > > > Is this change of behaviour a feature or a bug? > > > > Provide a minimal example demonstrating the issue. > > while preparing the example I found the source of the problem. We have > to block all signals for some reason. The handling for > > signal (SIGTHR, SIG_IGN); > > seems to have changed. The moment I remove above's line from the code, > the program works. There is no difference when the programs runs on > machines prior mid November 2014. >Err, this is a bug, probably both in your program (user code must not twiddle with SIGCANCEL) and in libc. The later, I believe, was fixed in the HEAD r287300, which is not yet merged back to stable/10. The libthr has a protection disallowing user code manipulating SIGCANCEL, but due to the bug in libc signal(3) override the libthr measures. Apply the r287300 to your src/ and try your unchanged program with updated libc. But yes, SIGTHR/SIGCANCEL in the program is bug.> Thanks for your help. Simplifying the program brought me to the > solution. > > Do you want the example? > > Erich > > _______________________________________________ > > freebsd-stable at freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > > To unsubscribe, send any mail to > > "freebsd-stable-unsubscribe at freebsd.org"
Hi, On Thu, 3 Sep 2015 13:43:51 +0300 Konstantin Belousov <kostikbel at gmail.com> wrote:> On Thu, Sep 03, 2015 at 06:33:53PM +0800, Erich Dollansky wrote: > > On Thu, 3 Sep 2015 11:19:47 +0300 > > Konstantin Belousov <kostikbel at gmail.com> wrote: > > > > > On Thu, Sep 03, 2015 at 08:00:47AM +0800, Erich Dollansky wrote: > > > > > > > > Is this change of behaviour a feature or a bug? > > > > > > Provide a minimal example demonstrating the issue. > > > > while preparing the example I found the source of the problem. We > > have to block all signals for some reason. The handling for > > > > signal (SIGTHR, SIG_IGN); > > > > seems to have changed. The moment I remove above's line from the > > code, the program works. There is no difference when the programs > > runs on machines prior mid November 2014. > > > Err, this is a bug, probably both in your program (user code must not > twiddle with SIGCANCEL) and in libc. The later, I believe, was fixedI did not know of this. I simply blocked all. As it worked when I tested it those days, I forgot about it.> in the HEAD r287300, which is not yet merged back to stable/10. The > libthr has a protection disallowing user code manipulating SIGCANCEL, > but due to the bug in libc signal(3) override the libthr measures. > > Apply the r287300 to your src/ and try your unchanged program with > updated libc. But yes, SIGTHR/SIGCANCEL in the program is bug. >I am just updating another machine. It might be already tomorrow when I will come back to you. Erich
Hi, On Thu, 3 Sep 2015 13:43:51 +0300 Konstantin Belousov <kostikbel at gmail.com> wrote:> On Thu, Sep 03, 2015 at 06:33:53PM +0800, Erich Dollansky wrote: > > On Thu, 3 Sep 2015 11:19:47 +0300 > > Konstantin Belousov <kostikbel at gmail.com> wrote: > > > On Thu, Sep 03, 2015 at 08:00:47AM +0800, Erich Dollansky wrote: > > > > Is this change of behaviour a feature or a bug? > > > Provide a minimal example demonstrating the issue. > > while preparing the example I found the source of the problem. We > > have to block all signals for some reason. The handling for > > > > signal (SIGTHR, SIG_IGN); > > > > seems to have changed. The moment I remove above's line from the > > code, the program works. There is no difference when the programs > > runs on machines prior mid November 2014. > > > Err, this is a bug, probably both in your program (user code must not > twiddle with SIGCANCEL) and in libc. The later, I believe, was fixedI just ran the same binary on: FreeBSD B85M-HD3-0.alogt.com 11.0-CURRENT FreeBSD 11.0-CURRENT #5 r287425: Thu Sep 3 21:44:16 WITA 2015 erich at B85M-HD3-0.alogt.com:/usr/obj/usr/src/sys/B85M-HD3 amd64 and it works there. So, it is just a matter of time until the fix finds its way back to 10? Of course, I do not ignore the signal now in the application anymore. The application then works as expected on 10.2 STABLE. Thanks for your work and also thanks for your help. Erich