From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 53C2D3858C2C; Sun, 2 Jan 2022 19:10:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53C2D3858C2C From: "mmedon at student dot agh.edu.pl" To: glibc-bugs@sourceware.org Subject: [Bug time/28739] New: Timer doesn't send SIGSTOP signal after expiration Date: Sun, 02 Jan 2022 19:10:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: time X-Bugzilla-Version: 2.34 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: mmedon at student dot agh.edu.pl X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jan 2022 19:10:10 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28739 Bug ID: 28739 Summary: Timer doesn't send SIGSTOP signal after expiration Product: glibc Version: 2.34 Status: UNCONFIRMED Severity: critical Priority: P2 Component: time Assignee: unassigned at sourceware dot org Reporter: mmedon at student dot agh.edu.pl Target Milestone: --- Timer doesn't send signal (SIGSTOP/SIGTSTP/SIGTTIN/SIGTTOU) when the time period between timer expiration and SIGCONT delivering is at least two times longer than value in itimerspec. Code example: #include #include #include #include #include int main(int argc, char *argv[]) { printf("PID: %d \n", getpid()); timer_t timer; struct sigevent sev; sev.sigev_notify =3D SIGEV_SIGNAL; sev.sigev_signo =3D SIGSTOP; struct timespec timeForTimer =3D {.tv_sec =3D 10, .tv_nsec =3D 0}; struct itimerspec ts =3D {.it_interval =3D timeForTimer, .it_value =3D timeForTimer}; if (timer_create(CLOCK_REALTIME, &sev, &timer) =3D=3D -1) { perror("Error in timer_create!\n"); exit(EXIT_FAILURE); } if (timer_settime(timer, 0, &ts, NULL) =3D=3D -1) { perror("Error in timer_settime!\n"); exit(EXIT_FAILURE); } struct timespec timeToWaitInLoop =3D {.tv_sec =3D 5, .tv_nsec =3D 0}; for (;;) { time_t t =3D time(NULL); struct tm tm =3D *localtime(&t); printf("Time: %02d:%02d:%02d\n", tm.tm_hour, tm.tm_min, tm.tm_sec); nanosleep(&timeToWaitInLoop, NULL); } } Example output: PID: 19139=20 Time: 17:16:54 Time: 17:16:59 <- then SIGSTOP came Time: 17:17:30 <- then I sent SIGCONT (from bash) Time: 17:17:35 Time: 17:17:40 Time: 17:17:45 Time: 17:17:50 We should expect next SIGSTOP signal but it never comes I also have created a thread on unix.stackexchange=20 https://unix.stackexchange.com/questions/684192/specific-behavior-of-timers= -with-sigev-notify-sigstop-signal --=20 You are receiving this mail because: You are on the CC list for the bug.=