public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" <lavr@ncbi.nlm.nih.gov>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: Tons of cygserver errors
Date: Sat, 05 Apr 2014 02:36:00 -0000	[thread overview]
Message-ID: <5F8AAC04F9616747BC4CC0E803D5907D0C8ADCB0@MLBXv04.nih.gov> (raw)

>> I can’t push this through your list spam filter.  Another attempt...

I was trying a few times, and finally deleted the strace attachment.  Let's see if this will go through.
Excuse me for being a bit straightforward, but the spam filter this list is using is *really* stupid!

> Still, you're missing the cygcheck log,

Cygcheck log was attached to an earlier message from today (thread: exe.stackdump is always empty).

> and a simple testcase would be helpful

Here you go:

$ cat sem.c
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/shm.h>
#include <sys/wait.h>

int main(void)
{
    int ids = semget(0xdeadbeef, 1, IPC_CREAT | 0777);
    int idm = shmget(0xdeadbeef, 4096*100, IPC_CREAT | 0777);
    char* addr = shmat(idm, 0, 0);
    int i;
    struct sembuf sb;
    sigset_t blocked;
    struct sigaction sa;

    sigfillset(&blocked);
    sigdelset(&blocked, SIGCHLD);
    memset(&sa, 0, sizeof(sa));
    sa.sa_flags = SA_NOCLDSTOP;
    sa.sa_handler = SIG_DFL;
    sigaction(SIGCHLD, &sa, 0);
    sigprocmask(SIG_BLOCK, &blocked, 0);

    for (i = 0;  i < 10; i++)  {
      pid_t pid = fork();
      if (!pid) {
          execl("/usr/bin/true", "true", NULL);
      } else {
          int status;
          printf("%d\n", i);
          sb.sem_num = 0;
          sb.sem_op  = 0;
          sb.sem_flg = 0;
          semop(ids, &sb, 1);
          waitpid(pid, &status, 0);
          sleep(1);
          *addr = (char) i;
      }
    }
    return 0;
}

$ gcc -Wall sem.c

$ ./a.exe
0
1
2
3
4
5
6
7
8
9

Windows event log immediately recorded 10 new events, like so:

Error	4/4/2014 10:02:34 PM	cygserver	0	None
Error	4/4/2014 10:02:33 PM	cygserver	0	None
Error	4/4/2014 10:02:32 PM	cygserver	0	None
Error	4/4/2014 10:02:31 PM	cygserver	0	None
Error	4/4/2014 10:02:30 PM	cygserver	0	None
Error	4/4/2014 10:02:29 PM	cygserver	0	None
Error	4/4/2014 10:02:28 PM	cygserver	0	None
Error	4/4/2014 10:02:27 PM	cygserver	0	None
Error	4/4/2014 10:02:26 PM	cygserver	0	None
Error	4/4/2014 10:02:25 PM	cygserver	0	None

(each having exactly the same message: cygserver: PID 1944: cygserver: error getting signal_arrived to server (6))

Strace is also attached.

Please let me know if you need anything else.

Anton Lavrentiev
Contractor NIH/NLM/NCBI


             reply	other threads:[~2014-04-05  2:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-05  2:36 Lavrentiev, Anton (NIH/NLM/NCBI) [C] [this message]
2014-04-07  0:59 ` Christopher Faylor
2014-04-07  2:33   ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2014-04-07  3:12     ` Christopher Faylor
2014-04-07  9:57 ` Corinna Vinschen
2014-04-07 11:45   ` Corinna Vinschen
2014-04-07 14:31     ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
  -- strict thread matches above, loose matches on Subject: below --
2014-04-01 14:25 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2014-04-02  8:53 ` Corinna Vinschen
2014-04-02 16:26   ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2014-04-03  8:28     ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5F8AAC04F9616747BC4CC0E803D5907D0C8ADCB0@MLBXv04.nih.gov \
    --to=lavr@ncbi.nlm.nih.gov \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).